Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Heresiarch
Oct 6, 2005

Literature is not exhaustible, for the sufficient and simple reason that no single book is. A book is not an isolated being: it is a relationship, an axis of innumerable relationships.
At a previous job, I had to maintain a huge pile of very, very poorly-written PHP for a variety of homebrewed web applications. It had several major problems.

First, the guy who wrote it absolutely insisted that all of the code for a given application be in one PHP file.

Second, no documentation anywhere. No comments, no notes, no nothing. His variable names... well, see below.

Third, he didn't believe in functions. Everything was written as independent procedures, repeated as often as necessary. The only functions I found in his code were obviously cut-and-pasted from example books because they didn't match the rest of his style at all.

Fourth (and this is the real horror), he had an include.php file that had hundreds of lines of string replacements for HTML elements. And they looked like this:
code:
$TD = "<td>"
$td = "</td>"
Yes, he used uppercase names for the variables that contained the opening tags for HTML elements, and lowercase names for the variables that contained the closing tags. This made his code for page output almost entirely unreadable, on top of everything else he did wrong.

More often I ended up just throwing out big chunks of his code and replacing it entirely. I really wish I had had time to totally re-do the accounting system before handing it off to my replacement, because giving responsibility over that mess to someone else is probably the worst thing I've ever done to a human being.

Adbot
ADBOT LOVES YOU

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply