Hacker News new | ask | show | jobs
by keypusher 1670 days ago
Why would is_computer_on_fire() return a double and not true/false? Even for a joke function, this seems like bad practice. If the function is named is_state(), I expect a boolean return.

> Returns the temperature of the motherboard if the computer is currently on fire. Smoldering doesn't count. If the computer isn't on fire, the function returns some other value.

2 comments

Wonder if this is a throwback to the HCF command.

https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing...

Maybe it’s a probability function. Something like “hey there’s a .7 percent chance your computer is engulfed in flames”
Constant probability function. (Please be precise!)