On Debugging
Whenever you join a new company, team, or even project, the first onboarding tasks you get assigned are usually bugs, and for a good reason. This is the easiest way of giving you a task that is clear, small, isolated, finite, and rewarding. Also, usually it is a task no one wanted to do for a long time.
A big part of debugging is educational. To effectively fix a bug, you need to understand what’s going wrong and find a way to make it right. You observe the system, you question every line, and you have to critically assess each operation. You see a result and check if it is what you expect to see. You know in advance that there is something wrong. Usually, something small; you just have to find exactly what. Like a detective investigating a misterious murder looking for evidence, although often you’re also the murderer.
When a bug is not reproduced, you ask yourself why. You’re trying to imagine what could differ in the user’s setup from yours. OS? Browser version? Extension? Cache? Slow network? Has the bug been unknowingly fixed? You broaden your perspective; you get to understand a user better.
You end up asking other people for help, getting to know them, and learning from them. Like in a good adventure story where the hero goes for a risky pursuit of a reward and comes back a different person, not because of what he’s achieved but because of what he went through and whom he met along the way.
A bug is an existing, real problem, and usually if it gets prioritized, someone has actually complained about it, or the team is confident that someone eventually will. There is something that was supposed to work but doesn’t. It means that, unlike in a feature or product development, a bugfix is guaranteed to bring at least some value, given that the overall product provides a solution to some real-world problem, however small.
A good fix makes sure the bug never comes back. You write a test, or rename and extract entities, or add a comment that prevents the next developer from making the same mistake over again. By properly fixing a bug, you are not only improving the lives of your users but also of your colleagues.
Debugging often has this reputation of an unpleasant, dirty job that has to be done, and this is for a good reason too. Long, unsuccessful debugging sessions in solitude are draining and feel like a waste of time and effort. Collaborative debugging sessions rarely feel like waste, even if you don’t fix the issue in the end. Coincidentally, they tend to be more effective.
In the industry where everyone is being pushed to deliver more and faster, debugging is a good chance to step aside of the grind for a second and thoughtfully improve things because the world doesn’t always need more. Sometimes it just needs better.