Reconnecting with the Art of Coding
By: Mynah Marie
Tags: Creativity, Art, Software Development, Technology, Programming

I empathize with my friend’s feelings because I also went through something similar, like other developers I know. It’s true that, as time goes by, it’s easy to come to a point where we lose the spark of why we do the thing we do. This can open the door to a whole bunch of issues, like bitterness and boredom.

That day, he and I talked for a while about the importance of stimulating our creativity and the fact that it should be more encouraged in schools.

But this conversation also brought me some kind of breakthrough. It reconnected me to something I discovered naturally in my first years of programming: the concept of code as an art form.

The parallel between code and poetry is not new.

I started doing some research when it first hit me that reading beautiful code has the same effect on me as reading poetry. I was happily surprised to see that I wasn’t alone and that other people felt something similar.

Code has purpose and meaning. It requires structure. It should be lightweight and elegant, not bogged down with lines and lines of garbage. Writing great code isn’t something that just happens. It takes discipline and work! It’s an art unto itself. - Matt Ward, The Poetics Of Coding

These kinds of findings got me digging deeper into what other programmers thought about code as a form of art and what I found is beautiful.

Some people took the concept of semantics and syntax in programming languages to another dimension.

See, for example, the goals of the International Obfuscated C Code Contest :

to write the most Obscure/Obfuscated C program within the rules

to show the importance of programming style, in an ironic way

to stress C compilers with unusual code

to illustrate some of the subtleties of the C language

to provide a safe forum for poor C code

which gives results such as this completely valid program.

In this kind of approach, the idea is not to make something useful, it’s to play with the language in a beautiful and skillful way. It’s to write a program whose objective is purely to demonstrate a creative approach to the language itself.

Others took the concept of code as poetry and injected their unique personality in some very entertaining ways.

Dylan Beattie is a programmer, guitarist and old 80s rock lover. He created a programming language called Rockstar that allows you to write code in the manner of classic 80s song lyrics.

Yeah. For real.

There’s also a whole movement of creative programmers that use their skills as a musical performance tool.

Take the example of Sonic Pi, which leverages the simplicity of Ruby’s syntax, or TidalCycles which utilizes the power of functional programming with Haskell.

Code is now something you can not only play with but also share with an audience who can appreciate your skills and enjoy your creative process with you. This kind of performance is not limited to music alone and can also be applied to visuals through frameworks like Hydra.

Others are fascinated by the minimal.

There’s a creative universe to be found in the purity of mathematics and byte operations. The demoscene has been focused for years in creating the most beautiful and interesting results with programs that use a minimum of computing resources and memory.

Viznut, an active member of the demoscene, discovered bytebeat: one-line C programs that output raw byte data which can then be fed to a computer’s sound interface. The results are interesting music pieces, sometimes with unsuspected complexity.