r0nk
2 min readJun 4, 2020

Programming: Art Versus Survival

Do programmers even want to write good code?

Quality of code written is often assumed to be a matter of skill, rather then of motivation. Focus is usually put on how to explain the art of writing good code, rather then on finding out why bad code seems so persistent in the first place. In order to understand how to retain good code, we have to look at why bad code survives.

The external goals of a project generally revolve around a set of requirements and a competitive advantage. This competitive advantage can be new features added quickly, faster programs, or safety and lack of bugs. Good code according to these goals fulfills the requirements while maximizing the competitive advantage. The art of programming usually revolves around maximizing a few of these key themes.

On the other hand, the internal goal of a project, the goal of the people actually writing the code, is one thing in particular: survival. According to this goal, code is good when it fulfills the requirements while maximizing the amount of work to be done in the future. The survival of a job depends on that job never really being finished.

If programmers only solve problems without creating more, they will eventually find themselves out of problems to solve. Engineers typically get paid based on the quantity of engineering to be done, a resource that engineers can produce through bad code. Technical debt is a liability to the project, but a positive to the programmers to which the debt is owed.

In addition, obfuscated code offers a means of control. In a famous court case, “embrace extend extinguish” was the motto of Microsoft. Code obfuscation was key to taking over projects and stopping them. As a means of job security, obfuscation gives a first mover advantage. The more complex code is, the more power the individuals that understand it have.

We have to look at habits as creatures also trying to survive. If programmers with good habits eventually lose their jobs, and bad programmers with bad habits survive in the workplace, eventually the only habits that survive are bad habits. Programmers don’t even have to be conscious of the bad habits they are forming for those habits to be more likely to survive as time goes on. Even if the technical debt gets too large for one programmer to handle, they can then hire more programmers. Bad code even provides means for self propagation, a key step in evolving to survive.

In order for a project to maintain good code, incentives must also be considered in order to insure good code. Incentives have to be designed in order to outweigh the inherent incentives of bad code.