How to code a love letter to the next developer

By on
How to code a love letter to the next developer
Respect for your code, and for the next developer should be front of mind in all decision making.
Photo by ThisisEngineering RAEng on Unsplash

As the digital era has boomed, so too has the need for skilled coders and programmers in Australian businesses.

In fact, recent research from Indeed has found that programmers are one of the most in-demand jobs in Australia, accounting for one of the highest number of positions and the greatest growth potential. 

When it comes down to it though, writing code that other humans can understand is truly what differentiates the skill set of both jobs.  Through years of working across both startup and established projects, I’ve realised there is one overarching factor that a developer should consider when making decisions: clean coding. 

While this may seem overly simplistic, it has the ability to influence the whole lifespan of a project and its outcomes. What defines a project as successful often comes down to the notion of maximising value to the business. So, how can your businesses’ code maximise its value? Here, I delve into how  reliable and adaptable code can be achieved.

Write and delete, then repeat  

Yevgeniy Brikman, co-founder of Gruntwork, previously provided a streamlining method that I utilise widely. His  10 to one rule argues that for every line of code currently in the master branch, 10 lines will have been written and deleted. By revising your code under this principle, it will be reliable, readable and primed to be quickly optimised. For many small businesses and startups, this is more valuable than achieving a state of ‘mature code’, which often involves long and uninterrupted periods of constant development and maintenance. 

As an example, at AgriWebb,  we have 1,412,670 lines of code across all our key repositories but have written 11,261,374 in total. This results in a code churn ratio of eight to one. By all rules this code is not mature, however, it’s completely functional in its current state, providing true value to the business. What’s important to note is that different aspects of the business will have code in various states of maturity but what defines their value is their ability to react and adapt with clean code. Undeniably this approach to coding will take more time initially but investing your time into clean coding will set your work up for long term success. 

Writing a love letter 

For developers, thinking of code as a love letter to the next team member, even if you’re the only one, helps to maintain a coding standard across the board and enables you to iterate quickly. It creates a codebase primed for maintainability that you can develop on quickly and to respond to an issue or business opportunity. It acts under the ‘slow is smooth, smooth is fast' proverb, helping to optimise the whole, rather than rushing the immediate task and slowing down the overall process. 

This does not mean your coding must be perfect though. In fact, accepting that your version one product is likely to be wrong is the first step towards maximising business value. What will achieve reliability, adaptability and add value is coding that is streamlined. This should be at the heart of all decisions and trade offs made by a developer to ensure success and value in both the short and long term. 

Ultimately, there’s never going to be one solution for all the issues that come with coding but the key takeaway is that respect for your code, and for the next developer should be front of mind in all decision making. This respect, or treating your code as a love letter, will provide strength of performance, reliability and adaptability. In doing this, your code and project will be given the best setup for success. 

David Horne is AgriWebb's Chief Technology Officer.

Copyright © BIT (Business IT). All rights reserved.

Most Read Articles


What would you like to see more of on BiT?
How To's
Photo Galleries
View poll archive

Log In

  |  Forgot your password?