Engineering topic: Less is more
I had a desktop wallpaper a while ago with a single quote, it read:
As a software developer, you are your own worst enemy. The sooner you realize that, the better off you'll be.
As developers, every line of code that we write increases the const of maintaining the project that the code is in. It doesn't matter how clean the code is, how well written it is, how much thought was put into it ahead of time or if it has been refactered: All code carries a debt that can only be paid in time.
The theme of this week's engineering essay: Use the least amount of code possible.
There are two major points that I want to touch on. The first is that writing code is almost always less costly than maintaining code when the currency is time. Each line of code increases application complexity and increases the learning cost (again, time) in understanding how it works. Following that logic, the larger the code base, the longer it takes people unfamiliar with it to learn how it works.
The next point is about how best practices and standards help shed some of that time by enforcing consistency and simplicity over large amounts of code.
When it comes to writing code, less is more.
- The more code you have, the more bugs you have.
- When writing new features, old code has to be adapted.
- When refractoring or adopting standards and best practices, old code has to be adapted.
- The more code you have, the longer checkouts take.
- The more code you have, the longer builds take.
- The more code you have, the longer it takes to process and understand it.
- The more code you have, the longer it takes to QA it.