Commented Out Text Bad?
December 7, 2008 7:35 PM   RSS feed for this thread Subscribe

/* 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 (10 comments 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


This is what good software architecture and source code control is for.

The immediate answer is - put your html and everything else into a source code control system. Delete the stuff that isn't being used. You can always go back and get it from the revision history if you need it again.

Better answer - modularize your code. Use something like PHP or JSP and design a system that lets you selectively load what you need, when you need it.
posted by b1tr0t at 7:49 PM on December 7, 2008 [1 favorite has favorites]


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 [1 favorite has favorites]


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


In that case, continue to operate your current website as you have been, and focus on getting the new version shipped. Take a careful look at the features you have. Cut some of them. Everyone overdesigns, and lots of features end up unused. Assume that your staff size will be reduced. What can you do to ensure that the new design actually ships?
posted by b1tr0t at 10:08 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 I've lost my social security n...   |   Why are baby chickens and duck... Newer »

You are not logged in, either login or create an account to post comments