15 December 2010

A candidate for the WTF HOF

At a previous job, one of our initial screens for a job applicant was to throw her or him a Code SOD from The Daily WTF (with the explanatory setup removed) and to ask to applicant to explain what the code did and how to improve it. Today's snippet would be perfect for that exercise. You don't even need to understand much PHP to see that the algorithm is crazy mean bull bad, and that there are so many ways to make the code better.

No comments: