Wednesday, April 30, 2014

Programming sucks...

Programming sucks...  I suspect every software developer has trouble explaining to non-developers how challenging it can be to write programs.  The intangible nature of software hides its size and complexity to anyone who isn't themselves a programmer, unlike just about any other trade you can imagine.  A carpenter, for instance, can point to a cabinet he just built – and anybody can see the heft and quality of his job.  Not so with a programmer.

This article attempts to cure that problem, and I think it does a pretty good job.  I'd love to hear whether my non-programmer readers think so, too.

There are quite a few passages in the article that I quite enjoyed.  Here's just one:
Every programmer occasionally, when nobody's home, turns off the lights, pours a glass of scotch, puts on some light German electronica, and opens up a file on their computer. It's a different file for every programmer. Sometimes they wrote it, sometimes they found it and knew they had to save it. They read over the lines, and weep at their beauty, then the tears turn bitter as they remember the rest of the files and the inevitable collapse of all that is good and true in the world.

This file is Good Code. It has sensible and consistent names for functions and variables. It's concise. It doesn't do anything obviously stupid. It has never had to live in the wild, or answer to a sales team. It does exactly one, mundane, specific thing, and it does it well. It was written by a single person, and never touched by another. It reads like poetry written by someone over thirty.

Every programmer starts out writing some perfect little snowflake like this. Then they're told on Friday they need to have six hundred snowflakes written by Tuesday, so they cheat a bit here and there and maybe copy a few snowflakes and try to stick them together or they have to ask a coworker to work on one who melts it and then all the programmers' snowflakes get dumped together in some inscrutable shape and somebody leans a Picasso on it because nobody wants to see the cat urine soaking into all your broken snowflakes melting in the light of day. Next week, everybody shovels more snow on it to keep the Picasso from falling over.
Yes.  Exactly right! Well, except for the Scotch bit...

No comments:

Post a Comment