I set up my Python code to make sure that (a) we're in a clean git state and (b) we haven't already run an experiment with the same ID number.
This has saved my bacon more than once, preventing either wasting days of computation or overwriting hard-won data.
#python #defensiveprogramming #git
Defensive driving on American highways is when you assume that everyone wizzing past you at 30 above posted is out to do you in, so you use more-than-warranted caution.
Likewise, in #IT, #DefensiveProgramming is when you assume that every piece code—functions your team wrote, libraries and frameworks that were foisted upon you, all of them—are out to get you.
And like defensive driving, defensive programming turns a freeing, joyous activity, namely programming, into a paranoid schizophrenic #disorder.
#disorder #defensiveprogramming #it