by Jonathan Rothwell

[LINK] Adventures in Swift: a first (trivial) app

My logical first step when learning Cocoa, and the new Swift programming language, was to begin with Apple’s ‘tutorial’ for Cocoa, a very simple Mac app that consists of a slider and nothing else.

That tutorial doesn’t have a Swift equivalent yet (and even if it did, it would almost certainly be under NDA.) The good news is that, at least in an app like this, Swift literally is a drop-in replacement for Objective-C. I didn’t have to write a line of Objective-C1 nor use bridgeToObjectiveC().

I’ve published my implementation on GitHub. Although I had a few stumbling blocks (mainly because I hadn’t read the documentation on optionals properly) the process of writing the baby slider app was mostly pain-free.

  1. This is just as well, since Objective-C has been the thing putting me off Cocoa development for a very long time.

It's been quiet round here

Hello. I haven’t been posting here much lately, partly because of things happening in real life, but mainly through my own laziness. Two months seems like a good time to break the silence with an update on this blog and my boring life.

My industrial placement has finished, and I’m no longer at ServiceNow. It’s been a great learning experience, if nothing else to prove to myself that I can do software development for a living: I’ve managed to survive fifty weeks as a professional programmer and haven’t been driven to drink, so that counts for something! If you’re a student offered the chance to do an internship as an industrial placement or sandwich year, then do it. I’ve found it an exceptionally valuable experience.

I’ve been meaning to give this place more attention lately, and given that I am now a man of leisure (besides possible piecemeal work) until September, that might actually happen. For instance, I’ve been meaning to tweak this blog’s styling for a little while, but given that Octopress 3.0 is perpetually just around the corner, I haven’t got round to it. That might change soon.

I said I’d look into providing some resiliency against situations like the Great File Server Failure of 2014. At present it’s looking unlikely that it’ll be anything more sophisticated than a mirror of this site on a different web host at a different URL, but it should work, at least. Watch this space.

The Doctor Who guide needs some attention, because (for the first time since its inception) we have a new Doctor, and possibly new companions coming in at the start of the new series in August. The ‘quickest way in’ in particular needs trimming down, so expect changes here.

Those more eagle-eyed amongst you will have noticed that despite promising myself last year that I would write one short story every week and publish it on this site, that petered out after around four stories in three months. There is a very simple reason for this: the next story, an idea springing from an overheard conversation on a train to Birmingham, grew out of hand pretty quickly. Having written ten thousand words and not gotten anywhere near the climax, I realised that the idea had legs, abandoned my existing draft and began planning a novel around it.

I managed just over 55,000 words of a ‘not-really-first’ draft as part of NaNoWriMo last year. I’m currently planning another one. It may never be properly finished, and I’m not anywhere near deciding how I’m going to release it to the public, but it is going. Hopefully I should be able to write a few more shorts whilst this is ongoing, but I did promise myself that it would be ‘scheduled fun’—and speaking personally, if writing becomes a chore to the point where it’s no longer fun, it takes me less than ten seconds to hit Save and start playing a video game instead.

This brings me onto the sort of stuff I expect I’ll be posting here in the next few weeks. I recently bought a PlayStation 4, and so you can possibly expect reviews and overthought analysis of video games. I’ve also resolved that I’ll take the opportunity presented by the launch of Swift to (finally) learn Cocoa over the summer. Who knows… I might even get around to writing up some technical articles!

Goodbye, WordPress posts

After over of two years of concurrent websites, one hosted with lovely static Octopress and the other with the lovely dynamic WordPress, a few nights ago I shut down the MySQL instance hosting the old website.

I’ve looked at various migration strategies, but would not be comfortable with implementing any until I have moved this site to the incoming Octopress 3.0. This will break links, for which I can only apologise—it was simply no longer viable, nor sensible, to be paying for the hosting an increasingly-vulnerable PHP application as well as the ‘new’ site.

I still hope to move some posts in the future, but for now, the old posts from will only exist where cached or archived elsewhere on the Web. The old URL now points here.

[LINK] Downtime post-mortem

If you tried to access this site around this time last week, you’ll have been greeted with this error message:

The web host have a good write up of the incident, caused by a hardware failure following the file server being kicked.

The good news is that the hardware is on order to get these single points of failure out of their infrastructure. I’m also looking at alternates for situations like this myself, although naturally I can’t promise anything—the site is hosted at my own expense, so I can’t exactly justify splashing out on an intricate failover system.

[LINK] Realtime Trains for iPhone

I’ve been helping with the testing process for Realtime Trains for iOS for the last few months, and the level of fit and finish in the final product is superb. I’ve certainly found the predictions to be much more accurate than National Rail Enquiries’ own application—and the ‘approaching/arriving/here’ indicator is a godsend for me, because I now know when to run in the evenings!