Code Health: Styles and Conventions

As a software developer we spend much, if not all, of our day in front of our computer screens reading code. Notice I said “reading” code and not “writing” code. This certainly varies from day to day, but in general, I spend much more time reading through our codebase than I do actually making changes.

For me, this stems from a saying my dad used to share with me “Measure twice, and cut once”. To understand how a potential change is going to fit into the existing code base, I have to understand what the existing code does and how it works.

If it’s easier to understand my code, it’s easier to find errors. It’s also then easier, and faster, to fix those errors. Less time fixing bugs leaves more time for adding features to my project and therefore value to the end user. The point I’m trying to make is that having clean, consistent, easy-to-read code can have a significant positive impact on a project.

Continue reading