Home About EIS →

Software Engineering as Artifact Creation

if (sandWeight != idolWeight) { throw new BoulderException(); }

if (sandWeight != idolWeight) { throw new BoulderException(); }

Geek disclosure: I’ve become fascinated by the different facets of Software Engineering. Not just as a means to an end, but as a practice, as an art and as a historical artifact. I feel like I’m in Indiana Jones and the Java Temple, full of Pythons, with the riches of Perls and Rubies.

My desire for harder, better, faster, stronger code has been spurred on by being bitten one too many times by unchecked exceptions in Python, leading me back to the comfortable blanket of Java, unit testing and a framed photo of Kent Beck on my bedside table.

The Art of Programming has long been recognized and understood. Anyone who doubts it should visit 99 Bottles of Beer, a repository of all the various ways to specify a program that prints the 99 Bottles of Beer song. Here’s my favorite, in Perl (plus a module):

    ''=~(        '(?{'        .('`'        |'%')        .('['        ^'-')
    .('`'        |'!')        .('`'        |',')        .'"'.        '\\$'
    .'=='        .('['        ^'+')        .('`'        |'/')        .('['
    ^'+')        .'||'        .(';'        &'=')        .(';'        &'=')
    .';-'        .'-'.        '\\$'        .'=;'        .('['        ^'(')
    .('['        ^'.')        .('`'        |'"')        .('!'        ^'+')
   .'_\\{'      .'(\\$'      .';=('.      '\\$=|'      ."\|".(      '`'^'.'
  ).(('`')|    '/').').'    .'\\"'.+(    '{'^'[').    ('`'|'"')    .('`'|'/'
 ).('['^'/')  .('['^'/').  ('`'|',').(  '`'|('%')).  '\\".\\"'.(  '['^('(')).
 '\\"'.('['^  '#').'!!--'  .'\\$=.\\"'  .('{'^'[').  ('`'|'/').(  '`'|"\&").(
 '{'^"\[").(  '`'|"\"").(  '`'|"\%").(  '`'|"\%").(  '['^(')')).  '\\").\\"'.
 ('{'^'[').(  '`'|"\/").(  '`'|"\.").(  '{'^"\[").(  '['^"\/").(  '`'|"\(").(
 '`'|"\%").(  '{'^"\[").(  '['^"\,").(  '`'|"\!").(  '`'|"\,").(  '`'|(',')).
 '\\"\\}'.+(  '['^"\+").(  '['^"\)").(  '`'|"\)").(  '`'|"\.").(  '['^('/')).
 '+_,\\",'.(  '{'^('[')).  ('\\$;!').(  '!'^"\+").(  '{'^"\/").(  '`'|"\!").(
 '`'|"\+").(  '`'|"\%").(  '{'^"\[").(  '`'|"\/").(  '`'|"\.").(  '`'|"\%").(
 '{'^"\[").(  '`'|"\$").(  '`'|"\/").(  '['^"\,").(  '`'|('.')).  ','.(('{')^
 '[').("\["^  '+').("\`"|  '!').("\["^  '(').("\["^  '(').("\{"^  '[').("\`"|
 ')').("\["^  '/').("\{"^  '[').("\`"|  '!').("\["^  ')').("\`"|  '/').("\["^
 '.').("\`"|  '.').("\`"|  '$')."\,".(  '!'^('+')).  '\\",_,\\"'  .'!'.("\!"^
 '+').("\!"^  '+').'\\"'.  ('['^',').(  '`'|"\(").(  '`'|"\)").(  '`'|"\,").(
 '`'|('%')).  '++\\$="})'  );$:=('.')^  '~';$~='@'|  '(';$^=')'^  '[';$/='`';

(also special recognition for the version in Shakespeare)

In my reading of the wonderful Effective Java, it’s become more and more clear to me that the guidelines to writing code behind Software Engineering isn’t a really a practice of art, but one of designing an artifact to be visited later by men and women searching for fame, glory and things that belong in museums.

We worry about how other programmers will use our API, so we code defensively, assuming that invaders will somehow break our carefully constructed masterpiece. We scrawl comments/hiedroglyphics across the walls of code editors so that visitors can attempt to understand the reasoning behind the machinations of our creation. We try and match coding conventions so that even where we forgot to comment what the thing did, it should be readable enough that visitors understand that you need to put the staff in the hole which lights up where the treasure is buried. Then, when our software civilization dies (read: moving to another team, losing interest in the project), hopefully the knowledge we created doesn’t die along with us.

The most telling part of Effective Java is it often has very little to say about whether your code meets its intended function, but still manages to weigh in at about 330 pages. Good software just works. Great software works well.

When we teach Software Engineering, it’s within the constraints of a tight academic schedule, just enough to impart the important things, and cross our fingers and hope the students listened to us when we told them to design for the future. I’d love to take the idea of software as an artifact and have students implement a new feature to software created by the previous year’s students. The inevitable hurt, pain and suffering may go some way to really instilling the importance of good design. They’ll only find it out the hard way in the workplace, so why not teach them now?

Dusty fedora hats would be optional, but encouraged.

(this Software Engineering post written with apologies to Jeff Attwood 🙂 )

This entry was posted in Academics and tagged , , , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.

6 Comments