Nordic Game Jam 2015

15 Feb 2015

Workflow example

Life is more fun if you play games

-- Roald Dahl

Games are fun to play but also fun to make. This past weekend I attended my second game jam, Nordic Game Jam 2015. If you're not familiar with Game Jams it is an event in which you invent, design and build a game in a short time (usually 48 hours). I last attended in 2013 where we made a pretty awesome local two-player arena style game with doctor gone mad called Buddy Builder. This year we created local four-player fighting game with robots shooting lasers called Super Laser Robots.

The Tech

For this years game we decided to go with a familiar language that we really like. What better choice than Swift. This choice also gave us a ready make excuse to try out "new" and interesting SpriteKit.

Swift has over the the last ~8 months since its introduction become more and more stable. It is already to the point where it is the primary language in all our new ventures at Robocat. Even though the language is pretty stable and has cool shiny new features its toolchain still suffer. We decided before starting JAM to count crashes and issues with Xcode and Swift.

The results was as follows:

  • SourceKit crashes: 58
  • Xcode crashes/beachballs: 7
  • Swift compiler seg. faults: 2

Had the JAM taken place just a few months earlier prior to Xcode 6.1, the numbers would have significantly worse. The Swift compiler still has some pretty rough edges. One of the segfaults stems we got arises when trying to compare a value agains an enum case:

This is some pretty basic stuff that pretty easily chokes up the compiler. Rumors are that the Swift 1.2 beta solves most of these obnoxious errors though there are many left.

For all the bad things said about Swift here I could say at least twice as many lovely things. I'll focus on one positive. One of our team members had never written any Swift code, and is primarily concerned with backend development in languages like Python and Rust. He was able to pick up swift and start building code in only a few short hours and was very profficient before the weekend ended. Say what you will, but I think the learning could would have been significantly steeper if it had been Objective-C.

The Game

The actual resulting game was not overall great to play but we had so much fun building. The music and sounds were beyond awesome, the graphics were great and our idea was interesting. In the end we just didn't have enough time to get the game mechanics to work just right. The game came down to who smashes the key fastest to kill the other opponents.

We had fun building our game and we learned a lot about building games with SpriteKit. You can find the game here or find the code on GitHub.

My favorite iOS Keyboard: Kaomoji

14 Oct 2014

iOS 8 is finally out and everyone and their moms are making custom iOS keyboards to sell on the app store. Even me, yes. I have tried pretty much every keyboard available but have only found one that I truly love.

Kaomoji Kaomoji

Today my friend, and colleague at Robocat, Ulrik released his latest creation Kaomoji. Kaomoji is an custom iOS Keyboard that let's you quickly browse and send kaomoji (e.g. japanese text emoticons) to all your friends. The keyboard also let's you build your own kaomoji from scratch with a fun interface. The app is beautifully designed and feels very native for something that his very different from an Apple keyboard.

In full disclosure I had the pleasure of making the website for Kaomoji which means I am totally biased. But everyone should check out Kaomoji. It's free on the App Store.

A workflow for scaling retina assets

07 Oct 2014

Yesterday I published a small Automator workflow for OS X that I use to generate @2x and @1x scaled versions of my @3x assets. Apparently it generated a bit of fuzz on twitter, so I thought it might be worth posting here too.

I have been using this workflow for ages for downscaling @2x assets to @1x. It only made sense to update the workflow for @3x assets and share it with other lazy developers who hate manual work as much as me.

Workflow example

You can get the workflow right here:

Unretina Workflow


As pointed out by several people on Twitter it is not the ideal solution to downscale image assets for iOS apps. The ideal solution is to use vector images in PDF files that Xcode can automatically upscale without artifacts. It is however often not possible to generate vector graphics for all parts of an app which is why I use this script for those assets.

The state of testing iOS apps

24 Apr 2014

I've been spending more and more time researching and thinking about testing apps in the past few months. At the university they teach you that testing (in particular Unit Testing) is an integral part of the development process that you must not skip. I've heard from many fellow students that they use testing rogoursley in their development jobs using C#, Java, etc. This is far from my experience writing iOS Apps. You can practically see the tumbleweeds crossing the testing dessert in Objective-C land.

Almost all fellow iOS developers I talk to about this are outright dismissive of the idea that testing is important. "Just write code that works", they say. This is not the kind of development culture I pride myself of being part of. With that said, let's look at the resources and tools that are availble to us.

Apple made a huge push toward testing with their release of Xcode 5 with the better integration for testing. They introduced XCTest which is their own clone of SenTestingKit and Xcode Bots for Continous Integration practices. Using these tools you can actually get very far with testing since everything you need to get started is baked right into your standard installation of Xcode.

"Alright, so I have the tools. How do I get started then?". Well, this is where I'm at a loss. In my research I have only managed to find one single book about testing as it relates to Objective-C which is Test-Driven iOS Development by Graham Lee. The book itself is pretty good but after reading it cover to cover I still feel like there is much more to be said about testing iOS apps.

Where I really started to catch on to how I approach testing is when I discovered all the great material produced by Jon Reid. Jon has a series of great posts with video tutorials about how to test-drive your MVC structure. But where things really clicked is when I watched his talk at MCE 2014 about Test-Driven Development for iOS. I embeded it below

If you have found any good resources I would love to hear about them! Catch me on Twitter.

Podcasts for Cocoa Developers

01 Apr 2014

As any good Copenhagen citizen I commute to and from work/university on my bike which adds up to an average 22 km per day (that's 13 miles for you americans). This gives me a great excuse and opportunity to listen to podcasts. I subscribe to a total of 29 podcasts, which seems like a lot but is really not with 10 hours of commute every week.

If you're a iOS/OS X developer this a golden time in the podcast area. There is so much greatly produced content out there. Here I present in descending order the list of my favourite development or technology related podcasts:

1. Build Phase
This is my new favourite podcast that I look forward to all week. I listen to it as soon as I get the notification! It is hosted by Mark Adams and Gordon Fontenot who are both Cocoa developers at thoughtbot. The show sticks to pretty much one topic each week and give great insights into iOS development subjects.

2. The Record
Currently in its first season the show is dedicated to tell the story of developers in Seattle before the launch of the iPhone in 2007 and how it changed the development scene. This show has already (now by its 7th episode) many great developers onboard. Each episode a new developer is interviewed about their history in development. This is a great show if for nothing else, nostalgia.

3. Debug
Hosted by infamous Rene Ritche and Guy English this is another show that interviews cool developers in the Cocoa development community and discuss history and timely topics.

4. Edge Cases
I recently started listening to this show and currently in the processes of listening through the backlog of 80 episodes. In this show Andrew Pontious and Wolf Rentzsch discuss timeless topics in Cocoa development and how to how to solve difficult topics.

5. Notification Center
Formed as a casual conversation between Ash Furrow and Top Copley this shows touch on timely topics. The show is very casual end very enjoyable.

6. Accidental Tech Podcast
If you haven't heard about ATP by now you must be living under a rock. Staring John Siracusa (long known for Hypercritical), Marco Arment (known for his blog; formerly of Instapaper, Tumblr and The Magazine) and Casey Liss (known for.. Who the hell is casey?). This show is always a hoot and a half to listen to. Mostly the topics surround Apple and technology but other subjects have included Software Methodologies and Sexism in the tech world.

7. Core Intuition
There is something profoundly funny about listening to Daniel Jalkut (aKa. Daniel Punkass) ranting about stuff with his buddy Manton Reece. This podcasts mostly covers the world of indie software development and Apple related news.

8. Springboard
In this podcast Ash Furrow (who also co-hosts Notification Center) interviews developers in the Mac and iOS community while focusing on new developers entering the field.

9. Developing Perspective
David Smith (aKa. underscore) takes a refreshing look at various topics in developing apps for the iOS platform. Each podcast is under 15 minutes and always gives great food for thought.

10. iPhreaks Show
This podcast is the most recent addition to my many subscriptions and I have only managed to listen to a few episodes so far. This show is also based on interviewing developers and discussing interesting development topics in Cocoa. I can warmly recommend their episodes on Concurrency with Jeff Kellyey and 64-bit with Mike Ash.

Some of these podcasts are very topical and touch on may different and interesting subjects and try to give some insights. Others are interview based where they focus more on the historical aspects of technology and development. Either way I find that each of these shows are definitely worth listening to.

I also listen to some non-development related podcasts and here are my favourite ones:

If you have some suggestions for good podcasts on your own I'd love to hear about them!

For the ones who haven't quite settled on a preferred podcast client you should try Castro. Its elegantly designed, simple and it works every time!.