Was chatting with Robert this morning about old code, and stuff that you've written that makes you wince now.
Wincing at your old code is good. It means you have learned a lot since you wrote it =) Only when you have hit a plateau will you look back at your old code and nod approvingly.
Maybe this is a good test for the classic "year's experience" problem. If your code is a year old, and looking at it now you'd do it exactly the same way, you just relived a year and it doesn't count.