When writing, optimise the algorithm not the code


Back when I used to be a programmer, I quickly learned that you could get a much bigger performance boost by changing the algorithm – the underlying structure of the code and data – than by optimising the code.

For example, you could rewrite an inner loop in assembler rather than C and get a 20% speed-up but it would take a lot of work and be difficult to maintain. Changing the way you did it, for example, using a more efficient sort algorithm or a smarter data structure would produce a 100% speed-up. It would also be easier to support, comment, bug fix and update.

Similarly, if you dropped a feature, you could drop the code for that feature. Non-existent code doesn’t crash, doesn’t require testing, doesn’t need a manual, doesn’t need comments or maintenance. In fact, non-existent code is the best code there is. It forces you to focus on the stuff that makes the game fun rather than the code that adds unnecessary or distracting features.

It’s the same today with writing:

  • Put your effort on the most important points and delete the rest.
  • Change the way you structure a piece before you start trying to polish individual sentences.
  • To reduce word count, cut paragraphs first, then sentences and only then cut words.
  • Don’t chase features. Chase meaning.
30 Days to Better Business Writing
Get free email updates whenever we publish new posts on Bad Language.

No spam. Just essential marketing insights.

Sign up today and we'll send you a free copy of '30 Days to Better Business Writing' too.

, , ,

9 Responses to When writing, optimise the algorithm not the code

  1. SM Schmidt says:

    Your point about how blissful non-existent code can be when trying to improve the work spoke volumes for me.

  2. Dean Rieck says:

    Brilliant. This is the single smartest thing I’ve read all day. Work from big to small. I’ve always believed that what you say is more important than how you say it (an idea I stole from Ogilvy), and this post says that nicely.

  3. Matthew, this is a brilliant peace of advice, thanks for that!
    “The non-existent code”, worth putting on my ‘wall of inspiration’ at my workplace. It’s up there now! Might save me a lot of trouble & explaining…

    • @Hugo. I’m glad you like it. It really is one of the most useful things I learned from my programming days. If in doubt, leave it out! Radical simplicity works for so many other areas of life but most geeks, gamers and ‘experts’ think that ‘more is better.’ Even the saying ‘less is more’ reveals the same false assumption. It would be more accurate to say ‘less is better’.

  4. Galina says:

    Hi Matthew,
    could you advise me if there are average prices in UK on rewriting content for web-sites (let’s say an agricultural company has facts on which it wants to build creative and emotional text). And how are those prices usually calculated (per syllable, page, etc.)? Thank you very much in advance.

    • There’s a ‘rate for the job’ page on the NUJ website but that’s mainly for journalism. I don’t know so much about web content. Perhaps a Google search might find something – let me know if you find anything useful.

Leave a Reply