Best Undefined Behavior Ever
Probably the best Undefined Behavior, ever. is_computer_on() Returns 1 if the computer is on. If the computer isn’t on, the value returned by this function is undefined. BeOS had all sorts of useful APIs. We need to go back is_computer_on() int32 is_computer_on(void) Returns 1 if the computer is on. If the computer isn’t on, the value returned by this function is undefined. 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.
A screenshot jokes about absurdly specific BeOS APIs, including functions that detect whether a computer is on or on fire. The punchline is the deadpan programming documentation and the deliberately undefined result when the computer does not meet the condition, making it a reaction to bizarre or overly literal software design.
- @ithueti / 5241 2021-12-08
- @profunctor_io / 7527 2021-12-08
- @dev_meme / 4168 2022-02-05
- @right_wing_dev_squads / 5462 2022-12-07
- @right_wing_dev_squads / 7491 2023-08-29
- Type
- image
- Size
- 595×631 · 45.1 KiB
- Mood
- absurd, sarcastic
- Language
- en
- Added