Developers are Authors


This is truly a concept that has only dawned on me recently – in fact, probably within the past day or two.  The ironic part about this, I’ve actually considered myself an author for the past 3 years, since the release of my first book.  And most developers I meet or work with seem to have the same reaction when I tell them, “Oh you’re an author, that’s pretty cool.”  When in fact – as the title states – all developers are authors, including you!  Now let me tell you why.

As I stated at the start of the article, this is really new information to me, but has had a really strong impact on the way I think.  Firstly, I cannot take any credit for this statement as I read it in a book.  If you follow me on Twitter, you will know that the name of the book is Clean Code by Robert C. Martin – the initiator of agile software development and extreme programming.

In this book – more importantly – in the first chapter! Uncle Bob (his well-known nickname), re-enforces this factor with something we’ve probably use many times each day, JavaDoc or PHPDoc or XMLDoc.  There is a tag called: [code]@author[/code]

Of course!  This is starting to seem obvious now, but before I simply treated this as “the creator of the file” – very different meanings.

After putting two-and-two together, here is how I interpret this, as the author of the code it is very much like writing a story.  Think back to college, high school, probably even elementary school – in your language classes you studied how to formulate good sentences.  You were graded on if your story contained run-on sentences, incorrect grammar, etc…

Why should this be any different for code?

If your if statement is too long, this should be treated like a run-on sentence.  Clearly you are trying to accomplish too much in this single line of code.  Perhaps it should be split into multiple sentences or in coding terms, one function per condition.

As I am writing this article, I’m constantly stopping and re-reading what I just wrote.  Does this make sense?  Should I reword this paragraph?  Are the paragraphs in an order that makes sense?  Everything about “writing” applies to code as well.  And FYI, I do not claim to be the best writer, nor do I claim to the best developer, but!  I do care about trying, I try to write a good article, I try to write good code as well.  But I’m constantly learning new ways to express myself, both in English and in code.

Whether its future you or a colleague or some stranger reading your blog, they are the intended audience for your code – so make it readable – as every developer is an author!

Other useful articles

About the author

By Jamie

My Books