News for hackers. Stuff that matters.
Re:Ask HN: What horrifying and/or terrible things have you s... by thejteam on Saturday June 21, 2014 @08:29AM (#7924807)
A function that consisted of a giant switch statement, with each case consisting of another switch statement. Half of the sub-cases contained GOTO statements back to the top of the function.

Even worse... I wrote the code. It was 2am, I had been working for 18 hours straight to get everything ready for a demo the next morning.

Even worse than that... the code worked so management wouldn't let me change it. I tried my best to find an edge case it wouldn't handle but never could. So the code shipped.

Re:Ask HN: What horrifying and/or terrible things have you s... by JoachimSchipper on Saturday June 21, 2014 @09:31AM (#7924919)
If that's the worst, that's not too bad - I mean, it's ugly, but apparently it works well. ;-)