My friend Ashok and I attended Midi Hack this year in Berlin and decided to make a iPhone app with Objective-C. You can see the final outcome here: The Certified Organic, Vegan Sequetron 5000

Initially I didn’t make the connection between Objective-C and C, but came to realise Objective-C is essentially a layer on top of C that provides object-orientated functionality such as memory management. I have minimal experience with C and C++, but it was comforting that Objective-C wasn’t going to be a completely new language for me.

Ashok and I decided quite early on to split development between the backend (audio processing) and the frontend. At the end of the first 24 hours we met in the middle connecting the interface, and it just worked. It was such a great feeling!

It quickly became clear that there were a few niceties working with Javascript that I’ve taken for granted. Some of the biggest oddities that stood out to me in Objective-C were:

  • Nil terminating an array [1, 2, 3, 4, nil]
  • Having to use wrapper classes for primitives that added memory management for you. NSString instead of string, etc.
  • Odd syntax such as [dog bark] which calls the bark method on the dog object
  • The lack of debugging tools and not being able to inspect local variables while at a breakpoint. But perhaps I just wasn’t familiar with the tools.

There were also other aspects that gave me more insight into programming:

  • Using the xcode interface for programming UI interaction was very unique. Ashok said it felt like the UI helped you along a lot, not like eclipse or other bloated editors that make it feel too clunky.
  • The UI programming workflow was a lot different to CSS. Paddings and margins are used with constraints which was initially confusing. The tools were completely different than fiddling around in the chrome debugger.
  • It felt so good to be able to write terrible code. There just simply wasn’t enough time to read up and implement best practices. That combined with knowing we were essentially going to throw the app out after the hack day lead to a 30 minute copy and paste session. A small guilty pleasure.

Overall the event was really great. Amazingly organised, and tons of inspiring and passionate people to talk to. It was probably the first time I’ve managed to make an MVP and still have time on our hands. It was great to use that to focus on polish and jokes :)

At the end of the hack we both felt a bit guilty as we said we would make a launchpad and raspberry pi sequencer, but due to lack of organisation completely switched it up. Hopefully we’ll still be invited back next time :)