A Simple, Tiny Flashcard App In Swift

I had to read out my post code to someone on the phone recently and the conversation went something like this:

Me: FO0 8AR

Her: Was that F for ferret or S for sierra?

Me: Ferret

Her: OK, so that’s FO0 8ER

Me: No, that’s AR

Her: AR0 ?

Me: facepalm

So I decided that it might be a good idea to finally learn the NATO phonetic alphabet. That’s Alfa Bravo Charlie all that jazz.

Instead of actually learning it like a normal person, I thought hang on maybe I can turn this into an opportunity. Maybe I can write a flashcard app for the iPhone to learn it.

And that longwinded story is how I build my first Swift app:

Flashcard App screenshot

I’ve had my eye on Swift for some time. I like it mostly because it means I don’t have to write Objective C, which is so ugly it makes me throw up a little bit in my mouth every time I have to look at it. Those square brackets… shudders.

Syntax jokes aside, I’m also a big fan of anything that allows me to write more code and less boilerplate, and Swift seems to fit the bill.

This app turned out to be super simple, the source code is here if you feel like checking it out.

It can even read the correct pronunciation out for you. And it worked - next time I have to read out a postcode or email address over the phone I’ll be prepared.