Hacker News new | past | comments | ask | show | jobs | submit login

Somewhat related, one of my favorites from "Be Developer's Guide"[0]:

  is_computer_on_fire()

    double is_computer_on_fire(void)
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.

---

Though of course, the Microsoft engineer[ing committee] was entirely serious when they wrote the OP's function signature, while I imagine the Be engineer having a laugh while adding it to the SDK and then getting it into the official docs in print.

0. https://www.google.com/books/edition/Be_Developer_s_Guide/Wo...




Poor naming to have a function named like a predicate return a double. Should have been computer_fire_temperature() or something.


Haha yes, it was the 90s and all sorts of crazy things were gotten away with back then.


computerTemperatureWhenFire :: IO (Maybe Double)


...whereas in PHP there’s a setting in php.ini with a Hebrew name that will cause the function to spin-lock, pegging your CPU to 100% until it does catch fire, so that you can be sure it’ll always return a value. And it defaults to true.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: