---
# Code Craftsman, Code Warrior, or Just Sandwich Artist

**URL:** https://educatedconfusion.com/code-craftsman-sandwich-artist/
Date: 2011-01-27
Author: fatherlinux
Post Type: post
Summary: [et_pb_section admin_label=&amp;#8221;section&amp;#8221;][et_pb_row admin_label=&amp;#8221;row&amp;#8221;][et_pb_column type=&amp;#8221;4_4&amp;#8243;][et_pb_text admin_label=&amp;#8221;Text&amp;#8221;] Background So, there is some debate in developer circles about whether programming is an art, a science, or both. Recently, I have heard the word Code Craftsman and even Code Artist used by folks in the blogosphere. On the one hand, there is little argument that written code can be&amp;lt;p class=&amp;quot;excert-link-wrapper&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;https://educatedconfusion.com/code-craftsman-sandwich-artist/&amp;quot; class=&amp;quot;excerpt-more-link&amp;quot; &amp;gt;Continue Reading&amp;lt;span class=&amp;quot;screen-reader-text&amp;quot;&amp;gt; &amp;quot;Code Craftsman, Code Warrior, or Just Sandwich Artist&amp;quot;&amp;lt;/span&amp;gt;&amp;lt;span class=&amp;quot;meta-nav&amp;quot;&amp;gt; &amp;rarr;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
Categories: Politics
Tags: Philosophy, Software Development
---

[et_pb_section admin_label=&quot;section&quot;][et_pb_row admin_label=&quot;row&quot;][et_pb_column type=&quot;4_4&quot;][et_pb_text admin_label=&quot;Text&quot;]

## Background

So, there is some debate in developer circles about whether programming is an art, a science, or both. Recently, I have heard the word [Code Craftsman](http://weblogs.asp.net/gunnarpeipman/archive/2010/05/27/clean-code-a-handbook-of-agile-software-craftsmanship-book-review.) and even [Code Artist](http://www.codesqueeze.com/software-engineer-vs-code-artist/) used by folks in the blogosphere. On the one hand, there is little argument that written code can be judged and appreciated on the merits of beauty, quality, and clarity. On the other hand, members of your team will not be amused by you finding new and extraordinary ways to manipulate standard syntax just to **change it up**. I think this is the danger of shackling ones self to analogies; at some point they just break down. Also, if you take yourself as too serious of a Code Craftsman you could end up in a physical confrontation like [Michelangelo and Pietro Torrigiano](http://en.wikipedia.org/wiki/Pietro_Torrigiano).

When dealing with code, the tangible qualities of beauty, quality, and clarity are what we use to choose, for example, one free [JavaScript library](http://jquery.com/) over another. But, is this so different from what we do when selecting any product? I think comparing code to art is an analogy that may have overstayed it&#039;s welcome. Instead, why can&#039;t we just talk about being good programmers who are professional and have forethought when writing code. I understand the attraction to analogies, they feel good. The problem is, they also [limit our scope of thought](http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1036.PDF) in unforseen ways. I don&#039;t think beauty alone qualifies something as art and I will detail some distinct differences between code and music to demonstrate my point.

 

## Getting Creative

Clearly, the Python example below is not art. In fact, I suspect, any coder reading this post is cringing at the way I tested the editor variable. Your probably saying things like, &quot;well those aren&#039;t logically equal&quot; or &quot;that&#039;s a horrible way to test&quot; or &quot;that is fragile and stupid&quot;. But, they produce the exact same results at this very moment on my computer. In computer programming there really is no merit placed in finding creative ways of producing the same results if they are fragile. In music, there is no concept of frail.

`print os.environ[&#039;EDITOR&#039;]`

if os.environ[&#039;EDITOR&#039;]:
print os.environ[&#039;EDITOR&#039;]

if os.environ[&#039;EDITOR&#039;] == &quot;vim&quot;:
print &quot;vim&quot;

var = &quot;vim&quot;
if os.environ[&#039;EDITOR&#039;] == var:
print os.environ[&#039;EDITOR&#039;]

Let&#039;s take a similar example with music. Let&#039;s say I am playing a standard 1/4/5 pattern which would commonly be found in a rockabilly song. One, four, and Five, simply designate the first, forth and fifth notes in the major scale are the main notes we will use to construct the song. Now, if you play guitar or piano. Make up something to this rough pattern, but stick to the pattern. Anything you can come up with is fine as long as you adhere to the basic notes. Now, when you get tired of playing the same thing over and over, **change it up** by adding a [fill](http://en.wikipedia.org/wiki/Fill_(music)).

Verse: G, A, C
Chorus: G, C
Verse: G, A, C
Chorus: G, C
Bridge: B, C
Verse: G, A, C
Chorus: G, C

Instead, it is pleasurable to listen to music if sometimes the musician *leads* in and out of the chorus with different fills. Monotony is broken by using different notes each time the musician plays a fill. Could you imagine how annoyed another programmer would get with me if I used different standards every time I created a variable. Imagine, all CAPS one time, HAlf another, CamelCase another, like modern art for variable names. In computer programming adding fills is just ridiculous, but it would make a good blog title &quot;CodeFills.com&quot;. Again the analogy breaks down because there are no *standards* when playing a song in my band, there are never written documents or tests to make sure the song passes.

 

## The Danger of Analogy

These techniques of adding interesting entropy are similar in poetry, painting, sculpting, writing prose, dance, drawing and other arts. This is not true while coding. Now, I know you have the urge to say, &quot;yeah but....&quot;. Don&#039;t! Stop making the analogy to music, or art in general, it is not useful when trying to uncover good coding practices. I will quote a paper written by [Dykstra](http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1036.PDF) to assist in my point:
&gt; By developing a keen ear for unwanted analogies one can detect a lot of medieval thinking today

People make analogies to assist in their thought process, but I don&#039;t think that they realize there is a trade off in analogy as opposed to qualitative description. Analogy by it&#039;s self will take us back to medieval times. Instead, let&#039;s just describe **what makes a good programmer** [qualitatively](http://crunchtools.com/the-qq-workflow/) using the **properties** that they actually have. Furthermore, I think it is dangerous for programmers to think of themselves as *artists*. I believe that it gives them the impression that they have creative license when they are bored. This leads to code that is fragile, untested, and difficult to read.

 

## Conclusion

If people are so fond of these analogies, then I must take it to it&#039;s logical conclusion. I am obliged to make a distinction between someone who composes music, and someone who can faithfully perform it on an instrument. There is creativity and art in both, but they are very different practices. Generally, pop and jazz band musicians are a bit of both composer and performer, I do not believe this is true with the programmer analogy.

I think that as a programmer, if you must be a Code Craftsman or artist, try to produce faithful renditions of the business specifications. Faithful rendition is the highest form of respect to the trade and the most productive way to code. When taking the analogy back to music, it fails because there is no productive way to play music. Likewise, there is no merit in putting in [fills](http://en.wikipedia.org/wiki/Fill_(music)) between [bars](http://en.wikipedia.org/wiki/Bar_(music)) when coding. So, let&#039;s enjoy both, but as things that are distinctly different.

 

## Links

 	- http://www.cs.utexas.edu/users/EWD/ewd10xx/EWD1036.PDF

 	- http://www.cuddletech.com/blog/pivot/entry.php?id=1150

 	- http://en.wikipedia.org/wiki/Pietro_Torrigiano

 	- http://www.codesqueeze.com/software-engineer-vs-code-artist/

[/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]

---

## Categories

- Politics

---

## Navigation

- [Education](https://educatedconfusion.com/education/)
- [Confusion](https://educatedconfusion.com/confusion/)
- [Home](https://educatedconfusion.com)
- [Confusion](https://educatedconfusion.com/category/confusion/)
- [Politics](https://educatedconfusion.com/category/confusion/politics-2/)

## Tags

- Philosophy
- Software Development

