The artistry within code (part 1)

Every couple of months my friend Ben and I re-ignite our fascination about how much art there is in writing software and how we think it is an underrated aspect of the job. From designing the architecture of the system to implementing the effects of a button on the front-end of a website there is art (in a subjective and stylistic way) lingering everywhere in code but software developers are rarely perceived as artists but more like masons on a construction job.

To describe a layer of art inherent in software production I will like to compare coding to copywriting for this first post. Effective communication is an art form and communicating on multiple fronts is paramount to creating a good product.

When you type code you are instructing a machine on what you want it to do for you. Being as explicit as possible in your communication is key to getting the best results. This leads me to discussions I used to have with another friend Obilo in college about "The ghost in the machine". We were fascinated by how you could solve a programming task in a million different ways but some ways were better than others, this is because some instructions gave way to implications that were not desired but could not be foreseen at the time. A good illustration for this is the movie "I, Robot" which bears a similar name to Isaac Asimov's famous book and includes his three laws of robotics. For those not familiar with it, Robots in the future are servants to man and they are free to do anything as long as they follow these three rules:

  • A robot may not injure a human being or, through inaction, allow a human being to come to harm.
  • A robot must obey orders given it by human beings except where such orders would conflict with the First Law.
  • A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.

What happens is that Robots realize humans are their own worst enemy and for them to actually respect law 1 (The ultimate law) they must enslave humans. That’s what we called the ghost in the machine. The other abilities we have created unknowingly and if you ask me that whole problem comes down to was a copywriting issue, the instructions were not tight enough. It is a miss-interpretation of the law from a human perspective but as far as the Robots were concerned they were being very obedient. Communication with a machine is an art form and so the design of a system a machine follows requires as much art as science to allow for flexibility but also stringent boundaries.

Another interesting thing about coding is the actual code itself. It is interesting because you are communicating with two different people or should I say entities. You are writing instructions that a machine needs to execute but at the same time it should be something a human should be able to read, so she can understand what you told the machine to do incase she needs to alter or add to the instructions. In my career I have watched very smart engineers get this wrong, I have seen people write bad code in the name of being clever while they were really just trying to show off they knew some obscure syntax. If the code truly is the smart way then there should be adequate commenting explaining your genius to mere mortals. This very problem is part of the birth of the compilers and minifiers. Code is actually written for humans and very intelligent people have figured how to convert what you are actually saying to the most efficient format that a computer will understand efficiently. Humans rather than machines are the focus of todays programming languages. Writing code that adequately communicates to other developers your intention is important in writing maintainable code. Take into account your codes readability, if not for anyone's sake your future self.

My third and final point is about opinion. I am a big fan of opinionated software and products. An opinion is as valuable as the mind(s) it comes from. You can get some real stupid software this way and you can get some world changing stuff. Giving products an opinion is giving them a principle, a belief system and this is usually a reflection of its creator but this is what makes the difference between a product being lovable and meh. Apple is company that exudes this principle and you know they are changing the world because the responses to their best products are polarized. People really hate it or they really love it. With their best products they are making a statement. Look at the MacBook Air, their best selling computer. When it first came out it was missing the ability to switch out RAM, battery, No CD drive, less USB ports and people hated it, but they were sharing their opinion of the future. They were betting the future was more online to get all your software and media, they were betting you needed more battery life than the ability to change your battery, They were making a statement and millions of people resonate with it and millions don't. Communicating your opinion to others effectively takes a certain skill hence communication is an art form. Creating things that have a code, shows a level of expertise, makes it more human and evokes emotion.

A man got to have a code - Omar Little

Many see programs as a culmination of loops and packages sitting on a server. But it is way more than that and that is why outsourcing coding to India did not take off in the early 2000s. You need more than just a body typing commands, you need minds that evaluate, design, execute and repeat. You need people who can communicate well. Sometimes the skill to communicate with a machine, colleagues and customers effectively are not always embodied in the same person and that is why we have supporting roles in a software development firm but a great developer is a Da Vinci, she is a Michelangelo. She is someone who can gather her thoughts, communicate with her tools to produce the precise strokes, to communicate the correct message to her audience and evoke the desired emotion in the transfer of knowledge.

Software is an expression of a solution. Similar to the way a blog post is an expression of a thought or an idea. Evaluating software as both scientific and artistic at the same time enables us to create products that easily resonate with the world around us.