I recently finished reading Dan Cederholms Handcrafted CSS and just started reading The Pragmatic Programmer by Andrew Hunt and Dave Thomas. Both books make references to the craft of carpentry. This got me thinking of how similar these professions are.

Before I was a web programmer I worked as a carpenter and when I tell people about that I get a ”Wow, that must be a huge leap going from craftsman to nerd” and I answer with something like ”Myeaah, I guess”. But the differences aren’t really that big. Aside from growing your gut and butt instead of biceps and triceps the similarities really beat the differences.

Be Proud!

We are craftsmen and we take great pride in our work. And we should, even though we may only be a couple of small pixels in a big jpeg (or a stone in a cathedral if you will), cause our profession involves a lot of hard work and responsibility. I remember writing funny limericks or scrawling down funny pictures of work mates inside of walls when I was was working as a construction worker. The thought that, one day someone is going to rebuild this place and discover my witty scribbles inside a wall, amuses me.

In Handcrafted CSS, Dan Cederholm demonstrates how he leaves his mark on his creations (an ASCII beer in the bottom of his code). We should all have a witty tag to leave inside our code cause some day your code may be refactored. And doesn’t knowing, that someone is not only going to see your code but also a piece of your personality, make you all fuzzy inside?

For inspiration, click view source on SimpleBits and look up the beer tag right before the tag and/or visit this thread on stack overflow.

Down sides

There are some down sides of being in our profession as well. For example, you are really good at insulating buildings and you have insulated many buildings without any complaints, but one day you mess up, you use the wrong type of insulation and you get complaints from cold residents. So the only time you get feedback is when something goes wrong. I’m sure we all have had similar experiences in web projects and one of the things that makes up for this (for me at least) is being able to point at something and say ”I helped to build that” weather it be your grandmothers retirement home or a buddies twitter application.

A word of advise when you do mess up though is to not go the Microsoft way and say your supposed to wear to pair of socks in that building. Instead stand for your mishaps and offer ways to correct it.

Metaphors

I have to plug the books which inspired me to write this post. Both of them have very cool metaphor examples and my favorite right now is one from The Pragmatic Programmer. It’s called The broken window theory. In short this theory says that if you leave a broken window in a building it will give the residents a sense of abandonment and one broken window leads to another and people start littering and graffitiing the building. And finally the building will be totally tarnished.

This is very applicable on code to. If you leave bugs, bad naming conventions or temporary solutions etc unaddressed, you will soon end up knee deep in software rot. But if you keep your code clean and neat without any broken windows, no one is going to want to be the one that breaks a good rut.

// Johan