Did you just start on your job and had to take over an implementation from a previous colleague? Welcome to Code Mocking!
“Code Mocking is an engineering tradition, which happens whenever a software project is handed to a new engineer”
Of course, the old code is always written very badly compared to your standards 😉
From Dilbert by Scott Adams:
http://www.dilbert.com/2013-02-24/