Skip to main content

Golden debugging practices for a software developer


Debugging is really a hard and challenging phase in software development. It needs to be taken care and can be a highly sellable skill if you are good in debugging. Days would come where you should have mental skills to tackle the questions thrown by bugs. Let's have a look at some of the techniques in debugging right from the basic level.

Don't Panic

Be it at your desk or at a quality analyst's cabin or even when reading the mail of the bug raised, key idea is not to panic. There will be moments of critical issues being reported in a difficult time of a milestone. One should overcome the mental fights and focus on what the issue is.

Give importance to key details

Now you are in the place of a crime scene. You are investigating the crime scene. So take note of every available details in the console, the behavior, debug logs if any, etc. Get back to your desk and analyze the data you collected. You might have some thoughts right away if you are lucky.

Don't believe the bug in first place

Once the issue is raised, a confident developer will first doubt the tests as to why the bug would occur. So get in touch with the tester directly and squeeze him for details until you are convinced. Ask him to reproduce, test in different configurations/environments, etc. I'm sure a good tester would be free to respond to your queries.

"It is not a bug"

Sometimes, you may have faced issues where the cannot be accepted as a bug. As a developer who knows the in and out of the product can call it an invalid bug right away. In other cases, devs can discuss with their peers on the validity of the bug.

Diff of your code

Even after all the above steps, if you agree on the bug, first thing you would want to do is check the diff of the code in which the bug occurred and the last commit. This really helps anyone on the first level.

Debuggers

I'm a huge fan of debuggers. Debuggers like gdb are really useful if you know how to use them. All the IDEs these days also have an inbuilt debugger. Code editors like Atom, VS code have plugins for debugging. Keep breakpoints and identify where it occurs. They work like a charm!

debugging practices
Don't be this guy. ROFL.

Debug logs matter

Religiously go through the debug log line to line and try to locate everything in your code. Sometimes the exception/crash may have occurred in a third party module also. So it is vital that everything is logged with right levels.

Take breaks

Mostly you would like to go with the flow and debug the issue. But sometimes it may prolong and you surely have to take a break and come back to resume the process freshly. I'm sure you will have new thoughts when you do.

Talk with peers

In case of the debugging process is turning out too long and eating up a significant amount of time in your JIRA, don't hesitate to have a word with your peer about what has been going on. Make him understand the situation, he may suggest you some ideas that may really work. Or he may even take different calls according to the situation.

debugging practices

Once you keep following the above practices, you will surely find a way to win the battle between bugs and yourself. I bet there is no better feel than to debug the issue all by yourself and it really really increases your confidence level towards the product.

Comments

Popular posts from this blog

Sachin Tendulkar's legendary journey

"I see myself when I see Sachin play"  -Cricketing legend Sir Don Bradman Sachin Ramesh Tendulkar, had represented India at the age of 16. Rather than asking 'How old are you?', people who were longing to query his age would have asked him 'How young are you?'. Such a prodigy he was and still is one. He was given his first international cap on 15 November 1989 and exactly 23 years and 364 days later, he played his last international cricket match for his nation and on a combo, it was his 200th test match.              Sachin has scored over a 34,000 international runs, and there are no exclamations for that huge milestone after describing him as a prodigy. But still seeing another cricketer of his quality and matching his frequency, is very far away from my eyes. But who knows he might be somewhere playing cricket in schools, or schooling in kinder gardens, or building blocks in play schools, or might even be an unhatched embryo.              On m

Object oriented SDK development

If you are someone who is into object oriented SDK development and looking for some best practices on API design, I have got you covered here. I have used C++ as the base to explain the core. OpenCV is one of the frameworks I have come across that does an exceptional job in providing classic and productive APIs in C++. Let's not waste time an quickly jump into the best practices of object oriented API design. Design easy-to-read API names First and foremost thing to consider in an object oriented SDK is the API name itself. Your API names should reveal everything. Keeping APIs as small as possible can be a difficult task but that is what you should deliver. The API should do what the name says. Nothing more. Nothing less.  Write your headers and review it Before you jump into development, it is important to code what the user wants. To have a crosscheck on that, write a header file(.h or .hpp) containing the public/private functions and data members. In this process,

Top less popular Android apps by Google

Google, as we all know is the dad of Android. We are using some of the world's most popular software products like Gmail, Maps, Search, YouTube, Chrome, Google Pay (Tez) and many more. There is no surprises that Google pioneers top products like these and it solves complex problems that we face in everyday life. Apart from these hugely popular android apps, Google has imprinted its existence in many other apps as well. Let's take a look at some of the apps which you might have never come across that are present in the Play Store. Neighborly Neighborly  is a local Q&A app using which you can easily query or answer anything about the stuffs around you. The menu given you a choice of being a part of multiple localities around you. All the questions like local tuition centers for kids, swimming classes, doctor appointments and even queries about maids are being posted on the app and the responses are quite amazing. It is a great way to get in touch with locals and the