Blog

Transparency and consistency: A magic formula for the web

Published on Aug 20, 2009 by Roman Kofman | 0 comments

Overview

As Webitects gets more and more projects that call for a Web 2.0 approach, I find that my skills as a web developer transfer surprisingly well to developing online communities. Concepts which seem endemic to community development are ones I learned while learning to be a good coder. In this three part series, I will explore how the concepts of transparency and consistency apply to writing good code, designing usable websites, and building strong communities.

The importance of good code

Non-technical people often underestimate the importance of writing good code. What else is there, other than making code that works? As long as a widget appears in the right place, and does what it's supposed to, that's good enough. Unfortunately, the truth is much more complex. The widget will need to change. For example, a customer needs to add YouTube videos to their image gallery. Suddenly, the image gallery needs to be transformed into a generic media library.

Code as communication

When features get added, it can be a real time-sink to figure out where to make changes, and what code to keep as is. Imagine trying to edit a book without a table of contents, chapters, index, or page numbers. That's what working with poorly written code feels like.

Good code, on the other hand, communicates its intent very clearly. It is easy for the next programmer (usually your future self) to figure out exactly what the code does, and how to work with it effectively. Code that abides by good coding standards tends to be very easy to read. It is transparent in its intent, and consistent in its implementation.

Let me finish with a quote from Ward Cunningham, as delivered by Robert Martin at RailsConf2009:

Robert Martin: "What is clean code?"
Ward Cunningam: Clean code is when you look at a routine, and it's pretty much what you expected.

"Pretty much what you expected." That's the responsibility of a good programmer toward his code. He makes sure that a competent future programmer can understand the code fully and consistently.

0 comments

Post a comment

Please type in WEBITECTS