Posts by admin

Code Craftsman, Code Warrior, or Just Sandwich Artist

[et_pb_section admin_label=”section”][et_pb_row admin_label=”row”][et_pb_column type=”4_4″][et_pb_text admin_label=”Text”]


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 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.

When dealing with code, the tangible qualities of beauty, quality, and clarity are what we use to choose, for example, one free JavaScript library 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’s welcome. Instead, why can’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 in unforseen ways. I don’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, “well those aren’t logically equal” or “that’s a horrible way to test” or “that is fragile and stupid”. 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['EDITOR']

if os.environ['EDITOR']:
print os.environ['EDITOR']

if os.environ['EDITOR'] == "vim":
print "vim"

var = "vim"
if os.environ['EDITOR'] == var:
print os.environ['EDITOR']

Let’s take a similar example with music. Let’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.

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 “”. 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, “yeah but….”. Don’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 to assist in my point:

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’t think that they realize there is a trade off in analogy as opposed to qualitative description. Analogy by it’s self will take us back to medieval times. Instead, let’s just describe what makes a good programmer qualitatively 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.



If people are so fond of these analogies, then I must take it to it’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 between bars when coding. So, let’s enjoy both, but as things that are distinctly different.





Read More

The “Moral Hazard” of Insurance

In the insurance industry, the idea that the protection insurance offers the consumer promotes a more reckless attitude on the part of said consumer is referred to as “moral hazard”. Apparently, since we have the material possessions in our homes insured against burglary, we are less likely to lock our doors for example. While I consider this an issue of contention, I do see competitive insurance as a for profit endeavor to be a serious moral hazard.

All forms of insurance seek to achieve the same end. Take a catastrophic event like a fire in your home; The goal is to spread the risk of suffering a loss among a larger number of people. Essentially, we each contractually pay into a shared savings account. In the event of a fire, the burden of recovering from this fire is paid for by the shared account. The insurance company would rather it be said that you pay a premium in exchange for the company assuming the risk rather than you. This is not the case; effectively we are insuring each other against fire, theft, car accidents, flood, dog bites, and the like. So what does the insurance company actually do?

Well, the insurance company takes all that premium money and invests it. Then they make profits off the interest. They don’t really provide any sort of service. They actually sell us all our own money back to us at a profit. I call that a “moral hazard”.

To make matters worse, excepting legislation to protect the consumer (gee, wonder why that had to happen), the insurer is the arbiter of who gets insured, at what rate, and what benefits they are entitled to should a claim be made. This offers the insurance company the opportunity to control risk. You can see the power of abuse inherent in such an oversight of the basic function of insurance when you consider the pre-existing condition exclusions that are at the center of our national health care debate. This is another great example of a real “moral hazard”, and its not you and I failing to lock a door.

Allowing ANY exclusion or variance based on social characteristics (high theft neighborhoods have higher home and car insurance premiums for example) does not properly serve the interest of the consumer and is itself a near-certain moral hazard. Sure, if my home costs 2,000,000 to replace and yours costs 95,000, I would expect to have a proportional premium. Allowing geography to play into it, however, is punitive and a disservice.

Taking away the ability of an insurance company to assess risk, however, removes all purpose from the enterprise. Insurance companies, unlike other businesses, cannot control the supply of their service (Blue Cross can’t add more doctors to Summa) or otherwise add value. Instead, they must either reduce the quality of the actual service provided to the consumer (HMO’s and “Recommended Collision Repair Centers) or take advantage of statistical (but not certain) data about the social and behavioral characteristics of certain consumers. Both, clearly, are ripe for hazard of the moral kind.

All this makes insurance a unique “product” that’s very nature renders it unsuitable as a private enterprise. If being in the business of making money off the fact that suffering and misery WILL happen, but maybe to somebody else, isn’t a moral hazard, I don’t know what is.

Read More


I think my feelings on illegal immigration have at last reached critical mass. Arizona’s new social travesty masquerading as a Law is akin to punching Lady Liberty in the bread box. I am ashamed to share a nationality with these people.

No illegal immigrants are taking jobs from “us”. There is no “us” and “them”. There are millions of PEOPLE living here, fancy papers and skin color aside, that work, go to school, buy food, see movies, mow the grass, raise children, and even pay taxes. These PEOPLE are US.

If the good citizens of Arizona were really interested in curtailing immigration they would rally federal support for accountability of American enterprises operating in Mexico. They would urge Congress to enforce a minimum wage on those companies and insist they honour environmental laws. But that’s not what its about.

Hiding behind the noble banter of “Rule of Law” and “Illegal” lurks the insidious secret of the right: They hate these brown bastards. Pure and simple.

This law doesn’t just compel Arizona Police to ferret out working class people and treat them as criminals. If that’s all they were after they already had that power available. Rather, it gives not only the power but the obligation to demand proof of citizenship “where reasonable suspicion exists that the person is an alien who is unlawfully present in the United States”. Guess what guys, they sure ain’t going to reasonably suspect Little Johnny Irish of being here illegally. That honour goes to the brown people of Arizona; apparently automatically guilty, and required to prove themselves innocent.

I’m sure that this law will not last long, as it violates the Constitution(Article 1, Section 8, supported by numerous Supreme Court cases as giving Congress the power to govern entry into the country). The real issue here is how misled the whole thing is and how disheartening it is to watch what are otherwise good people succumb to hate.

I’ll leave you with the poem on the Statue of Liberty:

Not like the brazen giant of Greek fame,

With conquering limbs astride from land to land;

Here at our sea-washed, sunset gates shall stand

A mighty woman with a torch, whose flame

Is the imprisoned lightning, and her name

Mother of Exiles. From her beacon-hand

Glows world-wide welcome; her mild eyes command

The air-bridged harbor that twin cities frame.

“Keep ancient lands, your storied pomp!” cries she

With silent lips. “Give me your tired, your poor,

Your huddled masses yearning to breathe free,

The wretched refuse of your teeming shore.

Send these, the homeless, tempest-tost to me,

I lift my lamp beside the golden door!”

Read More

Allocation and Consequence

Pigeon FeathersThis weekend, I found the consequences of a hawk catching a pigeon in my driveway. It basically looked as though a grenade had blown it to pieces.  There were about a hundred and fifty feathers spread all over, strangely, there was not much red in the picture. This led me to a few thoughts on economics.

Also, this weekend, a couple of friends of mine, were having an extremely esoteric argument about version control systems. This is all the rage in programming right now.

It is wonderful that we have enough free time to discuss these obscure topics, but it is also one of the primary reasons that economists are led to believe that they are the only ones thinking about the “important” or “real” problems.

Seeing the pigeon, bothered me in a strange way, perhaps that I am not thinking about the important problems enough. Second, it’s body was completely annihilated, it is rare that we humans are left like that. Even if we die from a car accident or cancer, our bodies are usually left in tact for a funeral and burial. Humans like to control this process. To leave another human to be eaten by an animal is an insult to our pride. We are obsessed with the process.

The free spirited mind spends so much time thinking and arguing about the minutia, but in the end success or failure is binary, life or death. It is similar to how kittens play, while adults hunt and defend.

Your business and/or professional model must work or you will die. You can struggle all you want and still, indeed, fail. There is nothing wrong with incorporating new thoughts and techniques into your hunt, but do not place too much time and energy into fine tuning means to an end, while loosing sight of the end. In fact, we all fail eventually!

Read More

Healthcare Law Henceforth

I propose a new law that will empower all people. It is called the Health Care Reform Amendment Act 2010 and will henceforth be called The Law, with all the weight and profundity so implied.

Past reforms have proposed ridiculous ideas such as giving all people free health care managed by the government, while others have proposed forcing individuals to buy health care. These are all ridiculous and untenable. How can one imagine a resource distribution model that circumvents the market place? I call such nonsense flatly un-American. This is, above all things, a deeply principled nation after all.

I propose a new free market approach. First, company HR departments will be prohibited from buying insurance for their employees. This will empower individuals to research and purchase insurance based on it’s merits and price.

Second, we will circumvent the Hippocratic Oath by prohibiting individuals from going to the hospital if they do not have insurance. It will now be a crime punishable by fine and imprisonment.

This will empower individuals to make their own decisions about healthcare. Smart, shrewd individuals will be rewarded, while those who make bad decisions will be punished with death in the street at the scene of a car accident. More important than rewarding good decisions, The Law must assuredly punish bad ones. Its the American way.

These changes are necessary America. Without them, we will continue to give away health care and promote moral hazard in it’s most dastardly form and individuals will be crushed under the force of bureaucracy and government. I am sure you all agree no fate is worse than that dealt at the hands of government; even an identical or markedly worse fate at the whim of the American privateer.

Read More