Let's be honest. Most people do not go into website design because they enjoy writing code, or because they want to root through hundreds of lines of seemingly nonsensical expressions. That comes later. Most people start with a visual idea and work from there, usually taking advantage of applications like Dreamweaver or GoLive to help them avoid writing code. While great for the beginner and available to the masses, it's important for developers to wean themselves off these tools as soon as possible.
Hand-coding, while probably not the most popular option out there, is the best way to ensure that your code is clean and compliant. Visual editors tend to make assumptions when they are automatically writing code, which can lead to code bloat (code that is unnecessarily long). For example, Dreamweaver will automatically include extra attributes on some tags, or will insert JavaScript code in order to achieve certain functionality. Even if you use these tools to make developing easier, it's important to check the code they generate by hand, removing all extra and unnecessary code.
A larger concern is that developers tend to become dependent upon visual editors, preventing them from ever looking at the code behind their web pages. One common example is the case of a developer who edits a page on a website using the wrong document type, which leads to invalid code. Another common occurrence is orphaned or improperly nested tags in generated code, sometimes due to using "find & replace" functions or excessive visual editing.
While most of the appeal of hand-coding comes in the ability to see the details, there are some subtle advantages that may not be so obvious. I have found that hand coding sharpens my attention to optimization and clean coding. Additionally, because nobody really likes to type, I have found that hand-coding encourages cleaner and more compact code that is easier to maintain. After all, when you are typing code by hand, the goal of "Do Not Repeat Yourself" becomes much more important due to it's implications on the amount of typing you have to do.
Wednesday, January 02, 2008 · 04:00 PM
I disagree the ability of Dreamweaver to create code snippets, look up attributes, real time CSS preview, code coloring and organizing, image optimazation, . . . I could go on but I'm not a paid Adobe Evangelist so I'll stop there. The viewing options with Dreamweaver can inhibit people from learning html, I agree. But they will learn html faster with Dreamweaver codeview than with just notepad.
You should retitle this article the dangers of WYSIWYG editing. Think about the inefficiency of coding 10 html pages and not doing a find + replace rather than getting some code bloat. I would welcome a competition between mr. notepad vs mr. dreamweaver (myself) to see who can replicate a simple site faster and more efficiently (with minimal code bloat). Cutting several kilobytes off of a page is really only cost saving with ultra high traffic sites. You would do better to rant on image optimization rather than code bloat. That's where hand coders could use a lesson or two in how to use software correctly.
Best,
Tim Gill
www.tjgill.com
-- Tim
Wednesday, January 02, 2008 · 04:01 PM
Agreed. For me the reality is that there are "code" editors (as opposed to dedicated text editors) that make hand-coding much easier. Additionally, under the principle of DRY coding, you shouldn't be repeating yourself too much anyway, each time I need to use "find & replace" functions I am being told that my code needs to be further abstracted.
Personally, I highly recommend using TextMate or BBEdit. Both are are great for hand coding. I'm not against Dreamweaver, but I think that eventually everyone needs to move beyond WYSIWYG editors.
-- Brian Getting
Wednesday, January 23, 2008 · 04:01 PM
In response to Ben, I think there are just as many, ahem "snobs", that don't hand code.
The real need for hand-coders is not so much for flawless code as it is for someone to have the ability to troubleshoot. No software is 100% at locating the problems in displays between browsers, or incompatible JavaScript. With the ability to code by hand comes the ability to troubleshoot.
I've ripped through more than 20 "coders" simply because they could not troubleshoot issues. I could care less if someone uses DW to create a page, but if he/she cannot troubleshoot issues, then they're no different than the thousands of others who can use a visual editor.
-- Pamela Hazelton
Connect with us