Programming Creativity

Creativity is an interesting characteristic, because it means so many things.  Bach was creative.  So was Picasso.  Da Vinci.  Shakespeare.  Thompson and Ritchie?

Is computer programming a creative endeavour?  My instinct says yes.

Merriam-Webster defines "creative" as "having the quality of something created rather than imitated".  So by definition, everything that is created is the result of a creative act.  But that is an overly sterile perspective, I think.  If I said the word "the", I would have created sound, but it surely wasn't creative.

Creativity, to me, means that you can create appealing things out of basic building blocks.  Painters use colors, composers use notes.  Everyone has access to the same colors and notes, but not everyone can create the same paintings or compositions.  Moreover, the appreciation of the whole should be at least partially divorced from those basic blocks.  When you look at a painting, you don't say "well, right here it's red X, but over here it's red Y".  Similarly, music can be appreciated without knowing what specific notes are played, you can transpose a piece up or down as long as you maintain the relationships.

I don't claim that that's necessarily a better definition.  It's certainly a more subjective one, but that's intentional.  Creativity is more than just the ability to create.  The characteristics of what's created weigh in.

So back to programming.  It certainly has the characteristic that complete programs are created out of basic building blocks (your language's syntactic constructs).  But is the result appealing, and can it be appreciated distinct from the basic blocks?  Here I'm a bit hard pressed to find an answer.  The user of a program certainly doesn't appreciate the programming, just the behaviour of the running program.  Is there any way to "view" a program outside it's syntactic constructs?  UML modeling (or your choice of comparable things) is one way, but that's not really the program anymore, it's a distinct and incomplete representation of the program.  Record the live symphony on a handheld voice recorder and play it back – not quite the same.

There is a visual micro-perspective on code.  Someone with no language familiarity (or programming familiarity, really) can certainly distinguish between chaotically formatted code and well formatted code (consistent whitespace, capitalization, etc.).  But that's not really the beauty of the program, that trait belongs to an arbitrary collection of characters, regardless of whether it's a program or not.

Now contrast my definition with that of an assembly line worker.  The worker certainly uses basic building blocks to create an aggregate that can be appreciated distinct from the individual pieces.  But he doesn't get to make the decisions for where stuff goes and how it fits together.  So is he really creating?  No, just building.

So I think creativity also requires some aspect of free will (within the constraints imposed by the medium, of course).  This would manifest itself by the ability to intentionally create non-appealing results, but choosing not to unless using it as a form of artistic expression.  Which brings up another aspect of creativity: expression.  When you write a program, are you expressing something beyond the program itself?

Programming definitely has the free will aspect, just ask anyone who has ever had to debug a mess of spaghetti code.  But I'm not so sure about the expression.  But I think that goes back to the ability to view a program outside it's syntactic constructs.  Is it possible to appreciate the creativity of a program directly, or is some sort of intermediate form required?  If you can't appreciate the creativity of a program, does that mean it's not creative, or just that it can't be proven created?

9 responses to “Programming Creativity”

  1. Peter Bell

    To me, programming is a fundamentally creative endeavor. For any non-trivial problem there are an almost limitless combination of approaches that will solve the problem and the programmer has to choose such approaches.

    Just as with poetry, writing and music there are elements of taste (both widely shared and more personal) that affect whether a given solution would be considered good or bad (beyond the baseline requirement of implementing the required functionality – things like elegance, maintainability and the like).

    You are absolutely expressing taste and judgment when writing a program. The fact that looking at the outer form of the program will not always expose that doesn't make it any less valid. It's hard to tell the quality of the writing in a book without opening the cover, and I can't say anything about the quality of something written in Japanese because I don't understand the language, but that doesn't mean that there is not both good and bad Japanese literature.

    Best Wishes,

  2. Doug Smith

    Programming is creative when the programmer expresses some or all of the following when the program:

    - solves a problem in a new and distinctive way
    - is appreciated for its individual look and feel
    - provides a seemingly simple yet elegant solution
    - changes the fundamental way of looking at a function or field
    - is pleasing(or attempts to be pleasing) to one's artistic "sense"

    There are many other ways, I'm sure. Creativity is an intent and skill we bring to an activity, and certainly programming lends itself to liberal amounts of that creativity.


  3. 5566

    very interesting topic.
    Let me try to define what is creativity.

    Creativity is a process of coming out a product/idea/process which is not a duplicate of any existing ones and it has to be a better solution and the process must be able to be duplicated by others in the future.

    Inventions are not creative. Because inventions cannot be duplicated. You can't invent telephones twice.

    Discoveries are not creative either. Same reason as inventions, because they can't be duplicated.

    Most of the things listed in Guinness records are not creative because they can't be really duplicated either.

  4. infraguy

    Creativity comes from freedom irrespective of any field like painting or programmming. As a software professional in india look and feel, functionality and other aspects..than coding are already finalized. And what ever room is left while coding is further constraint by client or company standards.Some might think of it exaggeration however my own experiencs have incidents where data structures or nested looping enhancements are not allowed despite showing performance gains with tools widely accepted.

    By the way programming is not an art..its a skill which can be easily picked up… india we have millions that can code complex modules however give them a chance to think or take decision they will rarely ever….as they dont have freedom…and without freedom no creativity takes me to whole circle :)

  5. techcommprof

    Let's not also forget the individual choice in the external representations programs are made to define? In other words, a calculator program isn't necessarily a calculator, just a series of functions and an interface that creates what we use as a calculator (insert any example here). But the programmer's conception of what a calculator is, or should be, is what defines the resulting program.

    The same is true, even more so, on larger scales. If we were to model a car through a program, we would each come up with our own unique idea of what that car should be, or is supposed to be. Such representations of abstract elements (mathematical laws in the case of the calculator, or physical objects in the case of a car) are completely creative. They are actually more likened to metaphors, which are used constantly to help us describe the world and communicate. There are many more examples, I believe, that establish programming as a creative enterprise.

    I'm actually working on a publication that compares programming to writing, and argues that programming is a form of writing, with all the subjectivity and creativity such a definition allows, but that's to come later (assuming it gets published). Great topic, though.

    Oh, and as a reply to infraguy's point, it is true that with contraints anything loses its creativity. Take for example the "starving artist" art shows so popular here in the US. In such shows–sales really–people can purchase paintings for very low prices. The paintings are crude, often replicas of original masterpieces, that were hand painted by someone. However they were done so in a factory somewhere as mass productions. Thus, the fact that they are paintings does not suggest they are artwork, but something else.

    Hence, in your context, because your coding is so constrained you see programming as being not creative. But, were you free to write whatever code you wanted, programming becomes much more like art and less like rote assembly-line work.

  6. Muhammad

    You cannot compare programming with painting. The purpose or end goal of painting is to create something; a piece of art. Programming, on the other hand is a means to create a product. You do not program for the sake of art. You program to achieve a goal. The goal would normally be to create an application or a module. How you create that module/application with different programming styles should not affect the end product. Furthermore, in real world you never write a program from scratch. You use other people code / libraries and mix it with your logic to achieve that end result. To me, this seems more like a worker working in an assembly line to build something. If that worker assembles parts a different way, does that make it creative? Similarly, if you write a neat code or tab your lines properly, does that considered creative? There is no difference between writing a spaghetti code and a well organized modular program. In the end if it works, that’s all people care about. Most of you would say, what about the piece of code that you come up with? Isn’t that something creative? Yes, I agree that given proper conditions (time, resources) you can and do come up with a better and more efficient solution to a problem. But its not the programming that creative. It’s the solution that you came up with is. In other words, the algorithm to solve a particular problem can be considered creative, not the code itself. 99% of the time your code is optimized by the compiler / interpreter into a more efficient code. Your code/ nested loops are turned into ugly assembly finite state machine with multi-pass compilations.

    Programming, in essence is not creative. It is merely a tool, just like hammer is for a carpenter. It’s never meant to be creative (The Intent of programming). Neat piece of code with proper formatting and separate include files or proper comments does not fell into the realm of creativity. However the algorithms that you comeup with to solve a perticular problem can be considered creative and usually are.

  7. What a college programming class should be | Chimeloke

    [...] on creativity Source control lets you identify what code was written by what student. Grade on creative solutions [...]

  8. Rick Henderson

    I'm asking myself this exact question because I'm trying to think of ways to bring creativity into an (almost) beginner programming course and to get away from doing just plain lecturing. I'll definitely have to think more about how I want creativity defined and what I really want from my students, but there seem to be some great comments posted here.

    I've always though musicians and programmers were very similar because they make bigger things out of a collection of small things, and was also intrigued by how many programmers I knew in university were dating music students :)

  9. Anonymous

    Consider a novel, say, "Siddartha". Herman Hesse wrote it. When I read that book for the first time, I actually didn't know who wrote it. I just read it, and in the end I enjoyed it very much. It had such an effect on me that from time to time I went back to it. During my revisits I came to know that Herman Hesse had written it.

    The same happened with "Facebook", the social network. I didn't know who wrote it. But the first time I used it, I felt magic. It had such an effect on me that I revisit it frequently, and now I know who wrote it.

    Why do I go back to "Siddartha" and "Facebook"? I go back to *experience* them.

    Creating experiences is the spirit of creativity. So "writing" or "programming" in themselves may fail to qualify as creative pursuits, but crafting beautiful stories or software surely qualify as creative pursuits.