A Debugging Journey as Java Developer

Table of contents

No heading

No headings in the article.

Anything that can possibly go wrong,will go wrong

The above quote connects to what I do. Being a student with a Mechanical Engineering background, I always found coding a headache to learn. Seeing my friends struggle to find the error in a program and find that the error occurred with missing semicolons or brackets, I thought It was never my cup of tea. But Unknowingly, my interest shifted toward code, and my first programming language to learn was Java.

Writing code is something I have yet to do, but with some struggle, I learned how to write and apply the same in my job. The most challenging part comes from testing the written code with test cases. I am the prey of it. Thanks to the top-notch IDEs and plugins, I write the code without errors. The real issue I face is writing Junits. I suck at writing Junit test cases. As the quote says, anything could go wrong, and we should be able to cover it.

I usually have confidence while writing test cases. I cover most parts, but I need help covering catch blocks and some part of the code. Here debugging helps me the most. Wherever It needs to be covered, I put a breakpoint and run the test case in debug mode. It goes line by line to what value is getting populated there. NullPointerExceptions are my main frustration. Debugging helps me a lot in these cases.

Now I cannot even imagine that my code would not have proper Junit test cases without debugging. Debugging helps me check my code, where anything could go wrong, and how to handle it.

To conclude, I am not a pro at coding. I got to know what actual debugging is in the past few months. Using it helps me accelerate my coding journey and avoid repeating mistakes I have made before. And thanks to the Hashnode town hall for giving me a chance to express a few experiences about debugging. #debuggingfeb is my first blog on hashnode, and I want to participate in more events and share my retellings and experiences. Thanks for reading.