3 comments
Bloated Code
(2007-07-05 00:00:00) by Simon LangGenerated code is:
The stuff generated by "What You See Is What You Get" editors like Dreamweaver or Frontpage
Generated code tends to be:
- not standards compliant
- not human readable
- far lengthier than necessary (bloated!)
Which means:
- they are a nightmare to edit
- search engines are less happy with them
- they take longer to download
- they are semantically meaningless
The solution?
Write all code by hand!
But doesn't that mean wasted time?
Not at all. In fact, if you write good clean, reusable code once you may never need to change it again. Simply copy and paste into your new project, and you are on your way.
What other benefits?
- You become a better designer / developer by understanding what you are doing
- Other developers can easily pick up and continue your work (this is good!)
- Your page is an optimal size which means quick downloads
- You can guarantee your site to be Cross Browser Compatible: if you design in Microsoft FrontPage, chances are it is only guaranteed to work in Microsoft's browsers
- Seperation of style, content and behaviour. Want a change of layout for your site? Simply change the CSS file. If you generated your site and you want to change it the style and content are too tightly intertwined to change quickly and easily.
- Security benefits. When you write your own code, you know what it can and can't do (hopefully). When you use a lump of messy generic code spat out by some template generator or designed for some other system, there could be hidden vulnerabilities that you won't know about until someone exploits it and ruins your business.
Does that mean all "generator" tools are bad?
Definitely not! Some tools are incredibly helpful, and have obviously been made by highly intelligent people. These tools will not only give you good examples, but teach you how to become a better programmer, and catch your mistakes before you make them. But it is always a good idea to know WHAT the generator is generating before you go ahead and blindly use it.
A quick example
Compare the simple web page that contains one heading and one sentence:
I know which one I would rather work with...
Writing code by hand can be a daunting experience, especially if you have had no formal teaching in programming or similar. After all: how do you know if what you are writing is correct? I have found the following tools and resources to be of immense value, and are essentials for any beginner web developer: click here to visit resources page
super, i love the examples Word vs hand
Posted by Chris
654
Posted by 654
http://654
beware my evil script muhaha
< >< S<A>
SI&AS*&A^*S&^A
NOW that was some broken HTML
Posted by