I recently watched a couple episodes of Holmes on Homes on HGTV. My dad told me about Mike Holmes a few years back but I hadn’t gotten around to watching until now. I really like his philosophy of “Make it Right,” as I have a similar philosophy of doing it right the first time.
If you’re not familiar with the show, he comes into people’s homes and fixes remodeling projects that other contractors seriously messed up. These are people that have spent tens of thousands of dollars and have a half finished (if they’re lucky), poorly done project to show for it. He comes in with his team, rips everything out, and does the whole job correctly – and usually throws in a bonus or two. Along the way he points out what was done wrong and why and then shows you the proper way to do it.
Watching the show made me think about how I approach web design and development. When I start on a redesign project, I typically start by ripping out all of the unnecessary code. Then I start from the floorboards, so to speak, and build it back up the right way.
There are a few reasons why you don’t want all this extra code (i.e. website bloat):
- Load time – The more code you have on your website, the longer it takes to load. Internet connections are getting faster all the time so you may not think this is still an issue. Consider your website’s users to see if this is really a concern. If you have a lot of dial-up users, you’re going to want the leanest code you can get by with.
- Search Engines Optimization – Yes, SEO. Search engines don’t like to comb through a ton of code. The more code you have, the less they like your site.
- Errors – If your website has a lot of code, there’s a greater chance there’s something wrong with it. You may not be so worried about your code validating, but those pesky search engines (again!) sure are.
Yeah, there’s more than that, but you get the idea.
OK, so now we know why we don’t want code bloat. How did it get there to begin with? Here are a few different sources of code bloat:
- Programs that convert one format to HTML/CSS – Take Microsoft Word for example. You create a beautiful document in Word and you want a web page that looks just like it. So you tell Word to save it as HTML and upload it to your server, right? I will give them a little credit, Microsoft has gotten better with this, but Word still puts a TON of extra code into your file. Code you don’t need.
- Website creators – This goes along with the MS Word example above. Website creators also have a tendency to go overboard with their code. The problem is that they have to account for every scenario, so instead of looking at a particular situation and choosing the best code for it, they hack in a lot of extra to make sure it looks good no matter what the situation.
- Inexperience – If someone hasn’t kept up on the latest methods and standard or if they are just starting out chances are they are going to add a lot of extra code to get it to look right. For example, they may not know the best way to design a three-column layout so they choose to use tables instead. It’s easy (for them) and it looks this same (again, to them) but it’s not the “right” way to do it anymore.
So I guess at this point it isn’t necessary to mention I code everything by hand, but I do. It’s not necessarily the right choice for everyone, but it’s the best way I know how to do it. And I can tell when someone else does – it’s typically clean and uncluttered. And doesn’t make me want to tear my hair out after 15 minutes of looking at it! ;)