Commented Out Text Bad?
December 7, 2008 7:35 PM

/* Is a lot of commented out text bad for a home page? */

When content is no longer being used on the home page, we are told to comment it out instead of removing it. Are there potential downsides to doing this besides there being a lot of extra code that must be downloaded? And besides the fact that is messy, extraneous, and somewhat unprofessional.

The content being commented out are modules that have sales which are no longer valid or current.
posted by pixelnark to Technology (8 answers total) 1 user marked this as a favorite
I consider it extremely unprofessional. Are the links in the commented-out areas still live? It gives people lots of old nooks and crannies of your site to poke their heads into.

Rather than commenting out things, use a revision control system so you can keep old versions of your code.
posted by zsazsa at 7:42 PM on December 7, 2008


seconding what zsazsa said.
posted by jepler at 7:44 PM on December 7, 2008


Depends. Sometimes versioning is overkill, especially if it's an item that may be disabled/enabled many times in future. I agree it's sloppy/unprofessional if overdone, though.

But technically your question is are there downsides OTHER than bloated size, sloppiness, messiness, unprofessionalness.... so I guess no, you pretty much covered it.
posted by rokusan at 7:50 PM on December 7, 2008


It's dead weight, costing you and your readers bandwidth.
posted by Class Goat at 8:02 PM on December 7, 2008


I suggest switching over to a new CMS. What you're doing is very outdated. Consider using a one of the newer and hefty ecommerce systems. It's a bit unorganized and bloated to date, but my fiance, who is a web developer, has been working with Magento for a website lately. It may have a lot of the features your website needs and could probably work well, provided you found a developer who could tame the beast, so to speak.

At the very least, scrap the idea of commenting old content. As others have said, this is really bad for both you and your visitors.
posted by metalheart at 8:10 PM on December 7, 2008


I don't think I'd do this, but here's a possible compromise position. You could have another page called everything_we_might_ever_want.html will all the commented out crud that you can use as a template/storage space, but make a nice clean copy for the actual home page. Of course, I'd set the permissions for the everything_we_might_ever_want.html to not be world readable.
posted by advicepig at 8:24 PM on December 7, 2008


There are a host of problems with our current website (the commenting out text being just one of the many issues). We have a new web site that we've been trying to get into testing and won't launch until 6 months down the road. Right now the company is suffering because of the economy. We are understaffed and have a lack of knowledgeable developers to help us with the transition. The better question to ask is what can be done in the meantime to make the site more functional without the obvious yeah, this site needs a total makeover. The commenting out is probably one of the easiest fixes.
posted by pixelnark at 8:34 PM on December 7, 2008


Maybe you could compromise? When you comment out homepage code, include the date. After N months, delete the code.
posted by valadil at 8:26 AM on December 8, 2008


« Older how do i find out my lost social security number?   |   Why Yellow? Newer »
This thread is closed to new comments.