Seeing your old code

Lately I have been working on one of my oldest pieces of code again. This code is that of a website I created for my school about 2 years ago, when I had just started programming.

Given that (a) it’s written by a beginner (me two years ago) and (b) it’s PHP, you wouldn’t be surprised to hear that the code is bloody awful. Even for a basic CRD app (I hadn’t programmed the U bit), it sucks.

Hardcoded numbers and categories everywhere, no sign of code organisation, redundant code, copy/paste as a design pattern and inconsistent naming. It’s a wonder that information going into the database was even escaped. And let’s not talk about character encodings.

Needless to say, now that I’ve picked up the code again, it’s had a swift rewrite. It’s still pretty crap, but at least it doesn’t screw up completely if you type a euro sign.

Has anyone else ever seen some of their first code and gone: “I can’t believe I wrote this crap”?

  1. I wrote a game 2 years ago, and when I looked at the code, I cried.

  2. lol. At least it’s not just me.

  3. I made a game once when I was 10.

    It’s still up (http://clapclap0.tripod.com/cgi-bin/index.cgi)

    The code is bloody awful

  1. No trackbacks yet.