It’s Cool, Man, Just Fix It.

I had a disagreement with a programmer today and I realized my explanation sounded like it was coming from the Big Lebowski…

Me: Your new code is failing when it attempts to divide by zero for the tax rate.
Programmer: But it works here perfectly.
Me: Sure, I’m certain it does, but it fails … like everywhere else. Particularly when your variable is still set to zero and then you try to divide by it.
Programmer: But my code is correct.
Me: At times, sure man, except where… you know… the fundamentals of math are involved.
Programmer: How can I possibly fix what I don’t feel is broken?
Me: that’s the thing: feelings. Math doesn’t care about my feelings or your feelings. That’s the beauty of it, math is just math whoever the hell you are. And it says your code can’t divide by a variable that equals zero. Don’t let your code try to beat the laws of math, man, it will always lose. And it would be cool if you could get that into a pull request by the end of the day.