What Mr. Robot Teaches Us About Bugs

rodri-oliveira-dev

Rodrigo de Oliveira

Posted on January 24, 2024

What Mr. Robot Teaches Us About Bugs

Sometimes, we act as if bugs just appear in our code by themselves, but we all know that's not true. The errors in my code were written by me. I didn't mean to write them. I didn't want to write them. But I did anyway.

I remember when I first read Al Shalloway referring to a bug as 'code that he had written' and it struck me, I am the author of the bugs in my code. There was no one else to blame but myself.

Many teams accumulate bugs. Instead of listening to the message the bugs are telling us and fixing them as soon as they are found, they identify, track them, and tell themselves that one day they will get rid of them.

Good luck.

That number just grows and grows until there are so many bugs that it becomes unfeasible to fix, so we learn to live with most of them and the bugs drag the project down.

Bugs are often just the tip of the iceberg, they are the harbinger of something much worse to come, a warning sign that things are going wrong. We should pay attention to these warnings and not ignore them.

Some bugs hide very well, and finding them can often be the hardest part of getting rid of them. An old friend tells me that finding a bug in a large system is like being told there is a wrong word in a dictionary. Fixing a wrong word is easy, finding the wrong word can be time-consuming and tedious.

In the series Mr. Robot, in the episode 1.2_d3bug.mkv, Elliot says: 'Debugging isn't just about finding the bug. It's about understanding why the bug was there in the first place. Knowing that its existence was not accidental.'

I have been dealing with bugs for many years as a developer, but only recently started to see them for what they really are: flaws in my software development process.

And like insects, software bugs need the right conditions to breed. Bugs don't just happen, we let them happen.

But it doesn't have to be like this. Instead of accumulating bugs, we can recognize them for the messengers they are and heed their message to get back on track. Every bug is a missing test, a critical distinction we failed to realize. If we can see that, we can not only fix that bug but also prevent a whole series of bugs.

If we can see a bug for what it really is, then it becomes my teacher and we become its grateful students.

πŸ’– πŸ’ͺ πŸ™… 🚩
rodri-oliveira-dev
Rodrigo de Oliveira

Posted on January 24, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related