stringValue
It can be tempting to convert NSNumbers to strings by calling stringValue
. It’s definitely less verbose than creating an NSNumberFormatter, specifying the number style, removing the grouping separator, and any other setup that’s necessary. You may think calling [@8.8 stringValue]
returns “8.8”, but you’d be wrong; it actually returns “8.800000000000001”. Let’s take a look at what’s going on behind the scenes when we call stringValue to find out why this is happening.
Aviator
Recently, I became interested in the process of building Xcode plugins, digging into the private headers, using hopper to dissect the framework, and experimenting with the existing plugins already available on the web. I switch back and forth quite a bit between AppCode and Xcode, mainly using AppCode for its superior refactoring tools. Besides refactoring tools, AppCode has a lot of great shortcuts that I wish Xcode has. ⌥↩ adds missing imports and ⇧⌘T toggles between unit tests and source files. Peckham is a plugin that already exists and does a decent job at adding missing imports, though I wish it was as simple as ⌥↩. That left me with ⇧⌘T as a good intro to Xcode plugin creation. If you’re interested in how to get started creating Xcode plugins, Artsy has a great blog post¹.
Episode 3 - Effective Pair Programming
The ongoing effort by Effective Programming continues the saga with another episode, this time with a discussion around the pros and cons of pair programming. We talk about buying houses, Top Gun, and playing Warcraft III. Check it out! Effective Pair Programming.
As every iOS developer knows, Apple can do whatever they want with their own native apps, meaning they can and do use private APIs. It’s not too surprising, after all, it is their domain and they are in control. However, Apple’s overuse of private APIs can make third-party apps second-class citizens; iBooks is notorious of such private API abuse¹.
Some friends and I have started up a new podcast at Effective Programming. We’re a group of iOS developers who love exploring the platform, new technical challenges, agile software development, and the latest trend in test driven development¹.