To celebrate the release of iOS 7 and the new batch of iPhones, I’d like to share some highlights in the life of a mobile developer at Promega.
Promega was quick on the uptake when the iPhone was first released, and immediately spotted a unique opportunity to reach out to scientists in this new medium. A project quickly coalesced to create an iPhone app that combined the Protocols and Applications guide, easy access to our multimedia library, and the most popular Biomath Calculators. Promega thus made news as the first biotech company to release a resource-rich mobile app.
I, like many other developers, fell into writing code for smartphones and tablets almost by accident: When the iPad made its appearance in 2010, I was asked to see what it would take to make a version of the app for the then-brand new tablet from Apple.
As a freshly hired graphic designer with a background in computer science, I thought, I’d really just be creating the user interface for the tablet version of the app, and the programming can’t be all that involved, can it? The app’s already written, I’m just effectively re-potting it, right? Also, the practice of programming had changed significantly since my college days: documentation could easily be found online and extensive online communities of programmers, such as stackoverflow.com, now provide excellent peer support.
In spite of all this, the project proved more involved than I had anticipated. These were the early, heady days of iOS and the first iPad ran a version of the operating system that was different enough from the phone version to make cross-development a dicey proposition. Many developers with existing iPhone apps chose to create completely separate apps for iPads, keeping only the names and branding similar across both. Some brave souls explored ways to write a single app that would display differently depending on the device it was running on. Either way, back in early 2010 there was no off-the-shelf recipe for making a mobile app that would work on both iPhone and iPad. This is a perfect example of fragmentation, one of the few dark clouds in the otherwise sunny world of mobile development. It refers to the fact that, as the number and variety of mobile devices proliferates, it becomes much more difficult to write an app that will correctly work on everybody’s phone or tablet.
What You See is Not What You Get
After the initial scramble surrounding the iPad’s introduction, fragmentation hasn’t really been a huge factor in iOS programming. But we did find a curious instance of it in recent iPhones as well, while developing the Promega Colony Counter app for the iPhone. A key part of the colony counter is the ability to take a photo of a bacterial plate, and then give the user the opportunity to edit the automatic count through a nice interactive interface. We provided a “mask” on the photo preview screen in the app, so that the plate can be aligned exactly for an optimal count, and all data outside of the plate is ignored. This worked fabulously on the iPhones 4 and 4S, right up until we tried it out on the iPhone 5.
The “preview” screen you get on an iPhone 5 when taking a photo is not the same size, or shape, as the final “here’s the photo you took” screen, a behavior not seen on previous phones. The effect of this discrepancy on the colony counter – that depended on precisely lining up the bacterial plate to the mask – was quite pronounced as a significant part of the plate as seen in the preview screen was suddenly outside the counting zone. However, since the effect on the default camera app was subtle, most people didn’t even notice. I found only a handful of photo enthusiasts who ever commented on this iPhone 5 oddity.
The Case of Seven on Seven
While fragmentation is at worst an occasional problem in iOS, it’s cited as one of the chief frustrations in developing applications for Android devices. We ran across a curious instance of this while developing the Promega app for Android in parallel with the iOS version. When Google announced the relatively affordable Nexus 7 tablet, I, along with a couple of other very excited people in the office immediately ordered one. Soon after upgrading these magical tablets to a beta version of Google’s Android OS, we noticed something very wrong: The app would crash seemingly at random when we’d enter data into text fields. Obviously not good. Then, one of our astute testers noticed something that caused our jaws to drop: The device would crash only if the numeral “7” was typed into a numerical field. Thankfully, it wasn’t just us. Sure enough, Google soon issued a fix to this, the only accidentally eponymous bug I’ve ever seen.
Don’t get me wrong – while fragmentation continues to be an issue and a source of occasional tear-stained hilarity, by and large, mobile development is a pleasant and rewarding area of programming. There’s still a lot of excitement around new mobile technologies even in 2013, the programming environments are good and getting better everyday, and there’s a great deal of support within the mobile programming community. And yet, as I glance down at my old-fashioned analogue watch, I have to wonder what’ll come next.
Latest posts by Maciek Smuga-Otto (see all)
- Using the Flu as an Educational Opportunity - January 29, 2014
- Rocking Robotics With Kids and LEGO® Bricks - November 22, 2013
- Vignettes From the Life of a Mobile Developer - September 23, 2013