Go Swiftly

It’s been a while since I’ve done any dev besides the glorious-inglorious world of backend PHP web apps. So a weekend spent with Yosemite and Xcode yielded my first foray into Swift and a return to apps.

I’ve made a Mac app once before. It was a little status bar app for controlling Plex that crashed if you weren’t on wifi because I’d been too lazy to wrap it in a try/catch block. (Years before that I’d had a run of Windows programs, but they don’t count as code by any metric.)

Swift. It’s nice. Definitely a lot nicer than Objective-C, and I don’t mean because of the absence of square brackets. The idea of managing memory in 2015 seems strangely archaic, so it’s nice to see Apple embracing it even on iOS. Optionals and the type system will still take a while to sink in; I often found myself chucking in ? and !s to get something to work with no care towards their effects.

The app itself is another menubar app (no surprise there). It’s something I’ve wanted to make for a while, and they always say the best way to learn something is to scratch your own itch. The app loads a JSON file and turns it into a set of (nested) menus. You can associate any shell command with an item, which means I can open SSH sessions, launch Chrome or pause Plex from one place.

I’ve got to clean it up (and make it a bit more robust) but I’ll whack it on Github soon. It also means I have to update my own Air to 10.10 so I can get the latest Xcode and keep on working on it.

Speaking of which, Xcode is hands-down the worst IDE I’ve had the displeasure of using. Like seriously. Text selection, debugging, general shittiness. There is no redeeming feature. It even beats Eclipse for sucking all memory out of your system like an obese zombie in a shopping centre.