Velocitize your web marketing

To Code By Hand or Not to Code By Hand

As an SEO, code bloat is one of the things I best enjoy fixing. I can’t say why for sure, since I’m not particularly great at coding. It’s probably just my own love of taking things and simplifying them.

I’m not a hand-coder of HTML. I couldn’t write a page from scratch if I needed to. But I know enough about HTML to be able to work with it. I love Dreamweaver because of the dual visual/code interface. I can make changes in either/both. Many pure coders and SEOs don’t like programs such as DW because of the code bloat that it tends to ad, and for that reason I’m in agreement with them. But DW comes in handy when you can’t work exclusively with raw code, but I can edit large sections of raw code without the visual interface0. DW just helps me a long at times.

Any program that generates your code for you, whether it’s HTML, PHP, JavaScript, or anything else, is bound to create a good amount of junk code. Take a look at this code that I found while looking at a site the other day:


< script LANGUAGE="JavaScript" >
function galeria() {
window.open('galeria/index.html','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=550,height=320,left=100,top=100');
}

< /script >

< script LANGUAGE="JavaScript" >
function galeriageneral() {
window.open('galeria_general/index.html','','toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=550,height=320,left=100,
top=100');
}
< /script >

< script LANGUAGE="JavaScript" >
function marina_layout() {
window.open('layout/marina_layout.htm','','toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=472,height=378,
left=100,top=100');
}
< /script >

< script LANGUAGE="JavaScript" >
function maps() {
window.open('maps.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=730,height=469,left=25,top=25');
}
< /script >

< script LANGUAGE="JavaScript" >
function uno() {
window.open('plans/01.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function dos() {
window.open('plans/02.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function tres() {
window.open('plans/03.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function cuatro() {
window.open('plans/04.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function cinco() {
window.open('plans/05.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function lagoonuno() {
window.open('plans/lagoon_01.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function lagoondos() {
window.open('plans/lagoon_02.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function lagoontres() {
window.open('plans/lagoon_03.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
< /script >

< script LANGUAGE="JavaScript" >
function lagoon_layout() {
window.open('layout/lagoon_layout.htm','','toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=472,height=378,left=100,top=100');
}
< /script >

< script LANGUAGE="JavaScript" >
function comingsoon() {
window.open(’comingsoon.htm’,'’,'toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=550,height=320,left=100,top=100?);
}
< /script >

< script LANGUAGE="JavaScript" >
function beach_layout() {
window.open(’layout/beach_layout.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=472,height=378,
left=100,top=100?);
}
< /script >

< script LANGUAGE="JavaScript" >
function beachuno() {
window.open(’plans/beach_01.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=518,height=652,
left=5,top=5?);
}
< /script >

< script LANGUAGE="JavaScript" >
function beachdos() {
window.open(’plans/beach_02.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=518,height=652,
left=5,top=5?);
}
< /script >

< script LANGUAGE="JavaScript" >
function beachtres() {
window.open(’plans/beach_03.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=518,height=652,
left=5,top=5?);
}

< /script >

I’m no JavaScript programmer but I gotta think there is a much better way to do this. Oh, wait. I got it:


< script LANGUAGE="JavaScript" >
function galeria() {
window.open('galeria/index.html','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=550,height=320,left=100,top=100');
}
function galeriageneral() {
window.open('galeria_general/index.html','','toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=550,height=320,left=100,
top=100');
}
function marina_layout() {
window.open('layout/marina_layout.htm','','toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=472,height=378,
left=100,top=100');
}
function maps() {
window.open('maps.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=730,height=469,left=25,top=25');
}
function uno() {
window.open('plans/01.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function dos() {
window.open('plans/02.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function tres() {
window.open('plans/03.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function cuatro() {
window.open('plans/04.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function cinco() {
window.open('plans/05.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function lagoonuno() {
window.open('plans/lagoon_01.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function lagoondos() {
window.open('plans/lagoon_02.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function lagoontres() {
window.open('plans/lagoon_03.htm','','toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=518,height=652,left=5,top=5');
}
function lagoon_layout() {
window.open('layout/lagoon_layout.htm','','toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=472,height=378,left=100,top=100');
}
function comingsoon() {
window.open(’comingsoon.htm’,'’,'toolbar=no,location=no,
directories=no,status=no,menubar=no,scrollbars=no,
resizable=no,width=550,height=320,left=100,top=100?);
}
function beach_layout() {
window.open(’layout/beach_layout.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=472,height=378,
left=100,top=100?);
}
function beachuno() {
window.open(’plans/beach_01.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=518,height=652,
left=5,top=5?);
}
function beachdos() {
window.open(’plans/beach_02.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=518,height=652,
left=5,top=5?);
}
function beachtres() {
window.open(’plans/beach_03.htm’,'’,'toolbar=no,
location=no,directories=no,status=no,menubar=no,
scrollbars=no,resizable=no,width=518,height=652,
left=5,top=5?);
}
< /script >

Reduction in code bloat: 18%

Now, take that and place it into an external JavaScript file and you have over a 95% reduction in unneccessary on-page code related to this script. This is a clear example on why you should largely be able code yourself rather than rely on software to do it for you.


Discover Link Building Secrets from 20 Industry Pros

Stoney G deGeyter

Stoney deGeyter is an author, husband, father, business leader and tweeter. He is currently working on 2014 update of his famous Best Damn Web Marketing Checklist, Period!. He leads an exceptional crew of web marketers who work overtime to make him look good. In his free time Stoney gets involved in community services and ministries, enjoys his bride and loves on his kids. Read Stoney's full bio.

Follow Stoney:

Twitter LinkedIn Google+ 

One Response to To Code By Hand or Not to Code By Hand

  1. Tommy Brown says:

    Well what you say makes sense if you are in complete control of the server. Most people I know would not know one from the other. I myself use an interface. “Quicksitemaker” is my interface software. I guess one could use companies that host your server but that cost a lot each month. I used rackshack.net for a couple of years for one website I owned but soon it was to costly for the income that site was bringing in. Godaddy.com has their servers and I will try them soon one day in the near future because of their ability to have applets installed on them. Mine only takes HTML and some Java Script.

    I wish there was a school for folks like me to go to so we could learn how to maintain a server to host forums and such. I have a Associates degree in Electronics but it never prepared me for all this. I learned HTML by practice, practice, and more practice. Well I have said enough for one comment. Please feel free to email me I enjoy learning.