Worst working conditions you have written code in?
phugoid: Well, I nearly killed myself with a line of bad code.  I made a silly change to a flight simulator's "unusual attitude" logic.  Unusual attitude training consists of putting the aircraft in a very difficult orientation (45 deg nose down, 60 deg left bank, etc.) and training pilots to recover.Here's what the simulators look like:
http://blafsen.net/photos/simulator.jpgI changed the code, and brought the simulator up on motion to test it... and the machine started bucking like a horse and tossing me around the cabin.  I had the instructor console right in front of me, and for a while it was physically impossible to hit the freeze button - I was being tossed around too badly.That day I learned a lesson about testing: first check it with motion OFF.