Yet another quote

I've started to hang out at a nice place for programming language discussions called Lambda-the-ultimate. Today I was reading a discussion about the definition of what a "type" is and how one might explain that to a beginner. Now, many people find it helpful to refer to a type as a set of values. But then one poster gave the following example of why sets and types should be considered quite differently:
The obvious point of difference is empty sets/types: the set of Klingons and the set of even prime numbers greater than 10 are the same, but the types are very different.

Harry Potter and the Prisoner of Azkaban

Although the film has been showing for quite a while and it was some time ago since I last saw it I would like to write down some of my thoughts on this movie: Harry Potter and the Prisoner of Azkaban. I really like this movie even though it is not the best I've ever seen. But the main trademark of this movie which makes it stick out is that is singularly well crafted. There are just so many details which are laid out in a very clever fashion and which fits together seamlessly. Before I start describing these I should warn any reader that there are a few spoilers in my text. I recommend you watch the movie before reading this.

First of all I think that Prisoner of Azkaban (PoA) is far better than the previous Harry Potter movies. The previous ones were released just before chrismas and they had a very christmasy feel about them. I think that was very intentional from the producers. Reasons for this christmasy feel goes partly to John Williams score. The main theme in the movies evokes wintery feelings. And a lot of the action happen during the windter period at Hogwarts. But all this they had to abandon now that PoA was released in the spring (so as to not collide with The Return of the King). First of all the winter part in the movie is pretty short. But they've also changed the score quite a lot. While the scores for the previous movies was heavily built upon the main theme they now had John Williams come up with a new theme which is more medieval in character. This theme is the basis for the score in PoA. A last point which I've noticed makes the movie not so christmasy is the clothes the characters wear. In previous movies they wear the school robes pretty much all the time while in PoA they wear their normal clothes most of the film. This also gives the film more credibility in my opinion.

One this that I really like about the Harry Potter movies and PoA in particular is the score. I've already mentioned it but I'd like to go in to a bit more detail. I should say that I'm sort of a film music nerd and I have a special taste for John Williams work so it's not surprising that I really like the scores. But I must say that I think the score to PoA is one of Williams greatest achievements. It really
shows the breadth of his skills and abilities. His music spans so many genres and he does it really well. There are the majestic themes for which he is so wellknown for, there is a humorous waltz, the frenzic and meandering music for the bus ride, the medieval themes for Hogwarts, the action-packed music which he does so well, the beautiful patronus theme etc. The list just goes on. I've heard people which dismisses John Williams as someone who just writes majestic themes. These people have missed a lot. Another thing one might have against Williams is that a lot of his music sounds pretty much the same. He loans from himself. If you're familiar with the Star Wars sound track for example you will here lots of things that sound familiar. But I don't hold that against him. Every professional composer who needs to write a lot of music on demand does this. Even Bach did it. Well, I leave my discussion about the score for now but I will have reason to come back to it later.

There is a red line thoughout the movie, a theme which is laid out which such delicacy that it is very easy to miss it. The theme is time. Time. Throughout the movie we get hints and clues about the last part where Harry and Hermione do their time travel. Hogwart is in this movie equipped with a large clock tower. On several occations in the movie does the camera zoom in through the clock and the mechanics behind it. The mechanics ticks on and shows us the inevitable progress of time. The clock also has a huge pedulum which swings back and forth in one of the hallways in Hogwarts. It forms the backdrop to a number of scenes. One another thing which hints at the time theme is Ron's quarrel with Hermione about her taking courses which have overlapping schedules. How does she do it, it seems impossible right? But the thing that really makes chills of pleasure go down my spine is when Harry and Hermione goes back in time. The whole last part of the movie is really well put together. And the thing which takes it to an even higher level is once again the score. It starts with a clock ticking. And the ticking comes back now and again while they're in the past. I don't know why I find this so exciting but it gives me

One thing that I also must mention is the end credits. This a piece of art in itself. As you probably know it is made as a mauraders map. Next to the text we can see footprints of people walking inside hogwarts. I think this is incredibly well done and I recommend watching all of it till the end. They've put in a couple of jokes in there as well.

I've talked a bit about the previous Harry Potter movies, what about the coming ones? I forsee some problems. While PoA is a good movie they've had to shoehorn J.K. Rowlings story into a two hour movie. The characters and not presented as usually in films, it is taken for granted that we are familiar with them. And it works in this case because people who see PoA have seen the other movies. But there are many details in the story which are explained properly and left as dangling ends, although none comes to my mind right now. So even though PoA works as a movie the story barely holds together. This makes me wonder about the future films. As you probably know the Harry Potter books grows in size with each new book. If they had trouble fitting the third book into a movie is seems like an impossible task to deal with the fourth and the fifth book. I honestly don't know how they're going to handle it. I guess we will just have to wait and see.



Jardinains is one of my favourite games. Today I got a new highscore. 3,575,935 points reaching level 47. I'm a little frustrated right now because I was very unfocussed in the end. I should have paused for a while to get my focus back. I could have gotten a much higher score if I had.

Anyway it is the best game I've played in the breakout tradition. It beats games like DX-Ball, Arcanoid, Krackout and all the other breakout-style games I've played but forgotten about. I can heartily recommend it.

I cannot resist on philosofising a little on one detail in Jardinains. It is about gravity. The ball in Jardinains moves just like in other breakout games just as if there were no gravity. It simply moves ahead with constant velocity until it hit something or you take a bonus item making it go faster or slower. But in Jardinains everything else behaves just like if there was gravity. The bonus items falls down with increasing velocity and so does the small jardinains when you hit them with the ball. I wonded what is going on here. Is the ball some kind of anti-grav gizmo or is the game played in another dimension where gravity is partial or selective. Well, it beats me.

Hmmm, I guess it could also be because this setup gives the best feeling to the game but it can't be that obvious, right?


Slashdot quotes

Slashdot has had some pretty good quotes recently. They seem to update them daily. You can find them on the bottom of all the pages on their site. Here are two which I especially like:
No man is useless who has a friend, and if we are loved we are indispensable.
-- Robert Louis Stevenson

What we are is Gods gift to us and what we become is our gift to God.

Flon's law

Here's a nice quote that popped up when I ran the fortune command today:

Flon's Law:
There is not now, and never will be, a language in which it is
the least bit difficult to write bad programs.

As a computer science student this is both interesting and provocative. But perhaps not as provocative as it first seems. It depends on what this Flon means with "bad programs". First of all I think it is safe to say that all programs which are incorrect are bad. These are programs which don't follow the specification or the programmers intent. Other programs which are bad might be those that are difficult to understand. A third category which is related to the second one is programs which are difficult to maintain. Those are programs which are badly structured and don't contain the right generalisations.

Now, I believe that language features in general are invented or added to a language because they make it easier to write good programs, i.e. programs which are correct, easy to understand and maintain. But is might be that these feature doesn't go that well together and make it very easy to write bad programs. The canonical example here is C++. It is certainly possible to write good programs in C++ but it is extremely easy to write bad programs. It is almost as if the language encourage you to do that.

But I do believe that some languages are better at forbidding bad programs than others. Haskell has a number of features which I believe make it a better language in this sense. Haskell has a strong static type system which prevents many buglets to go through compilation. But strong types can also be used to enforce almost arbitrarily complex properties about you program. Haskell also have a separation between pure and side effecting computations. Side effects are well-known for being difficult to reason about and make programs more error prone. A third feature of Haskell is automatic memory management. These three features makes it in my opinion more difficult to write incorrect programs. But they do not improve on the situation when it comes to understandable or maintainable programs. I have a hard time imagine a language which enforces understandable and maintainable programs. Advanced module systems only make it possible to write maintainable programs they do not enforce it.

So, my conclusion is that Flon's law is true. In all languages I know it is possible and even easy to write programs which are bad in the sense that they are difficult to understand and maintain. But I do think that some languages are better than others in that they make it more difficult to write incorrect programs. That I think is a big win and I think it is worth pursuing that line of research.