Why is good quality code important?

Checkpoint 3.2 of the Web Content Accessibility Guidelines 1.0 recommends that developers “create documents that validate to published formal grammars”. In other words, the checkpoint encourages people to use code that follows the official rules for that language.

Let’s take things back a step. Like spoken and written languages, code languages have their own rules. These rules govern spelling, punctuation and phraseology. Well written language depends on the observance of these rules. Similarly, well formed code also depends on following the rules accurately.

The importance of good coding

So why is good quality code so important? Well, let’s continue with the language analogy.

Reaching your audience

Firstly, there is a greater chance that you’ll be understood by a wider audience, if you follow the rules of spoken language correctly. Using slang terms and colloquialisms may mean that only your immediate peers understand what you’re saying. People outside of your group may not be familiar with the same phrases that you use.

It’s much the same with code language. Following the rules means that most browsers will understand the code correctly, reaching a wider audience. Using browser specific “slang” code is fine for people using that particular browser, but will probably be meaningless to people outside of that group.

Encouraging good structure

Secondly, following the rules of written language encourages the use of well constructed documents. From the moment we learn to read and write, we’re taught to use words as building blocks. We turn words into sentences, sentences into paragraphs and paragraphs into chapters. You’re not forced to use these grammatical constructs, but good writers know that using them makes it easier for people to read what they’ve written.

It’s much the same with code languages. Tags are used as building blocks instead of words, but the rules still encourage the use of good structure and composition. Using paragraphs, headings, lists and other grammatical constructs on a web page, helps people read the page more easily.

A sign of quality

Thirdly, following the rules is simply the sign of a good author. You won’t find poor writing from the pen of Oscar Wilde or Charles Dickens and you won’t find sloppy coding from the keyboard of any web standards advocate. Of course, it’s easier to be lazy and cut corners, but all that really demonstrates is a lack of knowledge and skill.

Look around any library and you’ll find countless examples of mediocre rubbish. You’ll also find those treasures of craftsmanship that truly reveal the power of good writing. It’s much the same on the web. There are untold examples of badly written websites, but the treasures are out there too.

The craftsmen and women who form the web standards movement, all believe in following the rules for their chosen code language. They understand that doing this gives them a wider audience to communicate with, a strong ability to communicate clearly and a justified sense of pride in their skill.

Add a comment

Fields marked with an asterisk (*) are mandatory.