Skip to content

Instantly share code, notes, and snippets.

@havocp
Last active December 25, 2015 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havocp/7048451 to your computer and use it in GitHub Desktop.
Save havocp/7048451 to your computer and use it in GitHub Desktop.
Type safety in real life

My mom is building a house. The builder sent her an invoice spreadsheet, which was simply a bunch of items summed up:

  $5000.00
   $100.00
  $1300.00
   ... etc.

GRAND TOTAL $WHATEVER

Unfortunately, he accidentally put some newlines in some of the item cells, making them into text rather than numbers. Those cells were silently skipped (or maybe converted to 0) in computing the SUM() of the items.

He would be out $972, except my mom got out her calculator and added things up manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment