Don't fight bugs. Welcome them.

“I am done with this bug after spending my entire day trying to fix it”. Does it sound familiar? If that sounds like you, take a moment to learn how to overcome the issue.

It all starts from having the right mindset. In today’s post, we will go through some principles to help, as the saying goes, control your mind and don’t let it control you.

Bugs are inevitable. Reviewing the code and searching for a bug can take days with no luck. Or you can save time by accepting unknown unknowns and deploy the code sooner.

I am not encouraging to push changes carelessly which brings me to my next point: create a safe space for bugs. Deploying risky code into production becomes more comfortable when there exists a way to mitigate the risks. For example, a force update feature in the app can save developers when someone finds a security loophole in the latest version of the app.

If it makes you feel better, even experienced engineers make mistakes. Although no one should compare themselves to others it helps to realize you are not alone.

Speaking of loneliness, in case there are no peers in the workplace, the community of programmers is always there to assist at stackoverflow.com.

Don’t let an ego get in the way. It’s okay not to know everything. You are not supposed to. That’s why software engineering is an endless journey where an engineer never stops exploring new things. Don’t walk through the journey alone and meet other people to make the path easier. Accept the weaknesses and keep growing.

Talking of growth, every bug contributes to personal growth. Therefore, seize the opportunity instead of avoiding it. Over time the knowledge baggage will become full of pro tips and you will get better at solving harder technical problems.

Resting is important. You will not get the most out of your time if you are trying to fix the same bug a whole day. Take regular breaks because the human brain cannot concentrate on a single task for a long period and attention will, for sure, divert over time. If the fix is taking long, consider sleeping on it. Never stay long nights. There is no point in doing so because, essentially, you are just borrowing the time from the next day.

Practice, practice, practice. This martial arts quote explains it best: the more you sweat in training, the less you bleed in combat. To perform great in production code, practice in the playground a lot. Think of potential problems that might arise in the future and try solving them beforehand. Even if that never happens, you will at least gain more confidence and new knowledge.

Follow these principles and observe how you will handle the next dead end. In case you are frustrated, make sure to acknowledge your feeling and remember the principles described in the post. Let me know how that works out for you or if you would like to share some best practices from your experience.

Send me a message