What is a coder’s worst nightmare?

Mick Stute on Quora, answering the question “What is a coder’s worst nightmare?”:

I was hired by a psychologist to fix a program that seemed to have “strange output” written by one of his ex-grad students. It was a program that reads a data file, asks about 50 questions, does some calculations, and comes up with some score based on this PhD’s research. It’s on a research 3B2 at the university. He demonstrates the program and sure enough there seemed to be strange flashing words on the screen when it moves from question to question, and they don’t seem nice.


This ought to be simple. There are only about five places it could output anything, and all of them had this subliminal flash of a message. Each one was hard coded. No problem. Delete the offending mvpwintw() and all is well. Or should be. I compile, thinking I’m done. But when I ran it, there it is again — the subliminal messages. This time with different text still the same subject, just different messages.

I check my code and believe it or not it’s back to the initial state I found it. 15 files, mangled, 3-letter variables — the whole thing right back where I started.

That’s just the start and it only gets better from there. The end result truly is a programmer’s worst nightmare, though I won’t ruin the ending. Well worth the read.