Coding as a creative practice
There are immediate connections I can make between creating artwork and coding. I’ve been thinking about how these two disciplines find commonality. I use the word practice in the title deliberately. Like any making activity, it doesn’t just happen in one attempt. It’s made up of many tiny incisions, brushstrokes or lines. ‘Chipping away’ is a phrase I hear frequently, from myself and others at stand up. We’re all at it- practising, trying out theories, experimenting, rough drafts, finding references from other bits of code, looking for patterns. It feels like a sculptural process. If the code base is a block, adding new code is a gradual process in changing its shape.
It’s one line, one class at a time, expanding a class to shoehorn in a new property, new request calls, new queries, more tests, in doing all this, the block continually alters, becomes more familiar and worn in, just like getting to know my subject matter in a new piece of artwork.
When I started learning, the beast of a block of code seemed terrifying. I was sure I would add something and it would collapse, fall over in a heap, all because of some scary error messages. In the same way, I’m resistant to reading any instructions, I failed to really read any error message. I viewed their colour red as a failure and panicked, rather than viewing my attempts as a way of trying something out.
As I learn more and do battle with errors, I realise I could apply the approach I have in painting to coding. I’m comfortable with what might be viewed as an error in making art. I work over the top, I edit, I leave it for a day, I turn the page around the other way and keep going. I imagine I have built some muscle over the years – ‘having a go’ and succeeding eventually. Aware that breaking and spoiling are part of the process.
I used to run art workshops in schools and was a tyrant for not allowing the kids to use a rubber to erase their drawing. They were so quick to judge themselves they had hardly begun before they wanted their attempts to vanish. I thought I was encouraging them to get comfortable with what they saw as wrong and find a way to integrate it, maybe banish the fear of the white page.
I smile now, because I was exactly like those kids when I started learning to code, too frequently deleting everything to start over, anything to make that error go away!
It has been an adjustment getting used to the binary nature of outcomes in coding; success or failure. One missing character can prevent the whole application from running, which can be alarming. But this isn’t quite the same as breaking it, it just reads that way. The error messages are helping me to get back on track, encouraging (or forcing) me to make those tiny incisions til I reach the success message. I suppose I could view this as more helpful than when left alone with my subjective mind and a new painting. It might sound unpleasant if you heard my thoughts after every new brush stroke. Perhaps the coding error messages are the equivalent of the slowing down of my negative mind while painting. The explicit messages would help the judgment stay external and keep a lid on the old Imposter Syndrome – have a read of Debi’s recent article on this topic.
So now I’m wondering about how I can apply my battle-hardened coding practice to my art practice. I could translate that vague feeling of ‘wrongness’ in my artwork into a more specific response. Something like: “that strength of green doesn’t work there, it is clashing with the yellow and not in a good way – mute it with some white.”
What about the tools for coding? I had no idea that beyond the language there was a mountain of tools and systems to get to grips with (and their updates). I think if I’m honest, it’s the tools that have intimidated me more than learning the language. The barrier to entry with learning to draw is much lower, you just have to be brave enough to deal with the blank canvas. Choose what you want to draw, choose a pencil, get it sharp (or not) and begin.
I think good drawing has some overlap with good code craftsmanship. When I started my foundation course in art and design, I felt strong in my painting skills but not as confident about my drawing. I worried it might hold me back from getting accepted onto a degree course. To prop up my portfolio and because you don’t really learn to draw at art college, I enrolled in a life drawing course at the local adult education centre, which looking back became an artistic masterclass.
Life drawing is the study of the nude human form and like its models, the students have nowhere to hide, it’s an open space where you can hear a pin drop among the industrious scribbling of pencils and charcoal and maybe some jazz on low if you’re lucky. I still believe life drawing is one the most challenging, mindful, invigorating and peaceful ways to spend time. That may all sound contradictory but it’s true for me and perhaps can be said of coding on a good day. The purpose is in the try, regardless of results – which are far away in the distance. Life drawing will retrain how you perceive the human body, how light works, where the line really is and how patient you are. It’s an extremely active process, a mental state I recognise within coding.
After a couple of weeks of drawing classes, I was happily using the pencil like I use a paintbrush, which is scrappy and energetic but not that accurate. The teacher, having witnessed my tried and tested technique, shared some advice: ‘don’t try and use ten lines when one will do’. I learnt it is far harder to get that one line correct than draw ten lines that may or may not make up the shape of a body part. So for the rest of that evening, I had to slow right down. I went and used the rubber after all and for every incorrect line I removed it and I tried again. It took me two hours to draw one arm, and I was never more proud of a drawing.
Part of this drawing challenge is to have confidence in owning the one right line. Making a decision with conviction. This discipline plays out across so many areas of life, less is more, more efficient, more elegant and certainly more considered. When I was introduced to the terms ‘refactoring’ and DRY (don’t repeat yourself) while studying at CodeClan, I knew exactly what power they held, it was all in the edit. How to do it was another matter, it was like some kind of wizardry to me but I was enjoying learning the craft of code.
I know there must be a hundred ways coding is different from creating artwork, their content and function so removed from each other. After many years of working with image rather than text, it has been extremely liberating to spend time in a new area where there are strict parameters and clear definitions of what ‘done’ looks like. It’s all so clean and neat, I remember thinking. What surprised me, however, was the familiarity of having a process. The sensation of being in the middle of something, finding some flow, the autonomy and thrill of problem-solving, learning on the job and being curious. The block of code I’ve been chiselling away at, reveals its shape more clearly as I keep up the practice.