JOB REFERRALS
    ON THIS PAGE
    ARCHIVES
    CATEGORIES
    BLOGROLL
    LINKS
    SEARCH
    MY BOOKS
    DISCLAIMER
 
 Wednesday, January 23, 2013
On the Dark Side of "Craftsmanship"

I don't know Heather Arthur from Eve. Never met her, never read an article by her, seen a video she's in or shot, or seen her code. Matter of fact, I don't even know that she is a "she"--I'm just guessing from the name.

But apparently she got quite an ugly reaction from a few folks when she open-sourced some code:

So I went to see what people were saying about this project. I searched Twitter and several tweets came up. One of them, I guess the original one, was basically like “hey, this is cool”, but then the rest went like this:
"I cannot even make this stuff up." --@steveklabnik
"Ever wanted to make sed or grep worse?" --@zeeg
"@steveklabnik or just point to the actual code file. eyes bleeding!" --@coreyhaines
At this point, all I know is that by creating this project I’ve done something very wrong. It seemed liked I’d done something fundamentally wrong, so stupid that it flabbergasts someone. So wrong that it doesn’t even need to be explained. And my code is so bad it makes people’s eyes bleed. So of course I start sobbing.
Now, to be fair, Corey later apologized. But I'm still going to criticize the response. Not because Heather's a "she" and we should be more supportive of women in IT. Not because somebody took something they found interesting and put it up on github for anyone to take a look at and use if they found it useful. Not even because it's good code when they said it was bad code or vice versa. (To be honest, I haven't even looked at the code--that's how immaterial it is to my point.)

I'm criticizing because this is what "software craftsmanship" gets us: an imposed segregation of those who "get it" from those who "don't" based on somebody's arbitrary criteria of what we should or shouldn't be doing. And if somebody doesn't use the "right" tools or code it in the "right" way, then bam! You clearly aren't a "craftsman" (or "craftswoman"?) and you clearly don't care about your craft and you clearly aren't worth the time or energy necessary to support and nourish and grow and....

Frankly, I've not been a fan of this movement since its inception. Dave Thomas (Ruby Dave) was on a software panel with me at a No Fluff Just Stuff show about five years ago when we got on to this subject, and Dave said, point blank, "About half of the programmers in the world should just go take up farming." He paused, and in the moment that followed, I said, "Wow, Dave, way to insult half the room." He immediately pointed out that the people in the room were part of the first half, since they were at a conference, but it just sort of underscored to me how high-handed and high-minded that kind of talk and position can be.

Not all of us writing code have to be artists. Frankly, in the world of painting, there are those who will spend hours and days and months, tiny brushes in hand, jars of pigment just one lumens different from one another, laboring over the finest details, creating just one piece... and then there are those who paint houses with paint-sprayers, out of cans of mass-produced "Cream Beige" found at your local Lowes. And you know what? We need both of them.

I will now coin a term that I consider to be the opposite of "software craftsman": the "software laborer". In my younger days, believing myself to be one of those "craftsmen", a developer who knew C++ in and out, who understood memory management and pointers, who could create elegant and useful solutions in templates and classes and inheritance, I turned up my nose at those "laborers" who cranked out one crappy app after another in (what else?) Visual Basic. My app was tight, lean, and well-tuned; their apps were sloppy, bloated, and ugly. My app was a paragon of reused code; their apps were cut-and-paste cobbled-together duct-tape wonders. My app was a shining beacon on a hill for all the world to admire; their apps were mindless drones, slogging through the mud.... Yeah, OK, so you get the idea.

But the funny thing was, those "laborers" were going home at 5 every day. Me, I was staying sometimes until 9pm, wallowing in the wonderment of my code. And, I have to wonder, how much of that was actually not the wonderment of my code, but the wonderment of "me" over the wonderment of "code".

Speaking of, by the way, there appear to be the makings of another such false segregation, in the areas of "functional programming". In defense of Elliott Rusty Harold's blog the other day (which I criticized, and still stand behind, for the reasons I cited there), there are a lot of programmers that are falling into the trap of thinking that "all the cool kids are using functional programming, so if I want to be a cool kid, I have to use functional programming too, even though I'm not sure what I'm doing....". Not all the cool kids are using FP. Some aren't even using OOP. Some are just happily humming along using good ol' fashioned C. And producing some really quality stuff doing so.

See, I have to wonder just how much of the software "craftsmanship" being touted isn't really a narcissistic "Look at me, world! Look at how much better I am because I care about what I do! Look upon my works, ye mighty, and despair!" kind of mentality. Too much of software "craftsmanship" seems to be about the "me" part of "my code". And when I think about why that is, I come to an interesting assertion: That if we take the name away from the code, and just look at the code, we can't really tell what's "elegant" code, what's "hack" code, and what was "elegant hack because there were all these other surrounding constraints outside the code". Without the context, we can't tell.

A few years after my high point as a C++ "craftsman", I was asked to do a short, one-week programming gig/assignment, and the more I looked at it, the more it screamed "VB" at me. And I discovered that what would've taken me probably a month to do in C++ was easily accomplished in a few days in VB. I remember looking at the code, and feeling this sickening, sinking sense of despair at how stupid I must've looked, crowing. VB isn't a bad language--and neither is C++. Or Java. Or C#. Or Groovy, or Scala, or Python, or, heck, just about any language you choose to name. (Except Perl. I refuse to cave on that point. Mostly for comedic effect.)

But more importantly, somebody who comes in at 9, does what they're told, leaves at 5, and never gives a rat's ass about programming except for what they need to know to get their job done, I have respect for them. Yes, some people will want to hold themselves up as "painters", and others will just show up at your house at 8 in the morning with drop cloths. Both have their place in the world. Neither should be denigrated for their choices about how they live their lives or manage their careers. (Yes, there's a question of professional ethics--I want the house painters to make sure they do a good job, too, but quality can come just as easily from the nozzle of a spray painter as it does from the tip of a paintbrush.)

I end this with one of my favorite parables from Japanese lore:

Several centuries ago, a tea master worked in the service of Lord Yamanouchi. No-one else performed the way of the tea to such perfection. The timing and the grace of his every move, from the unfurling of mat, to the setting out of the cups, and the sifting of the green leaves, was beauty itself. His master was so pleased with his servant, that he bestowed upon him the rank and robes of a Samurai warrior.

When Lord Yamanouchi travelled, he always took his tea master with him, so that others could appreciate the perfection of his art. On one occasion, he went on business to the great city of Edo, which we now know as Tokyo.

When evening fell, the tea master and his friends set out to explore the pleasure district, known as the floating world. As they turned the corner of a wooden pavement, they found themselves face to face with two Samurai warriors.

The tea master bowed, and politely step into the gutter to let the fearsome ones pass. But although one warrior went by, the other remained rooted to the spot. He stroked a long black whisker that decorated his face, gnarled by the sun, and scarred by the sword. His eyes pierced through the tea maker’s heart like an arrow.

He did not quite know what to make of the fellow who dressed like a fellow Samurai, yet who would willingly step aside into a gutter. What kind of warrior was this? He looked him up and down. Where were broad shoulders and the thick neck of a man of force and muscle? Instinct told him that this was no soldier. He was an impostor who by ignorance or impudence had donned the uniform of a Samurai. He snarled: “Tell me, oh strange one, where are you from and what is your rank?”

The tea master bowed once more. “It is my honour to serve Lord Yamanouchi and I am his master of the way of the tea.”

“A tea-sprout who dares to wear the robes of Samurai?” exclaimed the rough warrior.

The tea master’s lip trembled. He pressed his hands together and said: “My lord has honoured me with the rank of a Samurai and he requires me to wear these robes. “

The warrior stamped the ground like a raging a bull and exclaimed: “He who wears the robes of a Samurai must fight like a Samurai. I challenge you to a duel. If you die with dignity, you will bring honour to your ancestors. And if you die like a dog, at least you will be no longer insult the rank of the Samurai !”

By now, the hairs on the tea master’s neck were standing on end like the feet of a helpless centipede that has been turned upside down. He imagined he could feel that edge of the Samurai blade against his skin. He thought that his last second on earth had come.

But the corner of the street was no place for a duel with honour. Death is a serious matter, and everything has to be arranged just so. The Samurai’s friend spoke to the tea master’s friends, and gave them the time and the place for the mortal contest.

When the fierce warriors had departed, the tea master’s friends fanned his face and treated his faint nerves with smelling salts. They steadied him as they took him into a nearby place of rest and refreshment. There they assured him that there was no need to fear for his life. Each one of them would give freely of money from his own purse, and they would collect a handsome enough sum to buy the warrior off and make him forget his desire to fight a duel. And if by chance the warrior was not satisfied with the bribe, then surely Lord Yamanouchi would give generously to save his much prized master of the way of the tea.

But these generous words brought no cheer to the tea master. He thought of his family, and his ancestors, and of Lord Yamanouchi himself, and he knew that he must not bring them any reason to be ashamed of him.

“No,” he said with a firmness that surprised his friends. “I have one day and one night to learn how to die with honour, and I will do so.”

And so speaking, he got up and returned alone to the court of Lord Yamanouchi. There he found his equal in rank, the master of fencing, he was skilled as no other in the art of fighting with a sword.

“Master,” he said, when he had explained his tale, “Teach me to die like a Samurai.”

But the master of fencing was a wise man, and he had a great respect for the master of the Tea ceremony. And so he said: “I will teach you all you require, but first, I ask that you perform the way of the Tea for me one last time.”

The tea master could not refuse this request. As he performed the ceremony, all trace of fear seemed to leave his face. He was serenely concentrated on the simple but beautiful cups and pots, and the delicate aroma of the leaves. There was no room in his mind for anxiety. His thoughts were focused on the ritual.

When the ceremony was complete, the fencing master slapped his thigh and exclaimed with pleasure : “There you have it. No need to learn anything of the way of death. Your state of mind when you perform the tea ceremony is all that is required. When you see your challenger tomorrow, imagine that you are about to serve tea for him. Salute him courteously, express regret that you could not meet him sooner, take of your coat and fold it as you did just now. Wrap your head in a silken scarf and and do it with the same serenity as you dress for the tea ritual. Draw your sword, and hold it high above your head. Then close your eyes and ready yourself for combat. “

And that is exactly what the tea master did when, the following morning, at the crack of dawn he met his opponent. The Samurai warrior had been expecting a quivering wreck and he was amazed by the tea master’s presence of mind as he prepared himself for combat. The Samurai’s eyes were opened and he saw a different man altogether. He thought he must have fallen victim to some kind of trick or deception ,and now it was he who feared for his life. The warrior bowed, asked to be excused for his rude behaviour, and left the place of combat with as much speed and dignity as he could muster.

(excerpted from http://storynory.com/2011/03/27/the-samurai-and-the-tea-master/)

My name is Ted Neward. And I bow with respect to the "software laborers" of the world, who churn out quality code without concern for "craftsmanship", because their lives are more than just their code.


Thursday, January 24, 2013 12:26:57 AM (Pacific Standard Time, UTC-08:00)
This is an excellent and timely post. Thanks.
Tim Barrass
Thursday, January 24, 2013 3:54:30 AM (Pacific Standard Time, UTC-08:00)
I sort-of agree with you, but I have a couple of things to add.

Firstly, I don't think we should be opposed to the bigging-up of software development as a skill that requires patience, intelligence, thoughtfulness and so on. We need there to be some people explaining to the world that software development is hard, requires time and effort, and can't be done well by just anyone (though most people could do some software development with adequate training). The alternative is to permit the idea that software development is easy, that standards don't matter, that if it *looks* like it's working, that's probably good enough. Sometimes it is. But it frequently isn't, and we need to be able to distinguish between the two.

Also, there is no way that Heather Arthur - a person who writes open source software, has an active Github account, understands enough of the principles behind regular expressions and file search-and-replace to effectively reimplement a subset of sed/grep/find in JavaScript - is a "software laborer". She happens to either a) not be hugely familiar with sed or b) familiar with it but sufficiently dissatisfied with it to want an alternative. The reason she was criticized is twofold:

Firstly, that the sed/awk/grep/find toolchain is regarded by some people as an exemplar of the 'Unix philosophy' of lightweight single-purpose tools that can be combined to produce meaningful output. A tool which handles file path traversal, search and replace, regular expressions etc. in one package is not loosely coupled, and this is unambiguously bad if a loosely coupled alternative is feasible (which it must be, since it exists). However, most people aren't all that aware of the Unix philosophy, or its applicability to this scenario. It's a general problem in our field that "those who do not remember history are doomed to repeat it", and I think that's the spirit in which Heather's program was being criticized.

Secondly, there are a lot of people who use Github as a self-promotion tool. They reinvent the wheel (badly) in today's hot language and others who are similarly unaware of history will use their tool without ever learning that, hey, we figured out how to do this better in the 1970s! Because these users don't know any better, they start using this tool because it's in JavaScript, and before long the repo has 100 forks and 1000 watchers and everyone thinks the developer is really cool. But they're not - they wasted their own time and other people's time creating a tool which is less flexible than the existing standard tool. Maybe it's right to point out that a lot of Github projects are vanity projects which exist to make the developer look good despite adding absolutely nothing to the sum total of software functionality available to us.

I'm not saying that this is right, just that I can see why people think that way, and I'm not sure they're entirely wrong, or that they should be deterred from saying it because it makes some people feel bad.
Rob
Thursday, January 24, 2013 3:55:09 AM (Pacific Standard Time, UTC-08:00)
So true - and that attitude comes also from some so-called "leaders" like "Uncle Bob", that encourage it, by using words like "clean coder", like the rest are some dirty creatures to be despised..
Tudor
Thursday, January 24, 2013 7:39:50 AM (Pacific Standard Time, UTC-08:00)
I have to disagree with the conclusions you've drawn here. There must be a distinction made between a movement which espouses self-improvement and good practices, and the people within that movement who are human and subject to moments of pettiness, snarkiness, and junior high meanness. Otherwise, we throw out the baby with the bathwater. Every organization dedicated to a set of principles has members who use those principles to set themselves above other people to better their self-esteem. Whether it's exercise enthusiasts poking fun at fat people, software craftsmen belittling Visual Basic code, or the French deriding everybody who isn't French. I'm not saying the software craftsmanship movement shouldn't be doing a better job of policing this behavior, so I applaud your post, but I would hate to see all the work put into improving the modularity, testability, and maintainability of code go down the drain simply because some of its more prominent members had a catty day.
Kerry
Thursday, January 24, 2013 7:59:09 AM (Pacific Standard Time, UTC-08:00)
Maybe I'm reading too much into your blog post, but it seems to me like you've associated "craftsmanship" with elitism and decided that the two are inseparable. Defining and taking sides with a "laborers" group just deepens a line in the sand, in my opinion. I think a more productive stance would be to stand up to elitism and snobbery regardless of whether you see yourself as a "craftsman" or a "laborer" or an "other", and work towards mutual respect, empathy, and understanding towards everyone in our field. That being said, I enjoyed reading your post. Thanks for taking the time to put your opinion out there.
Gary Johnson
Thursday, January 24, 2013 8:29:05 AM (Pacific Standard Time, UTC-08:00)
Hey, Ted. Long time...

In your story, isn't the first Samurai a master of Chardō? He is a craftsman, in the true spirit of the word. So I'm probably missing the point.

I remember the farmer comment :) I think I said 30%, but I stand by what I said. And it isn't really an elitist stance. Instead, I feel that programming is hard work. At the end of a day of coding, I'm tired. And so I believe that if you are asking someone to do programming, then it is in both your and their interest that they are doing something they enjoy. Because if they don't enjoy it, then they are truly just a laborer, working hard at something that has no meaning to them. And as you spend 8 hours a day, 5 days a week doing it, that seems like an awful waste of an intelligent person's life.

The farming quote was a deliberate attempt at being shocking to make a point. But I still think it is valid. I'd guess that 30% of the developers I meet are not happy in their work. And I think those folks would be happier and more fulfilled doing something else that gave them more satisfaction.

No one should have to be a laborer.


Dave
Dave Thomas
Thursday, January 24, 2013 8:30:53 AM (Pacific Standard Time, UTC-08:00)
I appreciate this being said. I always recall that Kent Beck thought enough about this that he added the value "Respect" to the core XP values.
Thursday, January 24, 2013 8:41:29 AM (Pacific Standard Time, UTC-08:00)
You have a logical fallacy by lumping together the people that derided Heather's code and people that are involved in software craftmanship. It's actually a huge leap of logic to make that connection, and it really retracts from the article.

However, where you take it, whether heavy-handed or not, is something I like. I find the idea of a "software laborer" both interesting and healthy. Like most valuable ideas, it's not that you've invented something new, exactly, but moreso lucidly explained something that had mostly gone unnoticed before. Thanks for that.
Nate
Thursday, January 24, 2013 9:42:02 AM (Pacific Standard Time, UTC-08:00)
Good one. Reminds me of "The Humble Programmer" from Edsger Dijkstra.
Mihail
Thursday, January 24, 2013 1:53:40 PM (Pacific Standard Time, UTC-08:00)
Now you realise that you are planting your flag firmly in the 'craftmanship' camp while propelling your position upwards by drawing a line in the sand to define another group of people as 'labourers'. Or in other words attempt to elevate yourself by patronising others with the position you think you are paying them a compliment.

Maybe you do not realise this?

However, have you considered that the craft is not how awesome and perfect you and your code are, but what is applicable for the task at hand. I think most people who you would put into either camp share the same mix of attributes whether good or bad. The important thing is if the solution created does what it is designed to do, is delivered on time for when it is needed and if the environment that the solution has been created for warrants it, that the code is easily understandable by yourself and others (that matter) so it can be developed further over time and maintained.

I don't wish to judge you, and maybe you are a great, smart guy who does good in the world, but like you I have not researched anything about you, I have simply read your assessment above and come to a conclusion, that's being human I guess.

The above just sounds like more of the same 'elitism' that has been ripe in this world from playground to the workplace since the beginning.
Andy
Friday, January 25, 2013 7:27:52 AM (Pacific Standard Time, UTC-08:00)
I don't understand your comparison between an artist and a decorator. They are separate careers whose only relationships to one another are that they have tools in common - but only in the same way that I can compare myself to an Formula 1 driver because we both drive "a car". There's as much in common between a decorator's and an artist's paintbrushes as there is between an F1 car and my Ford Focus.

Therefore to imply that a decorator is inferior to an artist is a fallacy. But if you take a decorator - there's a spectrum there, from the person who does an amazing job, puts the correct number of coats of paint on and leaves the place spotless to the guy who skimps on the paint, leaves the cans in your flowerbed and gets paint on your windows.

IMO software craftsmanship is about doing your job well. If that means that cranking out a Lightswitch app is the right thing to do, a software craftsman should do that. If it means honing a fully architected and scalable solution using a document database then that's what they should do.

Software craftsmanship for me is an answer to the problem in our industry of developers who just cannot program. We've all met them and worked with them, and they are the people who would be better off as farmers because they don't do the right thing, they generate incorrect and poorly implemented code that costs the client money, kills projects and gives our industry a bad name. You don't have to be so enthusiastic about your job that you go home at the end of the day and spend the next 8 hours working on your own pet projects, but there's nothing wrong with expecting a certain level of ability and professionalism. The software craftsmanship movement is a good answer to that, emphasising a traditional apprentice-journeyman-master model of career development that fits well with what we do.

The people who mocked Heather Arthur's code were being elitist snobs, forgetting that they have had the good fortune to work with people who have taught them well and helped them get to where they are. But in any industry you'd get master craftsmen who could be mean to apprentices - it doesn't mean the model is broken, it just means there'll always be idiots.
Jon
Friday, January 25, 2013 9:19:17 PM (Pacific Standard Time, UTC-08:00)
I ended up writing a blog post in response to this post - http://rtigger.com/blog/2013/01/25/its-okay-to-love-your-job/

TL;DR - I think it's completely unfair to associate software craftsmanship to egotistical jerks. The two are entirely unrelated. Granted, there is a handful of vocal people that fall into both categories, but just because they're good at software development AND a jerk doesn't mean good software developers are jerks.

The 2nd point of your article, "software labourers are better because they don't care about the quality of their code" is an unfair statement as well. I understand that some developers aren't as passionate about development as I am, and that's okay. I don't think any less of them, and I'd hope they don't think any less of me.
Saturday, January 26, 2013 6:58:26 AM (Pacific Standard Time, UTC-08:00)
I think Ted makes a valid point about a undercurrent in the software craftsmanship message that implies that if you are not a fanatical zealot about code, quality and the latest tools, you don't belong in the software business. Like Neward knows (he does the same in this article), getting a message across requires black and white statements, while the real world can be nuanced.

However, I love the comments in response. I think a lot of programming still is a creative, challenging task, one we should approach with respect, and should be prepared to learn and train for. I used to do a lot of coding, but I moved to other areas. Like Ted, I am sometimes tempted to think what the fuss was about back then. Maybe code quality is not that difficult or important. Until I am asked to troubleshoot some difficult problem: almost always difficult to solve because of poor coding choices.

The basic discussion should always be: how do we keep the code from becoming a uncontrollable mess. The distinction between "laborers" and "craftsman" seems, to me, not very relevant.
Peter
Friday, February 1, 2013 12:03:16 AM (Pacific Standard Time, UTC-08:00)
You just about had me up to the last paragraph - at which point there's a problem and that's use of the word "quality".

Many labourers don't worry about quality and that is really where the line is drawn.
Murph
Comments are closed.