Archive for January, 2008

what is it about coding?

January 12th, 2008

This week marks the release of KDE 4 with a lot of noise. But what strikes me more than the actual code being released is all that I've read about kde4 ever since I started reading Planet KDE quite regularly last year. I've read the words of many people who are above all very excited about whatever it may be they are currently working on, big or small. There is a palpable widespread enthusiasm in that community (at least among the people who like to blog).

The question is why. What are the kde people so excited about? A qt widget that auto adjusts on resize? Uh-huh. Why is Brian Carper so determined to learn Lisp when it's not his job and no one is pushing him to it? Jarosław Rzeszótko is a Polish kid who tried to map out the entire realm of programming so that he can spend the next however many years learning... everything. Why does he care so much? The programming subreddit is consistently dominated by esoteric programming languages and wild ideas, which suggests that there's a lot of hobbyism and experimentation going on, not just plain "working for the man". Why bother with all this tinkering?

When we see a thrilling musical performance, there comes that realization of just how much work and how much mental energy it must have taken to produce it. If you start today and you're very talented, you might be able to give a thrilling performance in 10 years. People devote their lives to achieve this. But hey, it's music, it's art, it's incredible. Listening to music performed this way makes you feel something you can't reproduce any other way. It activates feelings deep inside you and brings them to the surface, making you experience hurt, relief, harmony, ... just by listening to sound.

So what about coding then? Why do people care about coding? It's not art. It doesn't make the user have all these wonderful experiences they get from music, it's really no more exciting for them than... filling in forms. There aren't any art exhibitions for software. And if ever using software channels deep feelings, it's usually not in a good way.

But there is something about programming that very deeply appeals to us programmers. It is difficult to explain, and I have never found it explained by anyone... fully. How do you explain something you don't completely understand?

Well, until today. I just received my order from Amazon, "The Mythical Man Month", Fred Brooks's set of essays on software engineering. In the first essay, The Tar Pit, Brooks writes:

The Joys of the Craft

Why is programming fun? What delights may its practitioner expect as his reward?

First is the sheer joy of making things. As the child delights in his mud pie, so the adult enjoys buildings things, especially things of his own design. I think this delight must be an image of God's delight in making things, a delight shown in the distinctness and newness of each leaf and each snowflake.

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. In this respect the programming system is not essentially different from the child's first clay pencil holder "for Daddy's office".

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 principles built in from the beginning. The programmed computer has all the fascination of the pinball machine or the jukebox mechanism, carried to the ultimate.

Fourth is the joy of always learning, which springs from the nonrepeating nature of the task. In one way or another the problem is ever new, and its solver learns something: sometimes practical, sometimes theoretical, and sometimes both.

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. (As we shall see later, this very tractably has its own problems.)

Yet the program construct, unlike the poet's words, is real in the sense that it moves and works, producing visible outputs separate from the construct itself. It prints results, draws pictures, produces sounds, moves arms. The magic of myth and legend has come true in our time. One types the correct incantation on a keyboard, and a display screen comes to life, showing things that never were nor could be.

Programming then is fun because it gratifies creative longings built deep within us and delights sensibilities we have in common with all men.

In trying to formulate an answer to the question myself, I have only ever been able to clearly state the first of the mentioned facets: building things. The fluffiest and most intangible quality I see in the emphasized paragraph. In this respect I get people who don't understand programming. It is such a strange thing in many ways.

But it is also this that makes the endeavor forever interesting. Imagine a computer game that has such incredible depth that you can spend your whole life playing it and whichever dimension you pick you can never see the end of it. No matter how much you zoom in the picture, you can never see the pixels. No matter how refined your battle strategy is, you can never figure out the computer opponent, because as your strategy gains an ever greater granularity, so does his. And no matter how many levels you complete, there are always more left.

From a child psychology point of view, I may have been a surefire pick for programming (if someone were confident enough to foresee the PC revolution). I had building blocks from the beginning, and I loved Lego blocks more than anything else. I didn't really care about the structures they were for, I just built stuff. The only limitation to Lego blocks is actually the blocks themselves. There are only so many blocks, and there are only so many types of blocks. With rectangular blocks, you can't build something round. And with plastic blocks you can't build ships, cause the material is too heavy. And because the blocks are a certain size you can't build something that is both small and complex. And because the blocks are all the same material you can't do anything magical like make some parts lighter or run a current through a wire, because you need different materials for that.

I think of programming languages as blocks. They are what makes our programs "slightly removed from pure thought-stuff". They are what makes our abstract craft it into something real. But they also define and limit how we can build our castles in the air. Every programming language is a different straight jacket. A different set of blocks.

It is an interesting dilemma. We need languages to be able to express anything. A language, to be something, simply must be concrete. And with a concrete language we can build concrete things, but it is also the very same thing that limits what we can express. Without our language, our castles in the air have no restrictions. They are pure imagination. But they can also never be.

seeing a doctor

January 11th, 2008

In two years in Holland I've been to a doctor twice. That's probably even a bit above average compared to the numbers over the last decade or so. As I'm now cracking the two year mark I went again today. Over the holidays I caught this nasty flu that's been pestering me for a week, with lots of coughing, not much sleep, and a general feeling of sluggishness.

I ended up going to this all night clinic after I went to the wrong location and got bounced around a little. I would have gone to the same place as the last two visits, but it's across town and with my bike being stolen yet again, it's just too far away. There is this place where they have a bunch of barracks (like at a construction site) and for some reason the all night clinic is located there. Odd place for a clinic. As I walk in I immediately get this strange sensation of having entered another dimension. There is a big plate of glass between me and the receptionist, with no holes and nothing that opens up. Only that little slot in the counter for passing stuff back and forth. It's like I'm in a recording booth, because she has to press in a button while she's talking to me for me to hear. In the back there are about 6 women sitting behind computers talking into headsets. Like people are calling in to order taxis and pizzas or something. This solid booth is the landing for anyone who enters the clinic. There is another solid door between it and the waiting room, with a lock on it. So if you don't have an appointment or you can't get along with the receptionist, she's gonna keep you from getting in there.

The receptionist I got (out of the 6 who were in the room) wasn't the most accommodating. She would ask questions in Dutch, I would answer in English, she would talk in Dutch again. When I didn't understand, she would bite the bullet and speak English, and then immediately go Dutch again. Most people when faced with this situation decide to have it in just one language. I don't have Dutch medical insurance, so I would "be paying". Okay, how much? 77 euro. That is... for one visit? Yes. (Not for a coupon of a dozen tickets or something.) And it absolutely had to be in cash. You would think for a place that isolates its staff behind bomb proof glass they would be more comfortable with electronic transfers and not having any hard money on site. Okay, but I don't have that kind of money on me. I haven't carried around sums like that since... well, ever. The nearest ATM is pretty far away too. Utrecht is very densely populated, but it is mostly suburbia-like, not city. So I get an appointment made and I step on it to get back in 30 minutes.

My appointment was.. short, but brief (like an English teacher of mine once quipped about a presentation I'd given). It was only as long as it needed to be: 6 minutes. 77 bucks for 6 minutes, so that means I paid 988 euro/hour to see my doctor. Am I crazy or is that rather high? Then again, if I had renewed my Dutch medical insurance, that goes for 300/year. I'd rather pay 77 once or even twice a year.

So I get out of there, past the waiting room, and into the tiny-but-freezing all night pharmacy. This room isn't even heated. There's only one guy working there and he's not especially fast, so just waiting for him to process one customer ahead of me took 10 minutes. Here too the sheet of glass. I was amazed by how small the place is. This is the pharmacy attached to the all night/weekends/holidays clinic, so whatever drugs you'd need at a regular pharmacy, you might need them here too, it's the one place in town that stays open. And he's only got one room with a bunch of shelves and filing cabinets.

like comparing apples and oranges

January 6th, 2008

It's funny the things you don't appreciate without having a special, personal viewpoint into that realm of things that aren't seen. It's like you have to tilt your head to see it. No no, not like that. Okay, stop tilting, it's not happening.

Remember the last time you had an orange? Nothing special about it, was there? Hah, told you you couldn't see it. Remember the last time you had an orange while down with a bout of flu and a sore throat? Ah-ha!

First comes that eerie phase of deliberation. When you notice someone is up to something. Got evil on his mind. It all gets buried beneath the standard fabricated lines that are supposed to lull the victim into a false sense of security. It's for your own good, I say to the poor bastard.

And then, with a glimmer of glee, I think to myself buddy, this is gonna hurt you more than it hurts me. Heck, this guy's been acting up all day, it's time he got a dose of his own medicine.

And then I realize that alas, you and I are both neurotically interconnected in the same organism. Should have thought of that, but it's too late now. The first bite comes in. A small seismic shock follows. The whole structure just sits there oscillating for a little bit. All of a sudden I hear myself screaming. I've been screaming the whole time, but it's only now that I realize. With eye closed in trepidation the last remains of orange juice make their way down. In cold sweat I look up. It's over. Somehow the little shack held up to the storm. Another one of those might...

I look at the orange. I've never seen an orange this big. What we just went through was taking a small bite of it, but the thing is still the same size it was at the beginning. This is gonna be a long 20 minutes. Like getting a succession of vaccination injections right in the same spot.