How many avoidable deaths from...

1 / 5

Unbraced blocks

TypeScript
function onObstacleDetected() {
    // ... 
    if ( isUnavoidable )
        log.critical('Applying emergency brakes')
        applyEmergencyBrakes()   
    // ...
}

☠️ Recount

  • 🏭 0
  • 🚗 0
  • 🚢 0
  • ✈️ 0
  • 🏥 0
  • 🏗️ 0
  • Total: 0 ☠️

☑️ Solutions

  • Use curly braces. 🐍 Python? Indent properly (471 ☠️).
  • Use linters, formatters and commit hooks to force a code style.
  • Properly cover code with automatic tests.
  • Share this to prevent others from screwing up.