I don’t write much here about work/school, but I thought I’d share a little anecdote to give all of you a taste of how I spend my days.
Dividing by zero is a common mistake in programming. You’ve got some variable, and you forget to take into account that it might sometimes be zero, and you try to divide something by it. Often the result is “NaN” (not a number), and that result can get propagated through your program, causing something to break and not work like it’s supposed to. In regular programming this is no big deal…if your program doesn’t work like you expect you start printing out the values of variables, you see “NaN” where you expected something like, say, 0.1, and then you track it back through the code to figure out where you’re dividing by zero and fix it.
But if the program is for controlling, say, the joints in a robot’s arm it gets a little more exciting. Instead of your program just reporting a nonsensical result in a window on the screen, what happens is that instead of a slow, smooth movement like you expected, your $50,000 robot goes apeshit and flings its arm into some crazy pretzel shape as fast as the motors will go, and you have to leap up and hit the big red button that shuts everything down and hope that nothing was damaged. That’s what happened to me yesterday.
