I have worked on a lot of web­sites…a lot. Usu­al­ly, it’s a pret­ty smooth gig. You pop in, write when you need to write, or change a few things, and you’re done. Slick, clean, smooth, and easy. That’s how it should go…should.

Every now and again I get “under the hood” of a site and it’s vast­ly more com­pli­cat­ed that it ever need­ed to be. Imag­ine open­ing a com­put­er case, you have a good idea of what to expect and what needs to be done, right? WRONG! When you crack open the case you dis­cov­er a mix of a Ford Mod­el T and what looks to be the fore­run­ner to the Cern LHC. This site looks like it could rip apart the uni­verse, but only at about 12 miles per hour. Now you have to fix it.

You see things that, nor­mal­ly, would take a func­tion or two. How­ev­er, what you’re see­ing is a uni­ver­sal RSS feed scraper that can, pre­sum­ably, pre­dict what is going to be on  a web­site before it’s ever even writ­ten. Or, if you’re lucky, a class that you can com­ment out or remove com­plete­ly and noth­ing real­ly changes from the “loss”. These are real-life prob­lems I have come across in my near-decade-long career. Scary, I know.

I am not here to strict­ly com­plain, though. I am writ­ing this post sim­ply make a very hope­ful sug­ges­tion. When you’re build­ing a web­site, don’t rein­vent the wheel. Sure, it may look impres­sive. How­ev­er, more often than not, it will be one or more of the fol­low­ing:

  • Gross­ly inef­fi­cient
  • Bloat­ed
  • Need­less
  • Serv­ing no oth­er pur­pose than to take up space on the serv­er

This is not meant to be mean-spir­it­ed, by any means. This is just ask­ing for a bit of “pro­fes­sion­al cour­tesy”, from one code mon­key to anoth­er. I take a lot of pride in the effi­cien­cy of my code, and take great pains to keep it as stream­lined as pos­si­ble. The last thing I want some­one to com­plain about in my code is that it’s bloat­ed or may pos­si­bly be writ­ten in Sumer­ian. So I make sure that my code is very clean.

My work is by far per­fect, how­ev­er. For instance, I am now get­ting into a bet­ter habit of com­ment­ing my code. Not com­ment­ing it more, just com­ment­ing it in gen­er­al. For years I nev­er com­ment­ed most of my code because I was the only one work­ing on it. I can’t read my own hand-writ­ing, but I can always read my own code. That does oth­er peo­ple no good though, so I am try­ing to improve that.

I’m think­ing about you guys, who use my code. So do me a sol­id favor and return the favor. If not for me, do it for the per­son who has to come in after you and keep the project mov­ing for­ward.

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *