DEV Community

Discussion on: Debugging philosophy; goals of testing; & mistakes junior devs make

Collapse
 
mohanarpit profile image
Arpit Mohan

I completely agree! A lot of times, I've seen developers fix a NullPointerException by adding a null check before the function invocation. But the variable should never have been null in that location!

Longer term fixes such as investigating the workflow, figuring out data issues go a long way in building a robust system instead of immediate symptomatic fixes.