I guess this is at least part of why programming is fun.

Why is programming fun?

First is the sheer joy of making things. As the child delights in his mud pie, so the adult enjoys building things, especially things of his own design.

Second is the pleasure of making things that are useful to other people. Deep within, we want others to use our work and to find it helpful.

Third is the fascination of fashioning complex puzzle-like objects of interlocking moving parts and watching them work in subtle cycles, playing out the consequences of principals built in from the beginning.

Fourth is the joy of always learning. In one way or another the problem is ever new, and its solver learns something.

Finally, there is the delight of working in such a tractable medium. The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so readily capable of realizing grand conceptual structures.

-- extracted from 'The Mythical Man Month' by Fred Brooks


Of course, that doesn't much dwell on why it isn't. If there's one thing programming's not, it's lasting. Oh, sure, there's code from the 1960-80's that needed ye old y2k fix way back when that was still screamin' along while most new apps were written in whatever the latest and greatest language was. But most of us never get to work on such important apps, and those that do don't get to create it from scratch. And even if you did create an app that'd be used for decades from scratch, what happens as soon as you leave the company? Ever gone back to look at your code after someone else has grabbed it and changed it? "Ah, man, why did you do it like *that*? That's a kludge! You've lost reusability!" And that's usually a best case.

Let's face it, not even Fred Brooks comes close to William Shakespeare -- or even John Donne. Though people might start building interactive fiction that approaches literature on the backs of your work, nobody remembers who made Mark Twain's paper.

(That said, the pens he used in Mysterious Stranger helped scholars pinpoint (har har) where he wrote what part of what draft. Purple meant Europe, I believe, since that's where he got the pen, etc. Sorry, it's been over ten years since I researched that paper... :^D)