The Fly was on TV yesterday, and it reminded me of an important, often overlooked rule of programming: the Rule of Repair

Repair what you can — but when you must fail, fail noisily and as soon as possible.

A corollary rule is to always check for errors and inconsistent program states, even in prototype code. A simple assert(genetic_codes==1) would have saved Seth Brundle a world of trouble.