DEV Community

Cover image for Are you a CRAFT Coder?
Charles F. Munat for Craft Code

Posted on • Updated on • Originally published at craft-code.dev

Are you a CRAFT Coder?

Craft Code is code made with care, skill, and ingenuity. It is as simple as it can be and no simpler. It is state-of-the-art, elegant, and bespoke.

So are you a Craft Coder?

You may be a Craft Coder if ...

You follow these four practices. (There are many more, but these are the essentials.)

1. You put quality before quantity

This is not to say that quantity (speed) is unimportant. But the way to achieve speed is by improving your skill, not by rushing.

Long ago I was a fitter/welder building rail cars. When I started, my foreman told me to build bolsters, a part of the car. I was very slow and sloppy. I could build three per day working as hard as I could.

The old guy next to me appeared to be standing still. No rush at all. And yet he built ten impressive bolsters per day every day. WTF?

My boss told me not to worry about it. Focus on quality and speed will come, he said.

A year later I set the company record at fourteen bolsters in a day, and every one was flawless.

The mistake that new devs make is to focus on speed and to allow themselves to write sloppy code. Craft Coders know better.

Practice does not make perfect. Practice makes permanent. Repeat the same mistakes over and over, and you donʼt get any closer to Carnegie Hall. ~ Sarah Kay

Craft Code FTW

2. You keep things as simple as practicable, but no simpler

Occam's Razor is a famous dictum: do not needlessly multiply entities. This is often paraphrased as "the simplest solution is the best".

But that's wrong.

If that were the case, then a simple bad solution would be better than a more complex good solution. Huh?

The key word is "needlessly". What William of Ockham was saying was, "the simplest solution all else being equal is the best one". That's a big difference.

If two solutions are equal solutions, then choose the simpler one. Don't add anything you don't need. No gratuitous nuthin'.

That's how a Craft Coder codes.

Complexity is a sign of technical immaturity. ~ Daniel T. Ling

3. You prefer bespoke code whenever practicable.

There are times when commodity code makes more sense. But commodity code is always inefficient. When you use code written by others, they didn't write it for you. They wrote it for a wide variety of coders and situations.

Hence, code that you don't need is endemic to commodity code. There is no escaping it.

Writing specific, bespoke code creates the most efficient, performant code. No needless entities! Assuming, of course, that you are a good enough coder (see #1 above).

Craft Coders are confident, consistent bespoke coders. They can write commodity code, but rather than a first resort, they see it as a last one.

This is not to disparage re-use. Not at all. But first write the code yourself, then re-use it.

Avoid hasty abstractions (AHA). ~ Kent C. Dodds

4. You embrace a comprehensive approach

It is very easy for web developers to suffer from tunnel vision. When all you have is a hammer, everything starts to look like a nail, right?

If you are working in a large enterprise as another cog in the wheel, then that might be for the best. It is assembly-line, commodity code, after all. Keep those blinders on.

But Craft Coders engage themselves in the entire process of web development. And that is so much more than cranking out code.

First, there is accessibility, as specified in the WCAG 2.2 guidelines and related advice. To a Craft Coder, accessibility is not an afterthought, but something foundational. Nothing gets built without putting accessibility first.

And UX, of course, although true accessibility incorporates UX. If an application is not usable, then how can it be accessible?

But as many coders are now starting to realize, the most important approach of all is to make it sustainable. Craft Coders do so without fail. After all, there is little point in remodeling the kitchen if you're busy burning down the house.

Craft Coders consider all aspects of web development in their work. Do you?

There is no Planet B. ~ Mike Berners-Lee (son of Tim)

So, are you a Craft Coder?

If so, speak up. Craft Coding is a noble calling. But if new coders don't hear about it, then our numbers will dwindle. And that will be a sad day for web development.

Weigh in in the comments. What do you think? Are you a Craft Coder or a commodity coder? And why? And no judgement! The world needs commodity coders, too.

Top comments (1)

Collapse
 
chasm profile image
Charles F. Munat

Think Craft Beer ...