DEV Community

Discussion on: What's the Most Unusual Thing You've Discovered While Coding?

Collapse
 
ibrahimraimi profile image
Ibrahim Raimi

The Mars Climate Orbiter incident In 1999, when NASA's Mars Climate Orbiter spacecraft was lost in space due to a software error.

The software on the spacecraft used metric units, while the ground-based navigation software used imperial units. This mismatch in units led to incorrect calculations and caused the spacecraft to approach Mars at the wrong trajectory.

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited

That's my favorite example for explaining primitive obsession

❌ Your types should never be "Int" or "String"
βœ… Use instead "Duration", "Length", "DateTime" ...

refactoring.guru/fr/smells/primiti...

Also the metric system is objectively better than imperial units.