Writing Software
I write software by day and fiction by night (or at least later in the day). People have asked me if there was some kind of overlap there and that got me thinking about some of the lessons I learned about writing prose and if they could be applied to writing code as well. Here’s a short list of things I came up with that I think are applicable to both fields (with a bit of imagination).
Writing is performance — Brandon Sanderson
Brandon Sanderson is one of my favourite writers and the only reason I haven’t read all his stuff is that he just writes so damn much. How he has time to teach writing as well, I don’t know (plus he has an awesome podcast about — you guessed it — writing). But I spent some time looking at the videos of his lectures and the first thing I picked up was the above quote (video and transcription).
It’s a weird way of looking at writing. It’s easy to distinguish the art-forms where you’re consuming a performance (a concert, a play) from those where you don’t (an album, a movie). Books would fall into the second category. But just because people don’t have direct access to the performance, doesn’t mean there isn’t one.
The way Sanderson believes writing is important is that it takes skill and this skill is honed by practice. I think the same is true for writing code. When you’re well versed in it, it becomes easier. And the best way to become well versed is by doing it. The best way to learn to code is not just by reading books, but by getting your hands dirty. Sure, you’ll make mistakes (I’ll get to that), but it takes practice and training to get better.
Get Tom Kruijsen’s stories in your inbox
Join Medium for free to get updates from this writer.
I like interpreting the performance of writing in a different way as well. The moment in which you’re writing is important. Your state of mind affects how you write. This in turns affects the quality and finally the end product of what you’re making. In software this trickles down all the way into the joy a user has when using it. A happy developer who’s on top of his game is more likely to write maintainable software, which will lead to faster bug fixes and more easily developed new features for a user to enjoy. Optimising for developer happiness isn’t a luxury if you look at it like this. It means you’re optimising for the best user experience as well.
If you don’t have the time to read, you don’t have the time to write — Stephen King
I think there’s a couple of things at play in this classic quote. The first is that stories are never written in a vacuum. The more you stay in touch with what is current, the more you are able to write something that is relevant and engaging. This goes for stories as well as applications. Software development is a rapidly moving field and cool new things pop up really often. The state of front-end web development has been in flux for the last years for instance, and if you ignore what’s happening in the open source community, you get hopelessly behind in the blink of a WiFi status indicator.
Secondly observing what’s around you is a great learning tool. One of the best way to learn composing stories is to look at what worked for others. If you translate this to code, you can get started at Github. It is great for allowing you to see what other people are doing in the open source world. Pull request workflows force you to look at other people’s code and allows you to ask why they solve a problem in a certain way or make you think about why you would do it differently. There are tons of videos and slide decks of talks about programming. Give yourself the time to explore all of this and become a better
Allow yourself to suck — Everyone
If there’s one piece of writing advice that keeps coming back, it’s this one. And that’s only because it makes total sense. If you want to push your boundaries, you have to do things you’ve never done before. You’re going to suck at those things, that’s ok.
The cool thing about writing (both code and prose) is that you can always go back and improve it. In fact, that’s what you’re supposed to do. Refactoring code that works is a great way to learn and improve. And it ties in with being a good performer. Your first pass is your rehearsal and then you start finetuning it. As soon as you accept that you’ll make mistakes, it makes sense to just dive in and practice. Your first iteration isn’t going to be the final one anyway.
The result of writing a story might be completely different from committing to a repository, but there are definitely ways of thinking that apply to both fields. Why limit ourselves to what smart programmers have said if we can look at what great writers have to teach? Go out and write better software.








