Design & Development

Programming Notes: Importance of Hand Coding

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.

Brian Getting
Brian Getting
Bio   •   RSS Feed


x