Hacker News new | ask | show | jobs
by rlabrecque 2654 days ago
I deal with this constantly. Someone gets a bug report for a crash, let's say a null pointer dereference, so often I see:

> if (pPointer == nullptr) { return; }

> Crash is fixed!

I mean sure... but that's not the problem. Why was pPointer null here in the first place? So few people take the time to understand that :(

3 comments

>So few people take the time to understand that :(

Because "fix this null pointer exception" is ticket number 14 this week, and your PM just wants it checked off. They don't want to hear that you need another week of digging through layers of spaghetti to track down the source; that doesn't bode well for their KPI goals.

This is a systemic issue in the way software companies function.

We can blame management but sometimes the developer just doesn’t give a f* or it doesn’t fit their agenda. I guess both are ultimately management issues, but it’s a shared responsibility.
Ultimately it doesn't matter if your engineers don't give a fuck if management will sabatoge their efforts when they do care. Only if you have management who won't forgo quality for ticks can you really blame the dev.
OMG, yes. Every time I see this in a code review I go "why is this receiving a null here?" And 90% of the time I get back "dunno, I saw null pointer exceptions in the logs"
Typical. Fix the symptom instead of the cause.
Sounds like a failure of the type system...