Most people view coding as a scientific pursuit. After all, students in the University of Toronto’s computer science program graduate with a Bachelor of Science, however there is a growing trend in the field of computer programming to view code as art.



Computer code is an art form in itself, in that code text can be arranged to form a specific object. Computer code is also a tool for creating other forms of expression, such as websites, video games, and music.

Live coding, otherwise known as on-the-fly programming, is a good example of how computer code can be perceived as an art form. It is a programming style in which the programmer improvises and modifies a program’s code in real-time. It is most often used to create auditory and visual media. To this end, some musical groups use live coding to create music and images for live performances.

Paul Graham, a computer programmer who went on to study painting, is one such prominent proponent of code as art. In his seminal essay, Hackers and Painters, Graham outlined the many similarities between painters and programmers: both create something from nothing, both improve their art through gradual refinements, and both create works intended for a human audience.

“What hackers and painters have in common is that they’re both makers,” Graham explained in Hackers and Painters. “Along with composers, architects, and writers, what hackers and painters are trying to do is make good things,” he added. In this same vein, Dr. Donald Knuth, a renowned computer scientist who has been called the “father” of the analysis of algorithms, titled one of his pieces, The Art of Computer Programming.

Like painters, computer programmers take a blank space and fill it with something new and creative. For painters, that blank space is a canvas on an easel, which is then filled with paint; for programmers, it is an empty page on a computer screen, which is then filled with code. They both also develop an end idea of what they would like to create —  whether that is an adventure game, a social networking site, or an expense tracker. They then set to work building their idea, with an endless number of ways to get there. If one idea doesn’t work out, the programmer moves on to the next.

“I think that the best programs, like music and mathematics, can give aesthetic pleasure … Great programs, like great mathematical proofs, can be both elegant and beautiful,” says Alasdair Urquhart, a professor at the University of Toronto who is cross-appointed in the Departments of Computer Science and Philosophy. “[Computer programming] has some of the aspects of a craft discipline … but at its best it is an art and partakes of science,” he adds.

The International Obfuscated C Code Contest (IOCCC) is another example of the growing trend in viewing computer code as art. The IOCCC is a programming contest for the most creatively obfuscated C code. Obfuscated code is formally defined as machine code that is difficult for humans to understand, while C is a programming language.

One common strategy for obfuscated code is formatting the code to ressemble images or text. For example, the code for one winning entry from the IOCCC was shaped like Tetris pieces. Another winning entry contained self-modifying code, which is formally defined as code that continually alters its own purpose while it is being executed.

Also like painting, computer programming is a form of self-expression that is accessible to virtually anyone. A background in math is not necessary for programming, nor are college courses — all that is required is a computer and an idea.

For me, when I first dived into the world of programming, I had no idea where to start. I asked a friend, who studies software engineering, for advice. “[The] best way to learn code is with a project in mind,” he explained. Find something in your life that you would like to improve, and devise a program to solve it. With computer programming, the possibilities are virtually limitless. The only constraint is your imagination.

As my friend pointed out, the best way to start programming is to actually do it. Build something. Make mistakes. Ask questions.

It doesn’t matter what project you choose to pursue. Put fingers to keys (the digital version of pen to paper), and the rest will follow. Soon enough — just like a painter, performer, or composer — you will be able to develop a beautiful piece of artwork.