Reading the Classics in Swift

How to read old stuff in funny languages without going insane.

Joe Susnick
3 min readApr 23, 2018

What are the classics?

Before we start: by classics here I’m referring mostly to influential works by programmers like the Gang of Four, Kent Beck, Martin Fowler, Uncle Bob, Michael Feathers, Andrew Hunt and David Thomas. This is obviously an abridged list, there is a wealth of great writing about programming out there but I consider these to be the ‘must-reads’.

Why should I read the classics?

As a mobile developer, it can be hard to reconcile the fact that some of the best writing on programming predates the devices we program for. Programming appears to be changing faster than it is. New frameworks, new languages, new databases, etc… This is fantastic and makes it a fun and exciting field, but the fundamentals have not changed as much as we like to think.

Why it took me seven years to get around to reading the classics?

I started teaching myself to program seven years ago. (Bear with me. I promise this won’t be yet another self-gratifying ‘I learned programming at night and you can too’ articles). I started out in Automated QA, writing test scripts in Ruby, and the first three years of my career were a desperate struggle to keep my head above water while I absorbed anything and everything I could. It didn’t seem worth investing spare time or energy into read the classics of programming while I was struggling to learn the basics of programming.

In addition to the problems of time, brain capacity, and lack of experience, there was the fact that most of these books utilize examples that are written either in Java or a C-based language. As a developer just starting out and without a formal computer science background¹, it was beyond my skill level to translate the classics.

This was frustrating for me. It was like being told that there was a wealth of knowledge and experience out there but only if I could learn to read it in the original greek.

Why are you telling me all this?

So to start off, if you have not purchased the book Refactoring: Improving the Design of Existing Code by Martin Fowler, go do that. I started reading it the other day and realized that it was going to be a bit of work to genuinely understand it.

I have trouble absorbing a new concept and a new language at the same time.

I found it easier to translate the examples into Swift as I went and treated the book like a code-along. So far I’ve only pushed the first chapter but plan on pushing the rest of the examples as I complete them. This is mostly just fun for me but also I hope that this excellent piece of work a little more accessible to someone who traffics mostly in Swift.

You won’t get much out of this repository without also buying the book. It only scratches the surface of what that book has to offer. It is worth every penny.

Also please comment on the repo and let me know if you’ve encountered similar attempts to translate the classics.

Thanks!

[1] This is where I assume everyone learns C since I never hear about anyone working with it in the real world… (Update: My cousin, a Phd student in natural language processing has informed me that people use C all the time and that it is a great language that is still used by people who demand performance and that I should leave C alone. Fair enough.)

--

--