Quick Thoughts on Swift
Last week Apple announced a new programming language, Swift. John Siracusa’s wish to avoid a language crisis has finally been granted, and he was happy, as few have ever seen him.
I am still working my way through the Swift language reference, but for what it’s worth, here are some quick thoughts on the new language:
It’s beautiful. The attention to detail paid to getting the syntax right is extraordinary. It has just the right balance of terseness, to minimise typing and meaningless boilerplate, and expressiveness, to maximise readability.
Avoiding the need for basic framework imports and a “main” class/method/function makes it work like a scripting language for simple tasks. I can see myself reaching for Swift rather than bash scripting, Python, Perl, or even AppleScript for quick automation jobs. That makes me excited.
There is a huge amount of focus on safety — so many little language features designed to avoid common programming mistakes that even the most experienced programmers make. Some old programmers will moan that little syntactic juggling tricks they’ve dragged along since the C days no longer work, but I hope Apple ignores them and continues to make safety a core goal of Swift.
Swift is young. There are some basic things missing, and some simple questions unanswered. One friend of mine noticed that there is apparently no easy way to get, say, the third character of a
String. (After consulting with an Apple engineer in the WWDC labs, he found a way to do it, but it’s neither pretty nor intuitive.1) Swift’s wrinkly, newborn skin will smooth out as it grows and fattens.
So far, it seems that Swift is intended for client-side / GUI applications. I would love to use it on the server-side too. I’m sure someone will find a way. Cue fifteen or so web frameworks on Github in 3… 2… 1…
Emoji FTW!! Okay, emoji variable/function names might be silly, but the ability to use any Unicode character is very useful for non-English speaking developers. Here, for example, Japanese developers can use real Japanese names for their variables and functions, which means less ambiguity, and ultimately better software.
I’m more excited than I have ever been to develop on Apple platforms. Swift is a language I could see myself working in full-time. More importantly for me and many developers like me, Swift levels the playing field in the Apple development. Nobody (outside Apple) has more Swift experience than me, because everybody has zero. For the first time since I got my Apple developer account, I don’t feel like an impostor, a foreigner, an outsider. I have just as much chance to succeed at this as anyone else. And I intend to.
The answer is
str[advance(str.startIndex, 3)]— WAT. ↩
Be a Toy Maker
Designing and making toys must be one of the most enjoyable, satisfying jobs in the world.1 It is the pure essence of working to make people happy. The goal is nothing more than to entertain, and where possible, educate through play.
Toys are not limited to children. Many products aimed at adults are dismissed as toys, as if that somehow means they have no value. But I think the opposite is true. Joy and delight and play are essential to making a thing worthwhile, if not vastly more usable and effective at being the thing it’s meant to be.
If your job is to make things — anything — then try to introduce an element of toys into it. Make it playful, joyful, attractive. Make it fun.
Or at least, it probably was, once upon a time. ↩
End App Store Ratings
The Internet is up in arms again about the App Store’s customer feedback channel. This time, the ratings system.
Back in 2009, YouTube mused upon, and then implemented, a simple thumbs-up/thumbs-down system to replace the demonstrably useless1 5-star rating system. The App Store could follow suit. The next logical extension would be Facebook’s 1-bit2 “Like”.3
I say take it even further. I say take it to its logical conclusion: 0-bit. I say abolish the rating system altogether.
The core problem is that the incentives are all wrong. As Daniel Jalkut points out and the YouTube data supports, customers are only motivated to leave reviews when they have strong feelings about an app. Or, as the current furore pinpoints, the app bullies customers into leaving reviews. Since ratings drive sales, app developers are incentivised to beg, bully, and trick customers into giving them.
Actually, it’s worse than that. Because the App Store has no system for upgrade pricing, a customer that already downloaded the app is, in a sense, no longer a customer. They are no longer a potential source of income.4 The most valuable thing they can do for an app developer is rate or help promote the app. So it’s not surprising that app developers are encouraged to milk them for reviews, even if it means pissing them off.
Shame campaigns are unlikely to have any impact, so long as the incentives are geared this way. The only real solution is to fix the incentives. I have an idea.
Rank by total usage hours across all users.
Apple could, in theory, collect anonymous usage time5 statistics whenever the device checks the App Store for updates. Aggregate these to get the total number of hours that all the users of an app have spent, collectively, using the app. Then rank apps in the Store by their total usage time. No star ratings needed — but more importantly, no action needed by the customer at all.
Since this would be the collective usage data of all users, not just the vocal minority, it is inherently honest. If an app is truly useful, it will have relatively higher usage hours than other apps in its category. Some people who give an app a 1-star rating, but they still use it every day. That usage time would help lift the app’s ranking in the store.
If rankings worked this way, app developers’ incentives would be geared towards keeping customers using the app. Which implicitly means making the app useful and/or fun. The equation shifts from "mo’ reviews, mo’ money" to “better app, mo’ money”.
UPDATE: Marco Arment points out an obvious flaw with usage time as the ranking metric: apps that are designed to minimise usage time — where being able to get in and out of the app quickly is a feature. Absolutely, that’s true. A possible alternative to “usage hours” is “number of times launched”.
Also, I’m only talking about ending ratings here, not reviews. (An earlier version of this post advocating getting rid of review comments as well, but I thought better of it and removed that section a few minutes after posting.) Review comments have many problems, too, but as Marco points out, sometimes they are helpful when choosing an app from search results. My assertion is that if apps were simply ranked (in both search results and “Top 50” lists) by usage hours / times launched, it would remove the incentive for “rate this app” pop-ups, and increase the incentive to make a good app.
OMFG a line chart is the worst possible choice for visualising this data. ↩
A 5-star ranking system has 6 possible values (3-bit): 1-5, and no rating. The thumbs-up/down system has 3 possible values (2-bit): up, down, and no rating. Facebook’s “Like” system has 2 possible values (1-bit): Like, and no rating. ↩
The App Store has actually integrated Facebook’s “Like” system alongside the existing 5-star rating. It’s conceivable that the 5-star rating could simply disappear, leaving Facebook Likes (and comments?) as the only remaining customer feedback mechanism. But of course, not everyone has a Facebook account (no really, it’s true!), and Apple will never delegate important functionality like that to another company. ↩
It’s also no wonder, then, that in-app purchases has taken over as the main revenue driver for apps. ↩
Only time. Nobody wants to see the creepily ambiguous “anonymous usage statistics” show up in App Store T&C. ↩
iPad + Keyboard Ergonomics
Propping your iPad up with a SmartCover or a stand seems fine at first, but then you quickly realise that when the app you’re using needs a lot of direct touch to access its features, reaching out to touch the screen is awkward, tiring, and clumsy.
Try this instead: Lay the iPad down flat on the table, between you and the keyboard. It seems weird at first, but this way your hands are really close to the screen and supported by the desk, so it’s easier to reach the on-screen controls. Plus, when the iPad is flat on the desk it’s much easier to anchor your hands for more accurate taps, swipes, and other gestures.
PAQ (Probably Asked Questions)
Don’t your hands obscure the screen?
Not as much as you’d think.
Does your neck get tired looking down at the desk?
Yup. It’s a trade-off. One ergonomic problem for another.
Update: To S or not to S
Now we have a new data point, let’s check back on how “S” models compare to non-“S” models.
non-S models S models Models 3G, 4, 5 3GS, 4S, 5s Industrial Design ✓ Display ✓ Storage ✓ ✖ CPU/GPU/SoC 1 ✓ ✓ New Sensors ✓ ✓ RAM ✓ ? Wireless ✓ Camera 2 ✓ Audio ✓ Software 3 ✓ Battery ✓
The big miss was storage. Both the 3GS and 4S got storage bumps, but not the 5s.1 RAM is, as always, unknown at this point. So other than storage, my original table seems to be holding true.
But! Now we have the “5c”, adding a new modifier into the mix. The announcement was only moments ago, but from what I understand, the 5c’s specs are basically identical to the 5. So I expect the “c” models will follow the non-S model path in terms of how they upgrade. Who knows? Maybe we’ll see an “iPhone 5cs” next year? Or “iPhone 5d”?
UPDATE: I added a row for new sensors. If I had this row in my original table, the tick would have been in the non-S column: the 3G got GPS, the 4 got a gyroscope, and the 5 had no new sensors. But now the 5s got a fingerprint scanner, so it gets a tick.
OMFG that lowercase “s”. ↩
Users: What to Expect from iOS 7
By now you’ve heard a lot about iOS 7’s new look, new features, and perhaps you’ve heard some things about what’s under the hood. But what will it be like to use a device with iOS 7? After all, most of the time you spend on iOS is in apps downloaded from the App Store, not the built-in ones.
Marco Arment wrote a spot-on post on Tuesday about what iOS 7 means for developers. And he’s right: those who are nimble enough to embrace iOS 7 with their apps early will stand out in the App Store. But not just because an updated, iOS 7-like styling will feel more natural to use — Apple has opened iOS way up, providing developers with enormous opportunities to make their apps better for users.
Without explaining how (I can’t — NDA), here are some of the things you can expect as an iOS user, in the months after iOS 7 is released, from apps by devs that take Apple’s advice and use the new APIs.
Apps updated for iOS 7 will seem to be always up-to-date and fresh. When you get a push notification on your lock screen and swipe it, the new content will be ready — no waiting for it to download. Social networking apps will always have the newest messages ready to read. Podcast apps will download new episodes so they’re always ready to play. News apps will always show the latest articles when you open them.
The result: your iPhone will feel fast. Responsive. Productive.
Expect iOS 7-optimised apps to be much more animated. There will be some apps that overdo it, but the ones that get it right will feel more responsive to your touch, more real, more intuitive. You’ll feel more comfortable and confident to navigate through each app, because on a subconscious level, the app feels more physical.
You will get a sense of space — the feeling that your iPhone screen is a window on a larger canvas of content. Each app is an art museum, and you walk from room to room as you navigate through each screen.
Your iPhone will feel alive.
Content will be bigger, clearer, and easier to find. When you want to know something, iOS 7-style apps will just tell you, clearly and simply. And while you won’t necessarily notice this consciously, everything will be much, much easier to read.
This will be a more gradual change, but expect apps to be better-tested, have fewer bugs and crashes, and update more frequently. 1 Developers who take full advantage of the tools will be more likely to have tested their app thoroughly the same device that you’re carrying.
Apps will be better at staying in-sync across multiple devices. Whether they use iCloud or their own cloud-based service, your data will be pushed to other devices more reliably, and when something does go wrong, you’ll get better support from the app’s author.
This one’s hard to explain, but you can expect to see apps that integrate more tightly with businesses and services in the real world. When you walk into a store, tour a museum, or attend an event in a stadium, apps will participate in the experience of being there.
I’m excited about the possibilities and the opportunity to build stuff for iOS 7, but I’m even more excited about using the new breed of apps that we’ll start to see in a few months. Not every app will take advantage of this stuff, so it’ll be a great time to start looking for new apps that do — because those are the apps that, over time, will earn their place on your home screen.
Which, by the way, will happen tranparently in the background, so it won’t be annoying. ↩
How I Enhanced iOS 7’s 3D Parallax Effect and became Irresistible to Women
As you’ve heard by now, iOS 7 has a fancy 3D parallax effect, that make it look like the home screen icons, among other things, are floating above the wallpaper. It uses the iPhone’s sensors (accelerometer and gyroscope, presumably) to detect the movement of the device, and move the deeper layers relative to the higher layers.
Of course, it’s not actually a 3D screen, so this is all an optical illusion. One by which, unfortunately, our highly evolved stereoscopic vision is not easily fooled. The effect looks cool, but your brain still knows it’s looking at a flat screen.
This is not the case when you see the effect in videos, because your brain already knows it’s looking at a flat screen, but the image is of a 3D scene, phone and all. So you just unconsciously re-translate the effect and it looks like the icons really are floating — on TV.
If you want to get the full impact of the effect on your real device, try shutting one eye. It works because your brain realises it’s only getting signal from one eye, so it switches inferring 3D space from that one visual signal — same as when you saw it on the video.
As a bonus, you will look quite silly winking at your phone as you rotate it around, saying, “Oooooooh!!”
It’s a New Apple, Same as Before
I was lucky enough to be in the room when Apple delivered its WWDC 2013 keynote. This is my second WWDC, so I have some basis for comparison, and there’s no doubt that Apple had us nerds whipped into a frenzy. The buzz in that room was unbelievable.
Apple delivered a very clear, very strong message:
- Well actually, Apple is kicking arse and taking names in the marketplace.
- But while that’s nice, it’s not really the point.
- The real point is, our stuff is really, really good.
- Apple is still innovating, leaving the past behind, moving forward.
- And how.
Over the past two years, it seemed that everything had changed. Steve Jobs departed. Several high-level execs left. Scott Forstall ousted. From the outside, it appeared as though this must, inevitably, change the company to its core. But on Monday, we saw that Apple has shed its skin, but the snake is still the same snake. It looked different for a while, but it still moves and hunts the same as it always has.
And they’ve always been this way. Contininous, repeated reinvention of itself is Apple’s most fundamental nature. Working hard to perfect a thing, and then throwing it away in order to move forward. Never stuck. Never complacent. Never afraid to rethink, different.