I was watching Ben Silbermann’s interview at D11 where he states (22:53):
The experience that I’m really interested is when someone new joins Pinterest on any device how do we make it incredibly easy for them to understand what Pinterest is and to pair them up with other people in the world that share their particular passions. I basically re-sign up for the service every day on different devices, and I think we have a long way to go and if we can do that, we can open the service up to people all over the world, we can expand the number of interests that are represented and so that’s the number one priority for the company.
This is a really good idea btw, I might take that one.
Despite this, I actually found Pinterest’s new user experience to be pretty bad. I like Pinterest, I think it’s a useful idea. When I signed up, it prompted me to follow a whole bunch of boards. Being new to the service, I figured I’d more or less just accept the default options and so I accepted all the suggestions and was soon following a whole bunch of boards (over a dozen).
Boards that for the most part were kind of annoying. Sure the occasional inspirational quote, or cupcake photo is nice. But I don’t need 1000 of them drowning out the things I have explicitly decided to follow.
And this is where I found the user experience very bad: unlike on Twitter where you can view all the people you follow on one page with 1-click per user unfollow them, I found no such way on Pinterest. It seems you have to click on the board name from the pin-stream, open in a new page then click on unfollow.
The other way you can find the boards you follow is from the menu, by selecting “Your Boards” and when that loads selecting “Following” (which a bit counter-intuitive, I don’t see how “Following” fits under “Your Boards”, since they are not yours). More counter-intuitively this is not actually a list of boards you follow, but a list of people from whom you follow at least 1 board. There is no unfollow button, and clicking on a user gives you a “Follow All” button, but no “Unfollow All” and the boards followed are not even highlighted. Even if you select a user, it will show their boards but does not highlight the ones you follow.
So I tediously unfollowed each board by selecting it from the pin-stream. Unfollow a few, reload the page, unfollow some more. [Aside: 1 board completely refuses to let me unfollow – every time I try it says “unfollowed” but it’s pins stay in the pin stream nevertheless, but I digress I want to focus on the UX issue, not simple bugs, and at least it’s just 1 out of 12+, that I can handle]. Eventually I got rid of all but that stubbon one. It would have been faster just to create a new account.
Since it’s so easy to follow boards, make it easy to unfollow as well! Give me a list of every board I follow (not every user whose boards I follow – that is useful only to follow more of their boards, and not for unfollowing), or at least highlight which boards of the user I do follow!, and allow me to one-click unfollow button. In other words, consider the 1-week user experience too :)
My issue is not the suggestions, that’s fine – just need a way to undo the suggestions. If the same thing happened to twitter, it would be trivial to clean up your account and drop the suggested follows in seconds.
A lot has been made in the Australian media about the cost of the NBN. The Liberal party wants to implement a cheaper solution – albeit one that is less future proofed, and may end up costing more when all is said and done (in the way a clunker is cheaper to buy initially). Actually, NBN Co isn’t actually spending taxpayer money on goods (like what happens when the country buys a fighter jet), but is instead borrowing money using Australia’s credit rating that it intends to pay back in full, with profit (typical of a business). But lets ignore the differentiation between buying goods and investing in money-generating businesses for a moment, and look at just the money being outlaid today. The NBN is projected to cost $37.4 billion1.
The government has raised $48.1 billion dollars to date from the sale of 89.1% of Telstra2. It still holds a 10.9% stake valued at $6.6 billion3. That’s $54.6 billion in total value to the government from the capital sale of Telstra.
From the money made from the sale of Telstra, the government can build one and a half NBNs. The good news is we only need one.
So let me ask: is it reasonable to invest two thirds of the money raised in selling last century’s telecommunications network to build this century’s? An investment, that is projected to pay itself back several times over, both through direct revenue and indirectly through taxation on economic growth that it will facilitate.
Plus, maybe we can sell it off in a hundred years and raise money for the next network. Why again do the Liberals want to build a FTTN clunker?
For the last year Geospike has been using jtv-apns, itself a fork of apns. Our needs have grown, and today I announce our own fork of the APNS gem, name ‘gs-apns’.
The gs-apng gem continues the good work of James Pozdena and Paul Gebheim with some key enhancements including automatic message truncation, correct UTF-8 handling, rails-independent JSON encoding, full 256 byte message support, more failsafes and logging.
As my brother succinctly put it “iOS likes to crash”. One such crash that can easily happen when you use background tasks is for your app to be killed for running the background task longer than the allotted time (generally 10 minutes).
The standard practice for avoiding this issue is to end the task you started with beginBackgroundTaskWithExpirationHandler
in the expiration handler block of the same call. That works well, but there’s one catch. The UIBackgroundTaskIdentifier
isn’t passed into that block, so you need to pass it through yourself. But what if some code modifies the variable you passed-in erroneously? If you are using a local variable, this isn’t a problem1 – but if your background task extends beyond one method it’s common to use a member variable, which could be accidentally modified.
And therein lies the danger. What if, despite all your very careful checking, that variable is modified. Now your failsafe won’t work correctly, and the app will crash. What’s worse, is it will crash in a totally random place. The crash logs give a very specific reason “App has active assertions beyond permitted time”, but don’t tell you exactly which LOC created the background task.
Here’s a better pattern. A safer failsafe if you will. Always declare the UIBackgroundTaskIdentifier
as a local variable. End the task in the expiration handler using that local variable. After the task is created, set your member variable to equal the local variable for any additional additional processing (such ending the task naturally when it completes). Now the expiration handler is guaranteed to end the correct task, regardless of what else happens.
This pattern generates a bit of boilerplate code, and lets face it the more you copy and paste the less maintainable things get, and the more chance there is for error. So I’ve wrapped up this pattern into a simple utility class. The method is beginBackgroundTaskWithSafeExpirationHandler
and it is designed to never crash with “active assertions beyond permitted time” no matter what you do. You can download the code from the gist.
Heads up: how Rails handles unicode in JSON has changed in rails 3.2.13 and 4.0.
Previously unicode characters would be encoded with \u1234
notation. This encoding was actually a bit buggy, anything over two bytes (e.g. outside the Basic Multilingual Plane) would not render correctly1. With 3.2.13 and 4.0, Rails now just passes through UTF-8. That’s legal under the JSON spec2.
Does this change matter? Probably not, unless you interface with a buggy JSON parser that doesn’t support UTF-8. Also, if you’re using .length
to get the bytesize of a JSON message you will now need to use .bytesize
instead (previously length would have been equivalent, as it was an ASCII string).
If you need to get the old ascii encoding back, good news, you can! Replace your use of object.to_json
with JSON.generate(object, :ascii_only => true)
. E.g.:
object = {:unicode => "I \u{1F49B} you"} JSON.generate(object, :ascii_only => true) => "{"unicode":"I \\ud83d\\udc9b you"}"
Not only does this encode the unicode characters, it does it correctly even for the extended characters which the old Rails 3.2.12 to_json
did not. Awesome!
This is useful for the odd time you have a service that can’t handle UTF-8 encoded JSON. But what if you don’t have control over the code that calls to_json?
"\u{1F49B}".to_json
on an old install if you dont’ believe me (.should == "\ud83d\udc9b"
). [↩]Something a lot of people forget when designing newsletters or email marketing campaigns is that after the subject, the first line of text is the most important. That’s because, email clients like GMail and iOS Mail will display the first line of text right under the subject.
So you don’t want your email to read: “News Update from XYZ Widgets – [ Unsubscribe | Web Version ]” when it could read “News Update from XYZ Widgets – the new widget everyone is talking about”.
Simple solution: update your HTML template, and put a small 1-sentence summary of the topic at the top.
Here’s the before & after for Geospike:
For a long time I’ve yearned for a well presented Unicode table that gave simple ways to look up all the great glyphs that I need in Unicode ☄. If I wasn’t so busy I probably would have written my own ✈.
Well I’m pleased to say someone has created this and done a fine job of it too, unicode-table.com. You can search, view a beautiful large version of glyph, get unicode numbers and HTML codes. It’s also arranged in a geek-friendly bit-table. What more could you ask for? ❄☃
iOS support would be nice I guess – though at least it’s still usable (and works with the iOS clipboard ១ – no mean feat).
Booking Train Tickets in China has always been pretty decent: there are a bunch of official ticket agents around suburbs and towns, changing ¥5 per ticket as a fee but allowing you to book from the clamness of your own street instead of the crazyness in the station.
Recently it got even better. You can now see availability online, and book tickets at www.12306.cn (if you can read Chinese and have a Chinese credit card, or a friend who can help). Tickets booked in this way can be collected at the ticket agents (for the same ¥5 fee), or at the station (for free). They can also be refunded online, until you collect them (after which you can refund them in the usual way).
This is an issue I am having when trying to use a custom buildpack with Heroku. The intent of the buildpack is to update the version of ImageMagick on the heroku dyno which is over 2 years old.
I love the idea of bitcoin. Well, I love the idea of a crypto currency with zero transaction fees, and no government intervention. But the problem I see with Bitcoin is demand.
Like fiat money, Bitcoins are another “make believe” money that has value only because we say it does. Many argue it is superior to government issued fiat money as the its money supply is deterministic and slows in growth over time (rather than at the whims of the government of the day). Read more…