*not actually wooden
This is from my first job. I have to mention now that I discovered TDWTF, back when it was called Worse Than Failure, by about the same time I got that job. It's just that whenever I googled for whatever my boss and colleagues were trying to teach me, Worse Than Failure was invariably amongst the first results returned.
One of the tasks assigned to me was fixing a bug that kept users who logged in the company's system from sending messages to each other. I tracked the bug down to a piece of code that looked like this:
if (! ProprietaryUserClass.IsLoggedInOurSystem)
//code that rendered the message user controls in a page here.
//wall of code to do a lot of other unrelated stuff.
Notice the exclamation mark. In my innocence and naivete, I thought that was the problem - whomever wrote that made it so that properly logged users wouldn't see whatever components they needed to use the system. So I dropped the '!' mark.
That didn't solve the problem, and instead made things worse. The page where the user could read and send messages got terribly broke and wherever there was any kind of control, a login control was being rendered instead.
I took a look at IsLoggedInOurSystem and found out that when a user successfullly logged in, it would be set to false. And I couldn't change anything in the authentication process since it was off limits to interns, so I asked my boss if he could do something about it.
"No, you see, that's actually right. That variable should be set to false, for security reasons", he said. Before my brain could finish tying itself into a knot, he continued with "so if a hacker ever steals our source code, and tries to run it, he won't understand what's going on". I tried reasoning about the amount of time hackers would be fiddling with our code versus the man-hours of all the people working for that company, and how that confusion would only get into the way of people like me solving bugs and whatever. Boss said "oh, yeah, I forgot to tell you about our obfuscation table. You know obfuscation, don't you?"
I did, but not like that.
There was this table, in an Excel (shared by everybody in a network) file with two columns: "When you write code that says..." and "...it actually means:". It was close to two hundred rows of WTF'ery when I first saw it. "You should come up with some clever code translations too, and write them here and tell everybody else. That helps protecting our intellectual property."
As a last effort to bring some sanity into the conversation, I asked what were the odds of someone wanting to... copy... our fucked codebase. Were they afraid of an ex-employee taking a copy home and selling it to competitors? To which my boss made a pause to think, and then he said: "that, too, but I'm more concerned about IIS and its security breaches".
I still can't find a way to justify why it took me over four months to quit that job.
That hideousness is what keeps you and I [sic] employed!