Friday 29 February 2008

Lap year's WTF

Well, we all know phpBB is evil. Html code it generates makes you sick. It's a great example of spaghetti design antipattern. And it's written in PHP.

Today (it's 29th February) many phpBB by Przemo forums have blown. It's because of lap year and their "whose birthday is it" function.

Warning. Clicking link below may even make you vomit.
I'm ugly, think again

Yes, they didn't use standard date("L"), yes they did their own calculations (using sqrt?!?), and yes, they f*ck*d it badly. Awful switch full of magic numbers (hello, PHP is a junk, but it has loops and arrays) is just a minor ugliness.

No comments: