The best kind of code
“The best kind of code is the code you don’t have to write”. I first came across this interesting quote after watching an amazing Amazon Web Services (AWS) Cloud Developer Kit (CDK) demo on YouTube, delivered by the very engaging Martin Beeby. Reflecting on this statement caused me to sit back and think about just how good the current tools are right now in the area of software development. Things like Docker, Kubernetes, Terraform and the multitude of different offerings from the major cloud providers has meant that by standing on the shoulders of giants it really has never been easier to get started. What’s more, many of the services and tools available can help abstract away a lot of the complexity, especially from a networking and infrastructure perspective.
If we look at things from the perspective of cloud and DevOps, Infrastructure as Code (IaC) tools like Terraform have rapidly transformed how software engineers build, deploy and manage applications and the underlying infrastructure. The benefits of immutability and repeatability cannot be understated and once you get your head around the syntax of these tools you can do some really powerful things and nearly always in fewer lines of code.
Despite all of the important positives, I think that the enhanced level of abstraction provided by these tools can also pose a challenge. By hiding away a significant portion of the complexity, in many cases you can get away without actually appreciating how it all works until you have a failed build or run into a bug. That abstraction that was once your friend is now your worst enemy and you quickly realise that you probably need to spend some time learning about the underlying software if you are going to have any chance of understanding the solution posted on Stack Overflow or GitHub. I’ve definitely been guilty of playing with code that I don’t understand, especially as someone in their early days as a software engineer but I am working hard to build a solid foundation. Reading books around things like networking, data structures, algorithms and diving into the documentation for a new service/API before implementing it has really made a difference.
On reflection, I definitely believe there is merit to the argument that the best kind of code is the code you don’t have to write. To take it one step further, I think the best kind of code is the code you don’t have to write but that you actually understand.