Thursday, February 12, 2009

Horror Movie Code

For the last few days I've had the displeasure of working through some code that we have inherited from another company, which I will not name. One section of code I'm looking at has a 300+ line if/elseif block, up to 9 levels deep! And if you want to see some real crap, you can look anywhere else in the remaining 700+ lines of code. As for the project in general there are no meaningful unit tests, all the code is crammed into the Controllers, and it is so un-DRY you need a raincoat to get through it. Code like this makes me want to cry. This code is concrete evidence that if your parents are blood relatives you should not write software. (No offence intended to non-code writing inbreeds.)

No comments: