July Recap

I’d hate to go a month without posting so here’s some random updates!

Philly CocoaHeads is going as strong as ever. Our WWDC June meeting filled the Apple Store Briefing Room to capacity (~50 people!) with lots of excited geeks. Our Side Project Saturday events continue to see some steady growth (15 people at the July event) and generate lots of interesting conversation and shared ideas. (Funny enough we were talking app bubbles right along side Edge Cases this week even though I didn’t know their topic at the time.) Finally our workshops are finally kicking back into gear with an Intermediate Objective-C course coming in August and a more beginner friendly Introduction to iOS Development course via the Girl Develop It group in September. Philly CocoaHeads is becoming so formal in fact I think we’re going to take the plunge and make it a legit non-profit group to help clean up the financial side of things.

In addition to CocoaHeads, there is also CocoaLove — our upcoming Fall conference. I’ll be doing the main talk Friday night and I’m doing my best to keep the topic upbeat despite my pessimistic tendencies. Big props to Curtis Herbert for really spearheading this event. It looks to be a really interesting and fun weekend. Buy your ticket while you can!

Through my job at Tonic Design things are busy. I have two projects right now, One is for a startup while another an internal app for a large corporation. Sadly these are not public right now so details will have to wait. That said, I’ve been spending a ton of time with iOS animations and I have two things to say. One, the Facebook Pop system is pretty cool and worthy of your time to play with. Two, I’m working on an abstraction system that should help apps with large amounts of animation stay organized. More to come soon on that.

At home, side projects have been back burnered, mostly for CocoaHeads stuff. I am spending time reading up on Swift and playing a little with Go but I’m also trying to keep plenty of time for playing games and relaxing. Can’t be focused on code all the time.

So thats it for July. Hope the summer is treating you all well. Hope to share more soon.

7 Minute Workout Featured on Apple.com

One of the apps I worked on, 7 Minute Workout, has been featured by Apple again. This time it’s part of the Strength TV ad which features a bunch of great fitness apps on iOS.

In related new the DmgCtrl and Tonic merger is kind of official these days. You can read more about it in Technical.ly Philly. You can also check out the revamped Tonic website which has a bunch of new case studies of some of our recent projects.

Congrats to all involved.

Side Projects

Sorry for the dead air over the last few months. Things got a bit hectic at my job and I couldn’t seem to find the free time to post. On the plus side, things are starting to calm down. We’ve shipped some more software and I’m finally catching up with some side projects.

One project which I started at the March CocoaHead Hackday is GoldCards. It’s an iOS reference tool for Hearthstone.

  • GoldCards Screenshot 1
  • GoldCards Screenshot 2
  • GoldCards Screenshot 3
  • GoldCards Screenshot 4
  • GoldCards Screenshot 5
  • GoldCards Screenshot 6

While I want this to be a Universal (iPhone and iPad) app in time I think I’m going to finish up a few more loose ends and release it as an iPhone-only app for now.

Another big side project is CocoaLove, an iOS-focused conference coming to Philly. I’m on the planning committee (sponsorship and AV to be specific). I’d also like to help build a simple conference app with the schedule and what not. Shouldn’t be too hard considering my history with such things.

In addition to all that I’m also trying to catch up with some web tech, Ember and Node to be precise. There are a few things on my idea board that could utilize such skills so I’m taking some time reading books and going through Code School examples to catch up.

iOS Development: Things to Like; Things to Hate

Things I like about iOS Development

  • I like writing code in the Objective-C language.
  • I like Apple’s provided frameworks and tools. They are, on the whole, very good.
  • I like the iOS community’s enthusiasm for great products. It is very inspiring.
  • I like that people will pay you good money to build apps for them in iOS. Though this is has good and bad implications.
  • I love attending, and over the last few years running, CocoaHeads in Philadelphia.
  • I like that the community on a whole is not very secretive. There is a sense we are in this together and people constantly help each other out sharing tips, code and war stories.

Things I hate about iOS Development

  • I hate the exclusivity of the AppStore distribution.
  • I hate that I can’t side load apps that people build that Apple doesn’t approve of.
  • I hate that I have to sign my apps.
  • I hate the learning curve and the bugs of the signing process for all but especially for people new to iOS.
  • I hate that Apple has a shitty code validator during app signing that will complain when I have methods on my objects that look like private methods on their objects.
  • I hate how shitty AppStore search and discovery is.
  • I hate the corporate politics that let apps get featured in the store because of “connections”.
  • I hate how people continue to manipulate the AppStore ranking system and I hate how little Apple seems improve the situation when many small developers livelihoods are at stake.
  • I hate how the Radar bug system doesn’t have tools in place to involve and update the original bug reporter on progress being made. From a third-party perspective most bug reports might as well go into a black hole.
  • I hate how in the pit of my stomach I believe that, on the whole, the iPhone and its brethren have not improved society. I think the majority of mobile software has only helped to empower “generation ‘me’”, a generation that is “friends” with everyone, but no one. This deserves a post on to itself someday.
  • I hate the iOS / Mobile bubble. The fact that people are spending way too much building apps and are not getting a proper return of value on the investment.
  • I hate that building products is way riskier than consulting (bubble related).
  • I hate that Apple hasn’t shown more interest in providing a library management system. Thankfully we have CocoaPods but since it’s on the outside there is a fear it might not be able to keep up as the tool chain evolves.
  • I hate that back when Apple first started to integrate OCUnit into Xcode it enviably killed like 3 or 4 other very promising testing systems because the thought at the time was “well Apple made their choice and will build on it” when in fact Apple never did. Only recently did we see XCTest and it is, right now from a functional perspective, a method renamed version of OCUnit with no new features.
  • I hate how Xcode Bots doesn’t have pre and post scripts.
  • I hate (hate is a strong word — let’s say disappointed by) the growing community of “Apple Celebrity”. The once full time developers who can build great things but now choose to spend the majority of their time blogging, podcasting and tweeting all day. They partake in a low impact ping pong match of opinions on weekly events and news that frankly doesn’t mean all that much in the grand scheme of things.

MegaManEffect now on GitHub

A few days ago I started to archive a lot of the Clickable Bliss website, replacing it with a smaller “hiatus” version. In the process I moved the MegaManEffect which lived primarily via a blog post and a GoogleCode subversion repo to GitHub.

https://github.com/zorn/MegaManEffect

The MegaManEffect is an application that emulates an effect seen in the classic NES game Mega Man 2. When you launch a Mac OS X application, the screen goes dark, stars sweep the night sky and your application’s icon is presented in a blue letter box bar with a cheesy 8-bit music introduction.

MegaManEffect was written while I attended the ADHOC/MacHack conference in 2004 and took second place in the ADHOC Labs Showcase! In the summer of 2005 the application hit a nerve in the community generating tons of interest and downloads. It is to this day one of the most distributed pieces of code I’ve even written.

Funny enough after tweeting the move I ended up getting an email and later a pull request to update the code base to compile on 10.9. I approved the pull request today (thanks @smithrobs!) with a few other fixes.

The MegaManEffect will be 10 years old this summer.

Enums and Switches

If you are one to use enum to define modes or types in your models or controllers, consider using switch statements to help branch the different behaviors. If you do so, the complier will help you when you have forgotten to implement behavior for a enum value.

Take for example a view controller that might have different behavior if we are in an editing mode, and even more so the editing is handled differently depending on the target device. For this, let’s create an enum like:

typedef enum ViewControllerMode : NSUInteger {
    ViewControllerModeDefault = 0,
    ViewControllerModeEditingiPhone,
    ViewControllerModeEditingiPad,
} ViewControllerMode;

Now if the tableView:didSelectRowAtIndexPath: method let’s use a switch statement to branch behavior depending on the behaviorMode.

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    switch (self.behaviorMode) {
        case ViewControllerModeDefault:
            [self showRecordAtIndexPath:indexPath];
            break;
        case ViewControllerModeEditingiPhone:
            [self editRecordAtIndexPath:indexPath];
            break;
        case ViewControllerModeEditingiPad:
            [self replaceRecordAtIndexPath:indexPath];
            break;
    }
}

Notice we are not using a switch default behavior here. Now let’s add a new enum type called ViewControllerModeEditingiWatch and compile. Tada! The complier has a warning for us.

Enumeration value 'ViewControllerModeEditingiWatch' not handled in switch

This pattern can be extremely helpful to make sure you are accounting for all needed behaviors. Please consider it next time you are working with enum. Thanks!

Setup Bots Status as a Screensaver

It’s time to turn off that family photo screensaver and switch to something that’s important, CI status screens!

Bots Big Screen

First up you’ll need this screensaver (or something similar), which can be configured to load a single or multiple websites up as a screensaver.

https://github.com/liquidx/webviewscreensaver

Sadly the screensaver bundle is not developer signed so if you are bit paranoid consider downloading, inspecting and building the thing from source. Or you could be like me and hit run inside of Security after the initial “can’t run, not signed” dialogue.

Next you’ll need some URLs. I run both Xcode Bots and Jenkins off my Mac mini named GLaDOS and for those you’ll want URLs like:

http://glados.local/xcode/bigscreen

http://glados.local:8080/view/Monitor/

For Jenkins I’m currently using the Build Monitor Plugin which is pretty basic but a nice start.

Here’s to hoping all your returns from coffee breaks are bathed in green and passing tests.