The benefits of good code

November 10th 2023




The benefits of good code are not immediately obvious, but I would argue they are utterly important to build a thriving and productive team.

The two benefits are the following: 1. Developer productivity, and 2. Developer happiness. Very closely related: a happy developer is usually a productive one, a productive one is usually a happy one.

Good code allows a developer to be more productive because it’s easier to develop new features, less bugs occur, less things break, the code is less complicated, and new feature development tends to be straightforward.

Good code makes a team happier because development is less stressful when the code is easy to deal with. Less time is spent on maintenance and bug fixing and paying off tech debt or building hacky workarounds. Tech debt incurs an extra mental burden on the developer which builds up over time and can cause burnout, ineffectiveness, and procrastination.

Take as an example my portfolio site. All files are in a single directory, no sub-directories. This works well for me - I don’t have to worry about where I put what. If I wanted to add a new page I know exactly how to do it. Easy, simple. Lowers the cognitive cost of development.