DotNetCurry Logo

Software Gardening: Watering Your Garden and Software Craftsmanship

Posted by: Craig Berntson , on 3/19/2014, in Category Software Gardening
Views: 23262
Abstract: This article talks about Software Craftsmanship and what it is all about.

In the last issue of DNC Magazine, I wrote about Software Gardening: Using the Right Soil. As a quick review, soil is good Agile practice. Here are the four tenets from the Agile Manifesto:

  • Individuals and Actions over processes and tools
  • Working software over comprehensive documentation
  • Customer collaboration over contract negotiation
  • Responding to change over following a plan

Agile is an excellent guideline and is a key part of Software Gardening. But there is one problem here. Do you see it? Go ahead, read the four points of the Agile Manifesto again. In case you did miss it, the Agile Manifesto in reality has nothing to do with actually writing code. The Manifesto is all about project management.

This article is published from the DotNetCurry .NET Magazine – A Free High Quality Digital Magazine for .NET professionals published once every two months. Subscribe to this eMagazine for Free and get access to hundreds of free tutorials from experts

For Software Gardeners, we need something that helps us write better code. It turns out; this problem has already been put forth by people who also realized the Agile Manifesto tells us nothing about how to write code. They came up with a manifesto to do just that. It’s called the Software Craftsmanship Manifesto. This is the water for Software Gardeners.

Before we get into the manifesto, let’s look at what defines a craftsman. In medieval times, a person had to go through a series of steps to earn a title befitting a craftsman. Often times that person would start out as an apprentice, then perhaps move to a journeyman level, then on to something else, and eventually become and expert or craftsman.

Often times this path was part of a guild. According to Bing Dictionary, a guild was a medieval trade association: an association of merchants or craftspersons in medieval Europe, formed to give help and advice to its members and to make regulations and set standards for a particular trade.”

Even today, in some industries, to become a craftsman, you have to go through a similar path. For example, in the USA, to become a carpenter, electrician or plumber, you will often join a union (the modern version of the old-time guild), and progress through a series of levels before becoming a Master Carpenter, Master Electrician, or Master Plumber.

A Master is someone who is highly skilled in their profession. The term craftsman means that and more. A craftsman is someone who is seen as taking great pride in their work. Look at someone who makes furniture as a hobby. This person keeps refining their skills to the point that not only is the furniture sturdy and well built, but the designs carved into the wood are intricate, elegant, and beautiful.

The idea of a Software Craftsman comes directly from the concept of guilds and apprentices. Wikipedia tells us, The movement traces its roots to the ideas expressed in written works. The Pragmatic Programmer by Andy Hunt and Dave Thomas and Software Craftsmanship by Pete McBreen explicitly position software development as heir to the guild traditions of medieval Europe.” (If you were with me in my first column here in DNC Magazine titled Software Gardening: Software is Not a Building, the concept of Software Gardening traces its roots back to The Pragmatic Programmer.) Here’s a picture of a Craftman’s shop in the Witte Museum in San Antonio, TX.

craftsmanshop

Now, without further ado, here are the four tenets of the Software Craftsmanship Manifesto. As you read them, pay attention to how they intertwine with the Agile Manifesto:

  • Not only working software, but also well-crafted software
  • Not only responding to change, but also steadily adding value
  • Not only individuals, but also a community of professionals
  • Not only customer collaboration, but also productive partnerships

Let’s look at each one in more detail to learn what Software Craftsmanship is all about.

Well-crafted software

How many projects have you had that is new development? How many that are enhancing an existing application? If you do more new development than maintenance, you’re one of the lucky few. Most of us work far more on existing applications. And we always hate the code and come to say bad things about the person that originally wrote the code, often times that person was yourself.

But there is a better way. If we write the code to be more maintainable in the beginning, the maintenance would be easier. This means interfaces, small methods, single purpose classes, and more. I’ll discuss these topics and more in future columns.

Steadily adding value

When you have to add code to that poorly written module, do you cram the new code in or do you rework the old code so that it’s better? The Boy Scouts have a rule to leave the campground better than they found it. A good software craftsman should leave modified code better than he found it.

Community of professionals

Do you learn from others? Do you help others to learn? Do you encourage good practices? Do you attend user groups, conferences, code camps, etc? Do you have any non-work friends that are also developers? If so, do you talk about how to improve your skills? Do you read blogs and magazines? Do you keep abreast of new technologies or techniques? You should, if you wish to become a Software Craftsman.

Productive partnerships

Are you a detriment to your coworkers? What about your customers? How about your employer? Do you want to help them out? Do you want to help them solve their business problems? Do you do this by delivering the code as quickly as you can or do you work to have a low bug count and well-crafted code so that it will be easy to maintain.

Agilitrix lays out these four areas in quadrants that make it easy to see and understand.

craftsmanship-culture

Image Courtesy: Agilitrix

There’s another aspect to Software Craftsmanship that we can’t overlook. Returning to Wikipedia’s entry of Software Craftsmanship, we read in the first paragraph, “Software craftsmanship is an approach to software development that emphasizes the coding skills of the software developers themselves. It is a response by software developers to the perceived ills of the mainstream software industry, including the prioritization of financial concerns over developer accountability.” What this tells us is the industry typically puts money as more important than making the developer responsible for what he/she does. I don’t totally agree with quote from Wikipedia. Keeping the financial needs of the business is extremely important. But as developers, we need to be accountable for what we do. That includes the financial side of the business, the costs of development, as well as doing high quality work. My advice, make sure you understand business basics in general and more specifically your customer’s or employer’s business model and policies.

At this point you may be wondering how you can become a Software Craftsman. The short answer is, I’m not sure most developers ever do. There seems to always be a new language or technique to master. The long answer is you have to take the route of those people from medieval times. You need to learn, practice, and re-learn. You need to teach others as well as learn from them. And don’t forget to learn about not only business in general, but about your customer’s business or the business where you’re employed. At each step of the way, you need to apply what you know. When you make mistakes, you need to understand what was wrong and then not do it again.

Now that I’ve covered what Software Craftsmanship is, I need to give you a warning. A Software Craftsman also knows when to do the simplest thing. It becomes easy to over-engineer a solution and this is just a bad as writing bad code. K. Scott Allen addressed this in a recent blog post.

In his post, Scott goes through an example that applies Software Craftsmanship guidance and shows how easy it is to over-engineer, then give the simple solution that turns out is easier to write, read, test, and maintain.

In the first paragraph of his post, Scott also says, “Sometimes people will approach me and ask “what is it like to be a software craftsman?”. I’ll usually answer with: “Pffft, don’t ask me, I just cranked out 500 lines of script that are harder to read than Finnegans Wake”. At times though, I like to pretend what it might be like to be a software craftsperson.”

Like Scott, I see myself as an aspiring Software Craftsman. I work every day to improve my skills and knowledge. If you head down this path, you too can become an aspiring Software Craftsman and begin to water your software. After all, it’s a good thing to have software that is green, lush and vibrant.

Was this article worth reading? Share it with fellow developers too. Thanks!
Share on Google+
Further Reading - Articles You May Like!
Author
Craig Berntson works for one of the largest mortgage companies in the US where he specializes in middleware development and helping teams get better. He has spoken at developer events across the US, Canada, and Europe for over 20 years and is a Grape City Community Influencer. Craig is the coauthor of 'Continuous Integration in .NET' available from Manning. He has been a Microsoft MVP since 1996. Craig lives in Salt Lake City, Utah. Email: dnc@craigberntson.com Twitter: @craigber.


Page copy protected against web site content infringement 	by Copyscape




Feedback - Leave us some adulation, criticism and everything in between!
Comment posted by Damon Chong on Friday, March 21, 2014 10:51 AM
One of the culprits, I personally feel about why there are so much quality issues with software in businesses today are the issues of greed and myopia. Managers just want things fast, good and cheap. Trade-offs and limitations are alien concepts that managers don't like to hear about (until they encounter them).

I think the fact that software companies (like Microsoft) had made it so easy to code a program by any lay folks, had also lulled managers into thinking that software development is like building a house. You just pump in twice the number of construction workers (developers) and presto, the project is completed in half the time. This is the myopia part.

I continue to be amazed by companies out there that are willing to fork out a fortune for crappy software and integrated solutions which doesn't help their businesses to stand out and compete better. I believe to overcome greed is near mission-impossible. But to overcome myopia/misconceptions such as the difference between a construction worker and a master builder is something I believe guilds were set up to do.

Perhaps, this is a topic that Mr Berntson would consider in a future article.
Comment posted by Craig Berntson on Monday, March 24, 2014 2:20 PM
Damon,

I don't really agree that a lay person can write code. Visual Studio is big and complex and you still need a good understanding of programming. I think there are three problems. First, business typically does things for the short term, rather than long term. This leads to short cuts and just getting things out. Second, and it's related to the first issue, businesses have no sense of technical debt. If they don't see a cost on the P&L, it doesn't exist. Yet, it's very real. Third, colleges don't teach best practices. The professors that create the curriculum are far removed from the realities of the world and teach what interests them or what's the latest buzz words.