September 19, 2022
September 19, 2022
Bugs are an inevitable part of coding. Even developers with years of experience have probably never written a bug-free application. A bug can result from many reasons, for example, incorrectly written code, errors in a compiler, or even hardware issues.
There are many ways to debug. You can try either
However, the debugging process does not simply end with finding the solution. The ultimate destination is to identify the root cause.
🐜 One common mistake among developers is that they usually let the “bug” slide once they’ve found the solution, rather than digging to find the root cause.
Where to find the root cause, you may ask. Well, the answer lies in the Five Whys.
Five Whys analysis is a basic yet practical method for determining the root cause of an issue. It’s also important to bear in mind that the 5 Whys isn’t about apportioning blame; it is about understanding the root cause of a problem and then putting in place countermeasures to prevent it from happening again.
Here are the steps on how you can carry it out:
Sometimes it may take more or less than five why’s to reach the root cause of your problem. However, you should always make sure that your team sees eye-to-eye with each of the questions being answered as well as the final root.
When you choose to do the quick'n'dirty instead of fixing the root cause for that missing array index.
🐜 Identifying and solving the root cause is how you can ensure the code quality, and also prevent future codes from catching the same bugs.
Bugs are part of the software development process. So if there is a bug in the code you wrote, you're in good company. However, always remember to find the root cause of the bug, instead of going for a quick fix, so that you can prevent those bugs from reoccurring in a new form in the future.
Happy coding, folks, and don’t forget to catch our upcoming coding techniques from FABA Technology.