The Artistry of Code

Programming is not a craft, but an art form.

A lot of professions out there merely require skill an experience. You do not need to be creative to be an excellent plumber, mechanic or a systems administrator. You simply need the knowledge of the systems you are supporting, and experience. Your job is to fix, assemble and optimize things and while it often pays to be clever no one expects you to be creative or innovative. In fact, innovation can bite you in the ass as it is usually better to fall back on tried and tested solutions than to make radical choices.

But if you are a programmer then creativity and ability to solve problems in a novel ways is part of your job description. This is why programmers have to solve logical puzzles during job interviews. When you apply for a job writing code, you can usually expect your interviewer to give you an impossible to solve problem, and then judge your worth on how you go about designing a solution for it. It usually doesn’t matter if you actually resolve the problem at hand, but that you demonstrate you can think creatively, and design imaginative solutions to whacked out scenarios under extreme pressure and time constraints.

Software is made by hand. It is not assembled, but weaved out of abstract ideas and representations. Programmers work is akin to that of a poet or a song writer. You take words that have meanings, assemble them into functional verses that are constrained by rules or rhythm and composition in a hope that as a whole they will convey meaning that is greater than their individual sum. You don’t manufacture software – you dream it up. A program is a distillation of creative ideas given a textual form.

Programmers frequently get inspired. They wake up in the dead of the night, stumble upon to their desk and vomit code onto their laptops in violent throes of passion. This doesn’t usually happen to IT professionals or accountants. Financial analysts are not haunted and tormented by their work. Most people live their whole lives never actually conceiving an idea that suddenly explodes in their head, and violently tugs at their frontal lobe trying to escape into the world. They never give birth to an abstraction, and give it a physical manifestation through trembling fingertips in a feverish bout of out of control creativity. This peculiar state of mind is usually associated with artists – painters, sculptors, musicians, singers, writers and poets. But programmers get it too.

We are artists who don’t create art. We are creative souls driven not by emotion, but by the rigors of logic an mathematical perfection. We write poetry that is not about love and desire but about function and procedural complexity. But we too seek beauty and aesthetic perfection in our work. If you put three programmers in a room, each of them will probably have a different opinion on how the code should be structured, what practices should be followed or even what language and/or text editor should be used. The most interesting part is that all of them will probably be correct, or at the very least have valid points.

There is no one correct way to write software. There are rules, best practices and theories but they are mostly guidelines. At the end of the day, writing software is a creative process. And it’s not like we don’t strive to inject some strict, rigid order into our profession. We study software engineering – we try to quantify, and formulate strict procedural guidelines that let us work together in teams. We have made great strides to make programming a team sport – something that is predictable, that can be measured and evaluated. But for all these efforts, we often still rely on that creative spark – that shard of brilliance exploding out of a mind pregnant with ideas. Someone still has to come up with novel algorithm, a clever new paradigm or a paradigm breaking language.

We are artists. We are digital virtuosos. We are the singers of digital songs that drive our civilization. But unlike artists, we are expected to perform consistently and every day. Novelists can have writers block, poets and musicians can run out of inspiration. Programmers are expected to sit down and write brilliant code every day. When they can’t we say they have burned out – that they are unfit for the job, that they need a break. But perhaps that’s not what really happens. Perhaps they simply need inspiration. They need a visit from their muse – a new patron goddess of the twenty first century creative souls – one that Greeks could not even dream up.

Programing is art. Functional art – commercialized one. But it does not make a difference. An graphic designer who makes money drawing cartoons, or marketing posters is still an artist. A composer who makes promotional jingles for TV commercials is still doing creative work. Same applies to programmers. Even though our creations are usually used for commercial purposes, it does not make them any less impressive, and the work we put in it any less creative.

This entry was posted in programming. Bookmark the permalink.



9 Responses to The Artistry of Code

  1. IceBrain PORTUGAL Mozilla Firefox Linux Terminalist says:

    Well, some programmers. There’s plenty out there whose job is mostly a strict application of “good practices”.

    Take my case: my job is mostly doing plumbing addons to an ERP platform to connect it with external APIs, or applying simple business rules to the process.
    Don’t get me wrong, I actually like my job for various reasons – it pays (I don’t mean a lot, I mean at all), I get to wear different hats, the coworkers are nice, etc. But it barely requires real creativity, just work.

    That said, I still feel all you described when I’m coding as a hobby, but I’m afraid we’re exceptions; none of my coworkers actually enjoys programming on their own. To them, it’s a job, nothing more.

    So, yeah, your post is true, but only for a subsection of all programmers, and it may be smaller than we’d expect.

    Reply  |  Quote
  2. StDoodle UNITED STATES Google Chrome Windows says:

    In my experience, most anything can be elevated to an art. I’ve seen plumbing I would consider “artistically done” and I’ve seen paintings I thought must be the result of someone throwing random crap at a canvas and calling it art. There is a continuum for all things; but some lend themselves more readily to artistic expression than others.

    Reply  |  Quote
  3. Ricardo DENMARK Mozilla Firefox Windows says:

    Not to mention the seminal book “The Art of Computer Programming” that is around since 1962 to prove your point. :)

    Reply  |  Quote
  4. I love programming. I spend hours a day at it and most days I find myself wishing there were more hours in the day so I could learn and code more. I try to fashion my code in the most elegant, efficient way possible. That being said, I’m coming to deeply mistrust the analogy of code as art. It suggests that there is much more room for personal preference than there should be and many people will view it as an excuse to write sub-par code that meets their own artistic tastes rather than stricter specifications.

    There is no one true way to create software. And perhaps there shouldn’t be; diversity is good. However there are some things that are more important than self-expression when it comes to code that will deployed and worked on by other. Your code must be efficient as well as elegant. Your code will be read and called far often than it will be read. That means you should stick to common style guides and practices even if they go against your own preferences. You must remember that writing code is not the point and never has been — the point is to solve the problem. Never forget that.

    It is a careful balance to maintain — between imagination and pragmatism. But it’s one we’ve been making throughout our history. We should love our work. We should get up each morning fueled by the joy of creation and inspiration. We must take professional pride in our work, but it is the pride of engineers and architects, not painters and musicians. The code should have more in common with a Rolls-Royce engine than it does with a Mona Lisa.

    Reply  |  Quote
  5. Jeff UNITED STATES Safari Mac OS says:

    “We are artists. We are digital virtuosos. We are the singers of digital songs that drive our civilization. But unlike artists, we are expected to perform consistently and every day.”

    Love this. As a writer and poet, I write every day. One thing I do is to give myself permission to write badly. Almost everything good I’ve ever written started as something bad. I wonder if it’s the same for code.

    Reply  |  Quote
  6. Derek Mozilla Firefox Windows says:

    IceBrain wrote:

    Well, some programmers. There’s plenty out there whose job is mostly a strict application of “good practices”.
    .
    .
    .
    That said, I still feel all you described when I’m coding as a hobby, but I’m afraid we’re exceptions; none of my coworkers actually enjoys programming on their own. To them, it’s a job, nothing more.
    So, yeah, your post is true, but only for a subsection of all programmers, and it may be smaller than we’d expect.

    Totally agree with IceBrain. I really enjoy programming as a profession, but I can say that I very, very rarely get big moments of inspiration outside of work. The same goes for my coworkers – we all seem to do a pretty good job at shutting off work in our brains once we step outside the doors to our building. I don’t doubt that there are very passionate programmers out there who are as you described Luke, but they are those rare individuals who enjoy, for example, coding open source frameworks in their spare time. I don’t think you do a disservice to the programming professional with this article, but you are really overly generalizing the nature of programmers.

    Reply  |  Quote
  7. Chris UNITED STATES Google Chrome Windows says:

    I’ve always seen strong parallels between programming and arts. When I was in school, the parallels between writing and programming were always very striking to me. I wouldn’t personally want to be embroiled in the debate about “what is art” that inevitably bubbles to the surface whenever anyone claims something to “be an art,” but programming is certainly creative. It is true that many people don’t realize how much creativity and personal expression goes into writing code.

    Reply  |  Quote
  8. JuJuCam AUSTRALIA Google Chrome Windows says:

    As a theatre maker (performer, director, stage hand, lighting and sound tech) who has recently returned to uni to study IT majoring in Programming, I absolutely applaud this post. I also agree with much that has been said in comments above; your points are not mutually exclusive. Derek and IceBrain, when you’re working full time on a show (an exceedingly rare treat if you expect to be paid), you do switch your creative brain off as soon as you leave the rehearsal room. Shrutarshi, your points about programming apply equally to theatre and film and other collaborative arts; yes, there are best practices for telling stories (if you think a tale can’t be told inefficiently or inelegantly you haven’t seen a poorly told story) and yes often you must work within the “house style” that is proscribed to you that may differ from your personal style, so that there is consistency between the work done by the individuals involved.

    Just because something is an art, it doesn’t mean that there aren’t rules. There’s always a tug of war between what you want to do and what practicality demands is possible. Own your art and enjoy it, it’s rare to be paid to be creative in any field.

    Reply  |  Quote
  9. Sebastian ARGENTINA Google Chrome Windows says:

    I’ve been working programming since I was 12, I’m 29 now, been working professionally for more than 7 years.
    Programming in general is not an art.
    Algorithms were. Nowadays “substandard programmers” make use of those who really were artisans of the software.
    Don’t put this words to new programmers or they will have their ego as high as the sky itself and will be untreatable resources in any project.

    Reply  |  Quote

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>