Beauty Is In The Eye Of The Coder

Okay, be honest now. As a programmer, you get very attached to the work you've done. It's not always good, but it's YOURS damnit! But do you ever really consider that somebody somewhere else will have to deal with the code you've written at a later date? I've come to realization that actually thinking about the next sucker who has to work on your code is something that aids in becoming a Great Developer(tm). And isn't that what I want to be?

Like most programmers, I've inherited a bunch of code from someone else. It uses a software package I don't particularly like, and it's been written in a style that I can only call inconsistent. However, it's mine now and I have to deal with. For your own sanity, please consider using a tool like PHP Beautifier to take that old crufty code and at least make it look manageable. It's only drawback is that it's written in PHP5, so you will need to get that crufy code somewhere where PHP5 is installled.

In this case, it's perfect for me because I have PHP5 installed on my laptop. I took the offending file, ran it through the beautifier (command line version please) and in 3 seconds, I had a nicely formatted piece of code that I could actually figure out where things were! Praise to Murphy!

In all seriousness, using a consistent format for your code means that somebody other than you will be able to take what you've done and use it. Anyone who thinks that "job security" is more important than readble code should be fired on the spot. You're not helping yourself when you create a system only you can understand.

Okay, now to go and figure out why an image upload is working least I KNOW which nested conditional it's in now. -)