High Quality Code: It’s all in the details.

Over the years, I have worked with developers of all skill levels. And I have been a developer of many skill levels; from the non-developer rolling out barely-functional code to solve some pressing business problem, to the high-end experts who often seem to do no wrong. [I like to think that my quality/skill curve is continuously on the rise]
And over those same years, I’ve come to notice in certain talented developers, a particular quality, or perhaps it is a particular ability to focus and mentally sort the wheat from the chaff, spot that “needle in the haystack”, or simply quickly identify a likely cause (nor or at some point in the future) of software faults.

That quality is simply this; a high attention to detail. Whether it be a thorough commit message (i.e; something more informative than “fixed bug” or “WIP”), or an ability to quickly and accurately identify patterns in a problem or some code. These folks don’t just know what they are doing, they make sure they keep doing it. Attention to detail is the cornerstone of good process, and quality code. It is not;

  • Clicking madly through dozens of still-open windows to look for something you were working on this morning
  • Solving the ‘bug’ in its most literal reported sense, without considering wider ramifications or other likely symptoms of the fault
  • Leaving no information for your peers, or future self, to help understand why you made a particular change
  • Marking a bug or ticket as ‘resolved’, ‘fixed’ or ‘done’ without actually checking that it is fixed
  • Creating branches from whichever commit happens to be top of the current window
  • “Accidentally” committing changes that should never have seen the light of day (and doing this repeatedly)

I believe anyone with the drive and motivation can become a great developer, but without paying attention to what you are doing, and attempting to understand it, you will continue to founder, and potentially create more problems than you solve. Perhaps part of this is about slowing down; take a breath, and ensure that you didn’t just “get it done” but that you got it done right. In my book, 1 bug fixed correctly is better for everyone than 5 bugs which were incompletely resolved, or resolved in a way that just spawned new faults.

The most important thing to take away here is that whilst some people simply have some genetic or emotional makeup which makes them more likely to have an attention to detail, this very important skill can and should be learned. I have often seen the same symptoms in developers who do not seem to have the same attention to detail that makes a developer great. These often include;

  • Poor development habits – no repeatable actions in their daily work ;
  • Rushing to meet (real or perceived) deadlines, whilst failing to recognise that the mess you leave behind now will haunt you (and your testers, users & managers) tenfold in the future, and only exacerbate whatever deadline problems you are now experiencing;
  • Poor understanding of developer tools; (I have lost count a hundred times over of the number of bugs which would have been avoided by a developer simply paying attention to the inline code warnings from ReSharper);
  • Failure to write even the simplest of tests to validate the code;

Anyone can become great with the right motivation, and the right habits.

The only characteristic which cannot be externally overcome is a lack of desire to learn.

[As a controversial aside, a completely subjective comparison of dozens of past developer colleagues and acquaintances has led me to also conclude that attention to detail falls in direct proportion to the amount of mouse usage. A developer who relies on the mouse to perform tasks as trivial as a copy-paste, does in my experience, generally correspond to a low attention to detail, and a high bug count. Discuss.]

Leave a Reply