DEV Community

Discussion on: What's one of the ugliest piece of code you've written so far?

Collapse
keptoman profile image
mlaj • Edited on

I had to work in this code, but didn't create it.

Page rendering made of only PHP echo statements in a Zend framework controller (not view!). There was html, CSS, js, jquery and PHP conditions in this spaghetti mess. The code was around 800 lines long and was a very important part of the website. That site also had 3 very different versions of jquery running on different pages.

That was one of the first things I worked on during my internship after graduating. I almost cried the first time I saw it.