↓ Skip to main content

“The Python program sleeps for five minutes, the Java program sleeps for 0.3 seconds, and the Haskell program sleeps for 0.3 milliseconds.”

Ruud van Asseldonkruudvanasseldonk.com ↗

The same sleep(300) means three different durations in three languages, and the code gives no hint. Name it timeout_seconds and the bug can’t hide. This costs nothing but a few characters. NASA lost the Mars Climate Orbiter to a units mix-up, and your codebase is making the same bet one variable at a time.