Stack Trace Art is a kind of secret drawing hidden in pieces within a program, waiting to be revealed at the right moment when invoked as an error. Igor Rončević, a Croatian programmer, discovered that you can cause an error, which as it flows through the stack, pieces together ASCII art to be revealed in the stack trace. He has not only put together a series of these, but created a tool to allow others to exploit this idea.

The stack trace is a textual representation of the call stack; the flow of subroutines calling other subroutines at any moment in a running program. Usually the stack trace is seen by programmers debugging a piece of code in their development environment, or in an error log when something has gone wrong. They are lists of methods and line numbers and not terribly interesting to look at unless you're invested in the program they belong to. Unless you're viewing ones thrown by Rončević, which are ribbons, cats, or ASCII graffiti lettering.

It's a simple idea, but one that is not so easily carried out. The error itself is nothing special: a simple C# exception. The magic happens in the class throwing the exception, which has a set of methods the error flows through: one for each line of the drawing, with the ones closer to the error further up the image and so deeper in the chain. If the image were completely filled with visible characters, this would not be hard to do: we could have a series of function names with variations of aaaaaaaaaaaaaaaaa. However, that's not enough to build the cat image above: we would need to find a way to represent spaces. Rončević's solution was to find a Unicode space that C# would not recognize as a space but something else (this is very much a Microsoft-oriented project -- actually not so much, see update below*). This symbol is the Hangul Filler character, as he explains in his post His Majesty, Hangul the Filler, his ode to the symbol that makes it all possible. Hangul Filler is a control character used in representing less common Korean characters. Starting a sequence with Hangul Filler marks the following characters as intended to be combined into a single character made up of those components, as opposed to individual letters. However, as modern Unicode offers all the combinations, even of archaic signs, of these symbols, the Filler code is now essentially a legacy symbol

The green and blue above are the name of a method, part of the call chain

Used with Western characters, it simply looks like a space, and is obscure enough that the C# people haven't (yet) eliminated it as a valid naming character.

This approach, of using the structure of code-based systems for performance, is similar in spirit to projects like PingFS. Even more so, it resembles the project IDN by JODI, which similarly breaks down a sequence into single lines (in this case urls), and uses the location bar of the browser as the place of performance. It similarly splits up the content (even when the content is just a series of redirects) across different sites. It also resembles the project Summer by Olia Lialina, which takes apart a gif and puts each frame onto a different artist's website, to be recombined into an animation in the browser, just as the stack trace recombines function names into a picture.

One frame of Olia Lialina's Summer

In both pieces, a single work is broken into segments to be re-assembled through unusual use of an existing technology: in Stack Trace Art (which I'll call STA from here on out), through the IDE itself. Summer emphasizes the filmic quality of the gif, splitting it into individual frames, much as STA splits the individual lines of ASCII art back into lines of text. It's also filmic in that its "projector speed" may speed up or slow down depending on internet connectivity and how quickly it can download each frame from a different site. While both Summer and STA are clever hacks that provide artistic possibilities, the difference in emphasis between the two works serve as a telling contrast between artist and hacker approaches. This is particularly interesting with a hacker piece that's explicitly presented as art, and an artwork by Lialina, who describes herself as a tinkerer, and is very interested in the hobbyist web aesthetic and hacker styling (she wrote this wonderful piece about the Prof. Dr. Style that still dominates some university sites), and claims to not have considered herself an artist until the Dutch Electronic Arts Festival printed the title on her nametag in 1996. 

Lialina's approach is more artist-like in the way it packages its idea. Her work is dependent on many artists contributing web space (and web uptime -- any frame going down might cause the animation to freeze). But it is a singular vision of one artist: Lialina produced the individual frames and it is ultimately of her design; the other artists lend material support but they do not re-interpret the work by, say, putting their own image on the swing on one of the frames. The idea is made understandable through its cohesive vision.

Rončević does not even attempt to create the single really cool piece that encapsulates his idea. None of the ASCII art he chose to use in STA is particularly interesting on its own, but chosen to collectively show the potential of using the tool in a variety of 2D textual content. His focus is on on making useful code so that others can easily generate their own version of Stack Trace Art, using his library, or by simply following his example. This is the hacker approach; it's more open-ended, and more openly invites others to run with the idea.

In fact, Rončević seems to doubt that he could really have been the first to have discovered this technique. He has quite a long post asking if others have created something similar, asking if there is a Lobochevski to his Bolyai. Looking past the self-comparison with some of the greatest mathematical minds of the 19th century, the thought is essentially: has really no one else thought to do this weird but really cool thing I've discovered?

It's very possible he was the first (STA is a very cool idea but a very weird way to use code!). The kind of play at work here, misuse of tools to do something entirely new is familiar to both artists and hackers. However, the answer could be that his Lobochevsky doesn't want to be found, and this leads to what I think is the most interesting potential of the work.

Stack traces have a feeling of intimacy between the programmer and a piece of code; it's what's on your screen when you dig deep into a problem to discover the behavior of code and the intentions of the coder behind it (even when that coder is yourself some time ago, with those intentions now forgotten). It's an abstract representation in service of a complex mental process. And I think STA would be best experienced when stumbled onto by accident; a piece of code backfires and you dig into it and suddenly some crazy images, which seem simply impossible to be where they are, suddenly there in the stack trace window, breaking you out of the interface. Here I'm thinking of it as a cousin to work like Joseph Moore's Meaning in Mistakes. It's a weird idea already, and I think gains a lot of power served in an unexpected context.

* Update (9/18/18): While the implementation linked to above is Microsoft-specific, this is an idea that transcends languages. It's also been implemented in node.js by Saša Matijašić.