How computer code can improve your writing

Gcode.gif

Pete Cornes / 2011

As a writer, more and more of my words are published online. The more I work with web developers and designers, the more I see of the dark arts of coding. And do you know what? Writing code is just the same as writing words.

Developers and writers are doing the same things – the only difference is that while I want to communicate clearly to my reader, my developer is communicating with a web browser. Either way, we’re both using language to create specific outcomes.

Not convinced? Well, let me give you a few things that a good writer can learn from their web developer:

1. Know your outcomes

When a developer starts writing a piece of code, they’ll always have an outcome in mind.

They might be adding a sign-up box to capture email addresses. They might be adding more navigation links to a site’s navigation. They might be changing fonts and layout. They’ll know exactly what they want their code to do before they start writing that first line.

It’s the same for a writer – you need to know why you’re writing. Are you sharing information, or encouraging people to act? What exactly do you want them to take away? How are they going to do it? So for an email newsletter, your outcome might be clickthroughs to a specific news article. Once you know, you can start thinking about what to say.

2. Everything needs a purpose

Every single line of code, every single tag, should do something.

It’s all too easy to lose sight of that on a long-running project, though. There might be leftover code from previous versions, or hidden functionality that you’re not using. A good developer will keep this to the minimum, and keep their code lean.

It’s the same with writing – especially with big projects like annual reports or websites. As you refine your messages, you realise there are certain things you don’t need to say any more. To keep the writing – and the thinking – clear, you must edit ruthlessly, and ensure that every single word has a strong purpose.

3. Separate content from presentation

Individual web pages don’t carry any information about how they should look – they just hold the content. No colours, no font types, no background images – in fact, not much more than the words. All this data’s stored in another file, a ‘style sheet’, and linked to the web page. A savvy developer knows how the two work together, and keeping them separate makes it easier to get things right.

It’s similar to putting your words into design. Writing means concentrating on the content first, and then working with your designer to present them properly. So take a cue from programmers and put together your first draft in a simple text editor like notepad. Only having to worry about the words can be liberating, and soon shows up any weaknesses that you might paper over with bold type, headings and italics.

4. Get the order right

Information flows best with a clear order. And unless you’ve got a very good reason, that means the most important stuff comes first and then the details follow.

In HTML, information needs to follow a particular hierarchy. Get it wrong and your site won’t work – it either won’t render properly, or the search engines will ignore it.

It’s the same for writers – if you’re not up-front with what’s important, people won’t read it. Make it easy to grasp your message from the start, and then follow it up with the specifics.

While HTML markup might be an unusual place to look for inspiration, there are more than a handful of similarities.

Pete Cornes