11
pk76
21d

"I see you're computing the same result multiple times, you shouldn't do that, here's how you optimize that out"

Okay listen you fuck, that's a null guard which goes directly into throwing an exception. The most optimal path is getting past the null guard as quickly as possible, which is what I do. Once you've failed the null guard, throwing an exception faster doesn't do you any good.

I swear plenty of FOSS programmers don't even really look at the project, they just find "errors" that make them feel smart.

Comments
  • 1
    Once the null guard has failed, is it being checked again in the error code path? If so, why?
  • 3
    @Fast-Nop in cases where multiple parameters can be null, reporting, through the exception, which one was.
  • 5
    I call it the stackoverflow syndrome

    Because fuck doing actual work if finding meaningless "errors" in someone else's work takes way less effort
  • 7
    @12bitfloat yup, that's the exact kind of toxic bullshit I expect from over there.

    I once had to write a script in Ruby, which I know nothing of. Wasn't any longer than 300 SLOC, but it HAD to be in Ruby. Ran into problems with a function that expected an array, and was sometimes being called with a single value, in a situation where in strongly typed languages it would always be passed an array of a single element. Not knowing about the splat operator I asked on SO. Top voted answer: your code isn't working because you're passing it a single value.

    No shit, I said that in the question. _why_ is it a single value and _how_ do I deal with it.
  • 3
    @pk76 That's because the SO rep system entices fast answers over good ones, and not bothering to even read and understand the question surely is fast.
Add Comment