TechWorkRamblings

by Mike Kalvas

202204272326 Write less code

You should strive to write as little code as possible. This means we spend the extra time to refactor, rename, and rework our code to be the most concise — yet still simple and easily understood — solution possible.

We should also weigh the cost of adding new code, solutions, integrations, or infrastructure. Once added, we need to support it, maintain it, change it, secure it, and all the other things that come along with that. The only way to avoid all these costs is to not build it in the first place. Be explicit about our choice to take on these costs.

Note that there's an incorrect way to interpret this. We are explicitly not advocating for code golfing since that goes against the 202203221620 The golden rule of programming to keep things simple. Obfuscating or adjusting the solution to be more esoteric since it can be expressed in fewer characters misses the point entirely.