Live data from Hacker News

Divine By Zero

thedailywtf.com

11–20 of 26 posts

Re: Divine By Zero

#12
post #4

Don't mean to be a buzzkill here, but I don't think anyone with an ounce of a brain will find this funny, which I believe was the original intent.

Daily WTF is all about cringe-worthy programming stories. If you find them funny, so be it... But they're almost all cringe-worthy.

[deleted]

Re: Divine By Zero

#18

Can someone explain why he does two more if checks after he's set the denominator to "php"?

Can't tell if you're being sarcastic or not. :)

Aside from the whole function being asinine the only way to know "why" would be to ask him. The answer would probably also qualify as asinine.

Re: Divine By Zero

#19
Lets say for a moment that this isn't made up. The questions that struck me immediately are as follows:

1. What was the motivation for creating this function? Was it (hopefully) to show off how "smart" he was? Was the company he worked for doing any kind of calculations related to (dear god no) financial or medical data that he thought he could improve?

2. How does anyone in this world escape grade school without knowing that one cannot divide by zero?

3. Someone thought dividing by zero should be a recoverable error?

Post reply on HN