Hacker News new | ask | show | jobs
by thejteam 5252 days ago
Can't post it because I don't have it but at my first job I was working late(2am) to get something ready for an 8am demo that absolutely HAD to happen(people flying in from across the country, stuff like that). I found a solution that would give me the right answer. It consisted of a switch statement. In each case of the switch statement was another switch statement. In about 2/3 of the cases in these switches was a GOTO to the top of the function to repeat the process. What can I say, it worked and was pretty good for 2am work(I am not a night person.) But even my year out of college self knew the code was bad and that I would have to re-write it. Except for the fact that the demo went great. Our processes would only let me change code if there was a bug. Try as I might, I could never find one. That code is probably still in use 9 years later.