Sunday, January 13, 2013

Software Development as an Art


This is meditation on the concept of computer programming as an art form. I delivered it during this morning's service at the First Unitarian Universalist Church of Nashville. It seemed to go over well enough, so I thought I'd post it here.


The idea that software development is an art form is pretty controversial.   Google it and you’ll find blogs full of rants on both sides.  ‘Craft’ is a far more acceptable term, but even then there’s disagreement.  Still, no one can deny that software development is a creative process.  It begins with an idea and ends with an application.  Something that -- while not exactly tangible -- is usable.  Once it’s complete (if it ever is) something that did not exist, now does.  It’s been created, brought forth from...someplace

I’m a computer programmer.  I work for a product company that builds web-based, healthcare education and talent management software.  The code I write is a mixture of C#, TSQL, Javascript, HTML and CSS.  My job requires a knowledge of both object oriented and functional programming concepts, test-driven development, security, SCRUM, HTTP, REST, XML, JSON, design patterns and that’s just a random sampling.

So, clearly, I am an artist.

Yeah, sometimes, I have a hard time buying it too.

Okay. I can tell you a time when I feel like an artist.  It’s common practice when developing software as part of a team to have code reviews.  These may be one-on-one or may be in a packed conference room around a large screen TV, but in either case the goal is the same: to judge my code -- to pick it apart, to search for defects, for inefficiencies, for poor style.  These code reviews are essential in developing quality software.  It’s well known that the earlier a bug is found the cheaper and easier it is to fix and one, two or 12 extra sets of eyes can see things I can’t.  I know it’s useful.  I know it’s for the best.  I even know that soon I’ll be the one doing the reviewing.  But it hardly matters in the moment.  My code is on display.  The thing I created with all its unnecessary object instantiations, its bloated method bodies, its classes with too many reasons to change.  It’s all there.  My code stands naked.  And these people are all so much smarter than me.

So that’s why I think software development is, at least, kinda like art.  I’m attached to the code I write.  I care about it.  I worry about it.  I spend too much time playing with it...a process so common amongst developers, it has a name:  Refactoring.  This class could be shorter.  This name could be more meaningful.  That call should probably return in less than 20 minutes.  It could be better.  I can make it better.

So I figured if software is an art form, I could probably write a poem about it.  Something that might describe it’s beauty to those who’ve never heard the term “curly braces”.  Here’s my attempt.  If anyone has any suggestions for cleaning it up or improving it, please let me know.




It’s about crafting worlds
Objects built, set out and decorated
Actors passing notes on a silent stage
Scene playing out behind the curtain

It’s about transformation
One structure becomes another
Then another
Is wrapped in abstraction
And stripped to its frame

To the outsider
It’s foreign.  Ugly
Letters and spaces
Abominable use of punctuation
Best left to basements

To the novice
It’s syntax. Branching. Iteration
A mystery unraveling slowly between failed compilations and segmentation faults
Until finally IT WORKS!  But wait...is that right?

To the veteran
It’s solid
Real
Alive
Turning and pulsing
The running thing
Not the code
But where code and machine meet
Visual
Shapes and colors. Pulses of light along connecting lines

It can be beautiful
It can be ugly
But I guess that’s true of a lot of things