Thanks for the comments, I am learning some things. I have a longer comment in my article now- but I would like to point out the two bugs in question actually happened. The first one never made it into production because I deliberately write in small modular pieces and then use Emacs incremental search to search on important variables (causing all correct spellings to highlight so incorrect spellings become obvious in the deliberately regular format I write in) before checking in. The int problem did in fact happen. I didn't add a stupid int-cast (as in the example) but an R ODBC driver promoted a result to int based on something it secretly learned from the DB schema.