Nick Mudge Ignition Software Consulting & Development

It's interesting to think that all the things you see computers doing is occurring because someone wrote code to make them do it. A parallel world behind the world of applications, email, websites, phones, animation, graphics, systems, processing, transactions, video games -- you name it, is a world of code and programmers.

I think I was originally interested in programming because I was amazed at learning how to make computers do little things. It can be an amazing experience to first understand how to make a computer do something you had no idea about before.

Programming is not a purely mechanical, and analytical activity. It's similar and related to the arts. Sometimes I like to think of it as like writing a story. And when you're done a computer can execute your story, assuming the characters you describe in your code and bring the story to life.

After awhile of programming I learned something about programming even better than being able to make computers do things. I learned this: Like a book that's better than its movie, the code of a program is better than its execution.

Your code is a better thing than its execution. It presents a funny picture. It's funny because so much of the world sees the side effect of code being executed by computers. People see the results of computers executing code. They don't see the code. Sometimes it can make one think that the world only cares about programming and code for what it makes computers do.

Well, let me ask you something. What do books do? What does music do? They don't do anything. You like them for themselves. You might like a good book because it is written really well, or you like the characters or the story line. A computer program is the same idea, you can write it well: have perfect indentation, have good variable names, write concise but expressive code, use the best functions and tools for what you're writing, and use them in the best way. Give your code structure and organization and express it in such a way that the ideas of one section of code flow easily into the next. Write documentation. Have great ideas and express them in your code. In other words write your code so that it is well written and has a great story. If you did this and really cared about it, you might end up really liking your code and realize that its beautiful and a piece of art itself. Perhaps one day you'll snicker when someone demands to know and only cares about what your program DOES.

Of course there's side effects for cared about code. It's easier to understand and maintain, less bugs, its interesting, easier to extend, you actually want to work with it etc.

Of course you are writing code for its execution. I am. I just like and care more about the code than its execution. It's like why you have job. Of course you're doing it for money, but are you doing it only for the money?


20 March 2008

Interesting article, I enjoying it very much, thank you!
20 March 2008

Very interesting post, thanks!

It seems to me that a program is to execution that a book is to a narrative/story. Also a book is to its movie that a perl program is to a python program.

Books and movies are ways to represent storylines. Perl and python are ways to represent execution.

So I think I'd disagree with the form of this analogy:
"Like a book that's better than its movie, the code of a program is better than its execution."

All the same, there can of course be real beauty in representation beyond what is being represented, so I otherwise agree completely with you.
Aaron Parecki
20 March 2008

I follow your analogy up until this point:

"What do books do? What does music do? They don't do anything."

The purpose of books is to convey a story, the purpose of music is to convey an emotion.

The story of a book exists independently of the way it is written. You can tell the same story with different words. One book can tell a story well, while another tells it poorly. This is analogous to a well- or poorly-written program. In the end, the same story is told, or you get the same result from the program's execution; but the way in which it is told - or written - can vary.
Nick Mudge
3 April 2008

The point of the analogy was to communicate something. That there is more to writing programs than just for execution.
Name: (required)
Email: (required)
What has four legs, rhymes with bat and says, "Meow?" (One word answer.)
Spam Filter: