Linux as a Windows screensaver.

Oh, the beauty of it. A guy at IBM has Linux running as a screensaver on Windows. The fact that it is so meaningless makes it even cooler! Via slashdot.

More Mythbusters

Finally! The answers from Adam and Jamie, the Mystbusters, has arrived. A month ago the slashdot crowd could submit questions and the best ones would be forwarded to the dynamic duo to answer. Lots of fun things to read about. For example, I'd love to see an episode where they try to send something to the Moon, and so it seems, would Adam and Jamie. It was also interesting to read about how long it takes them to shoot the episodes and various myths.

Also, I just cannot resist to quote a sig from one of the comments. It's just brilliant.
Does the name Pavlov ring a bell?



Yesterday I went to see to movie Proof, with Gwyneth Paltrow and Anthony Hopkins. It's about a great mathematician who just passed away and the heritage he leaves behind. During his last years he was very ill, or rather insane and he was taken care of by one of his daughters. She is also a very gifted mathematician but had to give up her studies to take care of her father. Now that he is dead she has to face her own life and problems as her order sister tries to help her in her own way and one of her father's students wants to go through his books in the hope of finding some valuable math in between all the crazy scribblings.

It is a very good film and I can highly recommend it. The cast is spectacular and my guess is that Gwyneth Paltrow his getting herself and Oscar for this performance.

After the movie we had a little discussion about mathematics in movies and tv shows. One of the things that this movie does right is that it doesn't try to explain any of the math the characters are working with. All attempts that I've seen to do that have failed miserably. Present day math is just so far away from peoples' comprehension that trying to explain it is doomed to fail. Another movie which deals a lot with math successfully is Good Will Hunting which also never tries to explain it. The math is just there as a backdrop to the story about the characters. The tv show Numb3rs also does this pretty well. All these examples of math used right have their story mostly circling around the characters. It's more drama than math sci-fi.

One temptation is to trivialize the math in a movie just to make it understandable and part of the plot. But while that will appeal to math interested highschool student it looks a bit childish to anyone who's done math at the university level. One example is the movie Pi which I saw recently. I'm not saying that this movie is a total disaster, I thought it was quite OK. But the math part wasn't really that believable.

One of the reasons I went to see Proof was to see how they portrait mathematicians in Hollywood. I was a little afraid that it would be mostly the crazy genious stereotype that was shown. Indeed, both Gwyneth Paltrow's and Anthony Hopkins' characters have a bit of that in them. But the late mathematicians student, played by Jake Gyllenhaal, is far from crazy. He is a very sympathic everyday guy with some small geek tendencies. And the movie makes a bit of fun of the geekiness of math students, but it does so in a very friedly way.

How Google treat their workers

Having a company full of nerd can be a difficult thing to manage. Google is one of those companies that do it really well. They have accepted that they have nerds (or "knowledge workers", which is the politically correct term) and that these people have special needs. In the article "Google: Ten Golden Rules" they explain how they take care of their employees. Man, it would be nice to work at Google.


Tabs in Browsers and Operating Systems

I've been thinking more about using the web browser as an operating system (and a window manager, which is really what this post is about). There's been a lot of focus on tabbed browsing in the last couple of years. Mostly because Firefox and Opera has it while Internet Explorer lacks it. Today it occurred to me that Windows have had tabs for quite some time. At the bottom of the screen there is the bar with the start button and that contains a tab for each application. If we wish to start using the browser as a operating system it is only natural to add tabs.

One thing that I've constantly found frustrating with the tabs in Windows is that I cannot reorder them. They show up in the order the applications were started and stay that way (except for when Windows occasionally freaks out). I find this very annoying. The mind is good at remembering spatial relationships and therefore I try to keep a certain order between the tabs of the applications I use most often. For example I always have Firefox first. But if I need to restart it for some reason it ends up as the rightmost application and the only way to fix that is to close all other applications. Silly. In Firefox I prefer to have the Gmail tab first followed by the Google Reader tab. In version 1.5 it is easy to reorder the tabs if they should end up out of sync which I was very pleased to see.

But the oddest thing I noticed when I realized that Windows also have tabs is that Windows and the browsers don't agree on the placement of tabs. Windows have the tabs at the bottom of the screan while all browsers I know of have the tabs above the web page under the menu and status bar. Isn't that funny? I would think that there would be a most natural placement but so far I have heard noone complaining about either placement. But since Windows allows you to change the placement of the tabs I've now put it at the top of the screen just to see what it feels like. And if it works out I will keep it that way to that I always have my tabs at the top. But now in the beginning it is a very weird experience. I am totally unused to it and it feels very unnatural which surprises me. I suggest you try it too. It remains to be seen if I can manage to keep it this way or if I will have to change back eventually.



A couple of weeks ago my fiance and I discovered a show on Discovery Channel called Mythbusters. It's about taking myths of any kind and see if they really hold water. The way they test the myths is to actually recreate the conditions of the myth and see what happens. This makes for a whole lot of fun like blowing the most unlikely things up or using crash test dummies until they fall apart. This show has now become one of my absolute favorites.

One nice thing with the show is that they sometimes rerun some experiments in later shows if the viewers think that they have done something wrong. This is what I just did. I saw an episode a few days ago about a myth that got busted. But I think that they missed a couple of details so I sent them a mail on how they should test the myth properly. I'll be sure to post about it here if they rerun the test as I suggested.

Some more Mythbusters links:


Aeon Flux

Today Aeon Flux opens in the US. I thought I'd comment a bit about my that film before I've seen it. First of all I have very little idea about weather the movie is going to be good or bad. From the little I know and the trailers it could be an OK action movie. But that's not really what I wanted to comment on. I'd rather go on about the relationship with the original animated Aeon Flux.

Aeon Flux was an animated TV series in the beginning of the 90's. It was shown on MTV. It was about a female agent (Aeon Flux is her name) running around on her missions usually killing of a lot of clone soldiers. The series is very characteristic (for me at least) in its rawness and violence. Aeon is very athletic and performs incredible stunts as she tries to accomplish her missions. Furthermore she has very little clothes on, but nothing essential is revealed. There is nothing sexually about her bareness (at least, I don't get turned on by her dress).

Now, I have some very serious doubts that they will be able to capture the feeling of the original series in a film with real actors. The film will most likely be just another action movie with some ideas and plot inspired form the animated version. I have no doubt that Aeon Flux will be able to perform spectacular stunts with today's special effects but that will not help much to create the real Aeon Flux feeling. It's also something about how the characters are drawn in the animated version which adds to its roughness which I think is simply impossible to recreate and at the same time let the movie take place in the real world. And I should also make sure to whine about the choice of Charlize Theron as Aeon Flux. She's pretty and a good actress and I'm sure she will attract a lot of people to go see the film. But she is very far from the animated Aeon Flux. The animated woman is not pretty but looks a bit anorectic and very fit at the same time. She also has a lot of rawness to her which Charlize Theron doesn't even come close to.

So all in all I think the movie will not honor the animated series. But whether it will be a good movie or not I have no idea.


The Browser as Operating System

I've just upgraded to Firefox 1.5 and that made me think a little about how I use my browser. Some peope have argued that one can see the browser as an operating system in itself with urls providing the file system. Recently more and more web based applications have popped up which makes it possible to start using the browser more and more as an operating system. I've been trying to move as many applications as I can to be used inside the browser lately to try out this idea. I use the browser to read mail (via gmail), read news (via google reader), write blogs (via blogger), search my hard drives (via Google Desktop) and handle my torrent downloads (via azureus' HTML WebUI plugin). And I must say that I'm pretty happy with doing things inside the browser. It gives a common framework to all the applications. I like the way tabs work and now I can even reorder them in the new Firefox 1.5.

But moving more and more applications to the browser will place higher demands on the usability of the browsers and how one can interact with them. But to me it seems that the browsers are continuously improving in this respect and adding capabilities such as SVG. It will be interesting to see how the new browser Flock is going to affect the rest of the browsers as it does a very good job of integrating and supporting web based applications.

It's funny how web based applications have created a kind of standard for how to design programs. Most web based applications come with their layout written in CSS, the client side data in HTML or XML, client side logic written in Javascript and they communicate to a server via XMLRPC. It is interesting to see how that this creates a very nice separation between the looks of the application and its data. This is something that one could wish more of from ordinary applications even though the Model-View-Control paradigm tries to realize this. It seems though that ordinary applications are learning from this. Microsoft has announced a new language for specifying interfaces which seems to me to be related to CSS.

I should also mention that I'm still using Firefox. I tried to switch to Opera a couple of weeks ago. But many of the things I use my browser for doesn't work properly in Opera and that is a showstopper for me. I use Opera for one thing though, Amazons Mechanical Turk. But we will see if Opera will improve further with their upcoming version 9. Perhaps I'll switch then.


History's worst bugs

Wired has an article on history's worst bugs. It gives a chronological list of the 10 worst bugs in the history of bugs. I found it an interesting read. Furthermore they also give the etymology behind the word "bug" which was fascinating.

A random silly fact about the article is that the authors name is very similar to Simon Garfunkel. I misread it several times.

But what I'd like to expand a bit upon is what they write in the first paragraph of the article. There they report on the fact that Toyota had to recall a number of their Prius cars due to a bug in the software of the car. I find it interesting that Toyotas name shows up here because few company's are so tightly associated with high quality and robust things. Here in Sweden someone even tried to put a Toyota logo on his car when he had it inspected in the hope that it would pass more easily. (He didn't come up with this himself though, Toyota is running a commercial which shows people doing just that.) "The Toyota Way" is a corporate model for (among other things) increasing the quality and reliability of the products. Examples of how they work is that finding a problem is considered a success. They keep asking "why" when a problem shows up to really find the root of the problem. This had the effect that a small pool of oil on the factory floor changed the bonus program for people in the buying department. This way of long term thinking reminds me of the thinking I blogged about a while ago in Getting Software Right. What I would like to see is a Toyota Way for the software industry. Now that Toyota need software in their cars maybe they can improve the field of software engineering. I should point out that I don't think it is possible to use the Toyota model right off the shelf since it is aim at producing physical stuff, not computer program. These two things are inherently different.

Winners of the 18th IOCCC

I can't help my fascination for the International Obfuscated C Code Contest. The kind of code that the contestants produce is just mindblowing. The winners of the 18th version of the competition was just announced. The code of the winning entries has not been published yet but ruling from the titles of the entries they're better than ever. The following picture was generated from one of the winners.

Finally, I can't mention the IOCCC without boasting about the fact that I have my office across the corridor from a three time former winner of IOCCC.


24 signs of stress

Here's a beautiful demonstration of various signs of stress.

Found on Jonathan Hardwick's homepage.

Standard Annotation Language for Haskell

A thought struck me today: Maybe Haskell needs some standard way to annotate the source code? There's already a semi standard for documentation and that is Haddock. But what I mean is something juicier than that.

It seems several projects are working on attaching some kind annotations to Haskell. It mostly has to do with properties of Haskell functions, for example if a function is idempotent or if it commutes with some other function. The two larger projects that I'm aware of that does these kinds of things are Programatica and Cover. And there is also DrIFT which it a kind of code generation tool for Haskell to simply certain repetitive tasks. All these projects use different means to attach information to Haskell programs.

But doesn't Haskell already have a way to annotate the source code? There is the compiler pragma specified in the language standard. Well, pragmas are only standardized up to the point that they are delimited by certain characters. Apart from that, all bets are off. We need some more structure, a unified syntax along the lines with Java's annotations. While I haven't used the annotation mechanism in Java it looks really well designed and useful. Something along those lines is what I'm after for Haskell.

So, what would this look like. Currently I have no idea. All I know is that having a common way of expressing things saves time and work. Syntax is not shallow, it is really important. The problem is that those people who need it the most (the Programatica and Cover people) are the people who are the least likely to spend any time with this. I know most of these people and the look down upon thing like this, defining a common syntax with no meaning. But XML is also a syntax without meaning and although that sounds like something really ridiculous XML has actually saved a lot of work and has let programmers and designers spend their brainpower on the more semantic parts of their problems.

Well, I should really talk to someone about this. Make the wheels start turning. We'll see how it goes. Unfortunately I'm a bit pessimistic.



There's been lots of talking about Google the past days (well the past years in fact...) I thought I'd write down some of the news here.

First of all the result Googles Summer of Code was published. I'm really impressed by the number of successful projects that has been sponsored by Google. It's a great thing for the open source community and I hope we will see more of this. And I expect we will since it must generate a lot of good-will for Google.

Secondly, Google is pouring some more money. This time it is to the Oregon State University and Portland State University for helping them maintaining various open source websites and projects. There's an official press release.

Perhaps the most exciting news is that of base.google.com (it's currently down but has been known to be up at occations). It's a database where you can add all kinds of things. The really interesting thing happens when it is connected to Googles other services like Google Local, Froogle and the upcoming Google Wallet. Then you can share and trade information and goods, you can start local or global clubs and organizations. The possibilities are almost endless. The only potential problem that I see is how to structure the site so that it doesn't become "too abstract". That is, it becomes so general that it is almost useless. But I think Google will solve this, they know how to do things right. There's an article at ars technica about this.

Finally a note from Googles official blog about some stuff that was published on Google Video. Personally I haven't used Google Video so I cannot really say anything about it. Other search engines just search the web for video files and let you search them. But Google requires video makers to upload them onto Googles site. The archive will ofcourse be a lot smaller but perhaps it will be more useful. Time will tell.

Well, Google is hot. And they just continue to lanch new stuff all the time. Some people might fear that Google might become too big. But I don't think that is a problem. If there is one company that I will happily see taking over the world it is Google. With their philosophy that one can earn money without being evil, and which they've also proven to be correct, I trust the company fully.


Quote time again

Long time since I posted a quote here. This time it is from an invited lecture given at the conference FLoC in 1996. The reason I found this quote is because I read it in an article. Just a warning before you read it; You need to be a computer scientist to understand it.
Translating a conjecture into clause normal form before handing it over to the theorem prover is like shooting oneself in the foot before starting on a long hike.
-- Gerard Huet


Dark matter and Cosmology

For quite some time I've been rather provoking about our current knowledge of the universe by saying: "The only thing we know for sure about the current model is that it is false." The problem that has been plaguing scientists for some time is that the observed weight of the galaxies isn't enough to hold them together with gravitation. At least that's what the theory says. And since we all know that the theory is right (I'm being ironic here) people have suggested "dark matter", mass that we haven't been able to observe, to be floating around and making up for the lack of mass. This whole thing has always sounded a bit ridiculous to me. It's a sure sign that a theory is in trouble when you have to patch it like this. So I've just been waiting for the downfall of the theory.

Now it might turn out that fixing the theory is surprisingly easy. Researchers have now redone the calculations using a better approximation. They've used general relativity theory instead of Newton's old workhorse of a theory. It turns out that this closes the mass gap and removes the need for dark matter. The article hasn't been reviewed yet but if it holds out then it is a very good thing for the present cosmological model.

Web 2.0

I've just read one of the most interesting articles I've ever read about the internet. Tim O'Reilly is writing about what is called Web 2.0. To be honest I hadn't heard about this term until recently. It's a name which tries to capture the new ways of the internet, the new services, the new business models and how it all works. O'Reilly tries to nail down the core of Web 2.0 and has some very insightful comments on the way. It's a long article but it is well worth the read. Go on, read it!

What Is Web 2.0


Levine the Genius Tailor


It is impossible to begin a discussion of psychological principles of programming language design without recalling the story of ``Levine the Genius Tailor.'' It seems that a man had gone to Levine to have a suit made cheaply, but when the suit was finished and he went to try it on, it didn't fit him at all. ``Look,'' he said, ``the jacket is much too big in back.''
``No problem,'' replied Levine, showing him how to hunch over his back to take up the slack in the jacket.
``But then what about the right arm? It's three inches too long.''
``No problem,'' Levine repeated, demonstrating how, by leaning to one side and stretching out his right arm, the sleeve could be made to fit.
``And what about these pants? The left leg is too short.''
``No problem,'' said Levine for the third time, and proceeded to teach him how to pull up his leg at the hip so that, though he limped badly, the suit appeared to fit.
Having no more complaints, the man set off hobbling down the street, feeling slightly duped by Levine. Before he went two blocks, he was stopped by a stranger who said, ``I beg your pardon, but is that a new suit you're wearing?''
The man was a little pleased that someone had noticed his suit, so he took no offense. ``Yes it is,'' he replied. ``Why do you ask?''
``Well, I'm in the market for a new suit myself. Who's your tailor?''
``It's Levine---right down the street.''
``Well, thanks very much,'' said the stranger, hurrying off. ``I do believe I'll go to Levine for my suit. Why, he must be a genious to fit a cripple like you!''
Would it be inappropriate to concot a version of this story called ``Levine the Genius Language Designer''? The first problem in discussing language design is that we do not know the answer to that question. We do not know whether the language designers are geniuses, or we ordinary programmers are cripples. Generally speaking, we only know how bad our present programming language is when we finally overcome the psychological barriers and learn a new one. Our standards, in other words, are shifting ones---a fact that has to be taken into full consideration in programming
language design.

Psychology of Computer Programming by Gerald Weinberg (pages 210-211 in the silver anniversary edition). Via LtU.


Good Worms

A constant problem with today's internet is (beside the problem of spam) the many viruses and worms that take control of peoples computers. And this is not a new problem. No, it has been around since the 80's at least. So why do we still have this problem? Well, it hasn't become a real problem until the internet took off in the late 90's. As time passed on more and more security holes where found in computer which were exploited by worms and viruses. But these holes were patched and today's operating systems are much more difficult to exploit for a worm.

So why are worms still a problem? Because most users use old unpatched software. Even modern worms use old exploits to propagate through the internet.

This is a very frustrating situation. I wish that we could somehow force the people who uses insecure systems to upgrade. But there might be a way. Using the same holes as the malicious worms use we could create 'Good Worms' which patched systems instead. There is a very interesting article about this in eWeek. Ofcourse there are many potential problems and complaints about this techniques but I think it can be made to work and I think it needs to be done considering the present situation. Make sure to read the article and also read the articles it refers to which argues very well for Good Worms.


Less depressed or more happy?

Psychology and psychoanalysis has to date mostly been about negative emotions such as depression, anger, frustration and so forth. When you go see a shrink he will probably discuss all the bad things in your life and your negative thoughts. Unless your lucky. Because, as of late, this field has realized that focusing on the bad just doesn't do it. It's not enough to just make people less depressed, they need to be more happy!

I just read the most exciting article on the about happiness and the newly started research in that area. This whole line of thinking makes very much sense to me, to try to do something good instead of avoiding to do something bad. But I should admit that most of the time I'm no better than anyone else in this respect. I'm actively working on getting better in this respect right now, though.


State of the art in programming web based applications

A while ago I blogged about web based applications. I wrote that I think they are the way of the future and offer many great advantages. But how does one go about writing those applications? I mentioned before that the current state of the art is a collection of technologies which goes under the name AJAX. To tell you the truth, I consider AJAX to be stone age. Web development needs some serious improvements. Why do I think that? When using AJAX you must use so many different tools. There is JavaScript, XML (which really isn't anything in itself, just a piece of common syntax) and some programming language of choice for the server side program. And this is if the program is small and well structured. A good example can be found in an article posted not long ago on /..

My point is that there are too many technologies that need to work in synchrony. If you want to change your application you need to fiddle in some JavaScript, perhaps some XML files and in your server code. And then you have to make sure they all still fit together. It just seems fragile to me. But I must be honest here. I don't have very much experience here, this is just an observation from my general impressions of the situation.

So, what do I propose as a solution? Well, I don't have the solution in my hand right now but I have a rough picture of what I think it should look like. What we need is a language where we can express pretty much our whole program with all its parts. We shouldn't need to worry about the exact layout of the messages sent between the server and the client. I care very little whether its formatted with XML or JSON or what have you. Of course it is useful to be able to control this at some point but if I don't want to worry about it I shouldn't have to.

Is there any work done in this direction then? Yes it is. I was not the first one wanting a better solution than the present. The thing which seems most promising is Ruby on Rails. I know next to nothing about Ruby on Rails but it seems to be a very nice framework for developing web apps. The only problem I see with it is that it is based on Ruby which is a scripting language which too few static checks in my opinion. But I know other people have other opinions about that so I'll stop whining about it.

There is also an academic effort to develop a language which can take the place as the language for web programming. The language, not yet fully defined, is called Links (it doesn't have any official homepage that I know of) and the initiator is non other than Philip Wadler. Since Wadler is the brain behind it I'm sure it is going to be a sweet language. What I am afraid of is that it will have rather little impact on the web developer community. You can check his blog where he posted an email I wrote to him about this.

Another thing I'd like to complain about, while I'm on the subject, is how to develop the interface of web based applications. Assuming that we're running the application in a browser, it requires vastly different technologies to develop the interface for a web based app compared to a standard one. My utopian dream of how this should work is that there would be no difference in how to specify the interface of a web based app and non-connected one. The only thing I should have to specify is a bit which tells the program where to run. In a browser or in a standalone interface. Well, perhaps a little more that one bit would be needed but not much more. But in this case I'm afraid I haven't seen any signs of reconciling the two camps. Or rather the gazillion camps since there are just so many ways of writing a standalone interface depending on what library you're using. I think some reconciliation here would be a clear win. But I also see that it is a very difficult task and that it's not likely to happen any time soon.

On a more abstract note all of what I've written here is about being able to expressing oneself at a high level of abstraction. Some details you simply don't want to care about. You want to be able to express yourself clearly, succinctly and without having to repeat yourself. Here are my key rules for achieving this in computer science. Pick a programming language with powerful abstraction capabilities and arm yourself with good libraries and write new ones when you have to. When that fails come up with a new (often domain specific) language to be able to express yourself naturally in your particular domain. Finally, code generation can do wonders, sweeping loads of boring details under the carpet where you will never have to see them again. Maybe some day that will be the case for developing web based applications.


Firefox versus Opera

I've been using Firefox for about a year now. I'm very happy with it. Especially useful is its extension mechanism. One can download small extensions to enhance the browser to do just about anything. But I've found that most of the things I've extended Firefox with are features I grew accustomed to while using Opera.

A couple of days ago a new version of Opera was released, version 8.5. The big news is that it doesn't have any ad banners in the unregistered browser anymore. I downloaded it to try it out and see how it compared with Firefox nowadays. And I must say I'm very tempted to switch back. Opera feels lighter and snappier. It comes with just about any feature I use on the web preinstalled. It saves sessions by default so that when you start the browser again it will show you the same set of pages as when the browser was closed. One previous problem with Opera was that it didn't handle som web sites that well, including Blogger and GMail which I depend heavily on. But that is a problem of the past. The only thing I'm lacking in Opera is some feature to block ads in a webpage. I'm currently using the Adblock extension to Firefox which has made my everyday surfing experience so much nicer.

But then there is also the question of whether I should support an Open Source project or not. It feels good to contribute the the Firefox project because I believe in Open Source and I think it is a good thing. But Open Source also needs competition otherwise it run the risk of growing stale. And Opera seems to me to be a better browser in a lot of respects. If I can make it block ads in web page just as well as the Adblock extension does it I'm probably going to switch back.


Batman Begins Soundtrack

A couple of weeks ago I saw Batman Begins and recently I listened to the soundtrack. It doesn't happen very often that I get this excited about a film score, but this one is a real pearl!

The music is composed by Hans Zimmer and James Newton Howard. The work of Hans Zimmer I know fairly well as I have several of his soundtracks in my collection. And it is easy to hear his contribution to this soundtrack with his characteristic adrenalin raising yet melodic beat. It has taken many action movies to a new level. As for James Newton Howard I haven't listen to much of his music directly before even though I've seen many of the movies he made the music for. In the Batman Begins score there is a kind of theme which I can only describe as a kind of dark Vangelis-like music. I can only assume that this is Howards contribution.

As for the film itself, Batman Begins, I enjoyed the movie. It is an above average action movie which takes its time to develop the characters and how Batman came to be. The cast is full of very good actors, perhaps surprising since one would expect the movie to be aimed at the action audience which perhaps isn't so picky about the performance. But it shows that the producers have had a very ambitious goal with the film. A goal which I think ultimately fails. And I didn't really understand this until after I heard the soundtrack.

The film centers much around fear. Under his training Bruce Wayne is taught to face his fears and become one with them. He needs to be feared by his enemies. His nemesis in Gotham is the Scarecrow which uses fear as his weapon. And so on. But I think that this point is somewhat lost. Nowhere in the movie does it get really scary. Some scenes which have a tremendous potential of being scary or at least very intense simply fall flat. I tend to blame the director for this. One thing is for sure, we don't need to blame the score. At times it is just totally magnificent. Unfortunately it is not the kind of soundtrack that one can just sit and listen to. At least I cannot due to it being rather dark and scaring the crap out of me. But that doesn't change the fact that it is one of the most exciting scores I've ever heard. This soundtrack deserves a better movies.


Dumb Ideas in Computer Security

A whole month without blogging! I need to shape up!

Today I read a very interesting article which I found on /. called "The Six Dumbest Ideas in Computer Security". It is a very interesting read. The author argues that in many cases we try to solve the security problem by attacking it from the wrong direction. An example: instead of filtering out gazillions of bad programs (malware, viruses, worms etc.) on should focus on only allowing those programs that we actually intend to use to run. With this turned-around approach we no longer need anti-virus lists that need to be updated every week. We will simply never be troubled again by malicious programs.

I don't agree with everything the author writes in the article though. His third point is that patching a piece of buggy software is a bad idea. I simply cannot accept that. It is not stupid to fix a bug. It is a Good Thing. What he argues for is that systems should be build with security in mind from the bottom up and that one should carefully plan systems before writing the code. I wholeheartedly agree with that. But that doesn't mean that fixing bugs is a bad thing.


Math Games

The Mathematical Association of America has a monthly column about Math Games which they publish on the internet. I heartily recommend a visit there. The variation is very good and span from discussing 64K intro demos to block sliding puzzles to prime numbers. There are lots of interesting puzzles and links to fun pages. Everything is very accessible. Enjoy!


Sojourner Quote of the Week

Every week I receive Sojourner's weekly newsletter. This week's newsletter featured the following quote which I found rather worrying:
"Three quarters of Americans believe the Bible teaches that 'God helps those who help themselves.' That is, three out of four Americans believe that this uber-American idea, a notion at the core of our current individualist politics and culture, which was in fact uttered by Ben Franklin, actually appears in Holy Scripture. The thing is, not only is Franklin's wisdom not biblical; it's counter-biblical. Few ideas could be further from the gospel message, with its radical summons to love of neighbor."

- Author Bill McKibben, in his Harper's magazine essay, "The Christian Paradox"



I've been watching the TV show Numb3rs lately and I enjoy it immensely. But me being a math geek and this show being obviously meant to appeal to such I'd like to explain why I like it.

But let me first give a brief review of Numb3rs. Numb3rs is a crime show about an FBI agent solving cases. To his aid he has a mathematician who tries to explore various patterns in the crimes and can help solve the cases. Hence the name Numb3rs.

I started watching the show mid-season and watched about two episodes when I sort of decided that I didn't quite like the show. I thought the math part was pretty dull and this whole thing with the mathematician trying to explain the mathematics pedagogically was pretty lame. But then I thought I should give the show a second chance and started to watch it from the beginning. And all of a sudden I was hooked.

I had the wrong expectations on the show when I started watching it. I hoped the math part would be really savvy but I was greatly disappointed. The real strength in this show is the characters and how they develop. As it turns out the FBI agent and the mathematician is not only colleagues, they're also brothers with the FBI agent being the older brother. This in itself makes for a very interesting relationship between them. Add to this couple their father who's another important character in the show. He has seldom anything to do with the cases, he's just there as a part of the brothers lives. On top of this we have two other FBI agent working together with our main character and a rather eccentric physicist who is a friend of the mathematician. All of this makes for a very good mix of characters and the show is really about the lives of the two brothers who happens to be colleagues. The focus being of course on their work together. So I think that the thing I like about the show is this very well-balanced mix of character development and crime solving. The math part is just a bit of extra spice which makes it even better.

So what about comparing this show to, say, CSI? I think it is difficult because they are rather different. Numb3rs is better on the character development and gets interesting because one cares about the lives of the characters. CSI is better on the crime solving part and excels in the juicy details about the crime. I like the atmosphere in Numb3rs better but I also really like the really slick production of CSI. So I'm not going to pick a winner between these two.

Well. All in all I can very much recommend Numb3rs. Even to non-geeks.


Harry Potter and the Half Blood Prince

A few days ago I finished reading the latest Harry Potter book; Harry Potter and the Half Blood Prince. It is the sixth of the seven previously promised books in the series. For those of you who haven't read it yet: don't worry, I'm not going to have any spoilers in this post.

To begin with and somewhat off topic I should say that I didn't stand in line to get this book in the day it was released. I preordered it from Amazon UK which turned out to be a real bargain. I paid 130 SEK including shipping when the price for the book in Swedish bookstores was 199 SEK. I'm finding it very hard to go to a bookstore to buy a book these days when it's that much cheaper to buy over the net.

Okay. What about the book then? I must say I didn't find it as exciting as the previous books. The book was still an easy and fast read but it lacked some magic which the other books had. Maybe this is just because I'm getting to know the format of the books. All the books have pretty much the same general chain of event and it's getting a little too familiar. But the end of the Half Blood Prince promises that the seventh book will be quite different.

As to my theory about Draco Malfoy which I posted about earlier, the Half Blood Prince had some very interesting turnes of events. I think the events in the very end of the book and Draco's behavior there shows that I might be on the right track. But it is by no means certain. It has occurred to me that Rowling (the author of the HP books) uses Draco as the antithesis of Harry Potter and maybe she wants to maintain that all the way to the end. It'll be exciting to see what she does in the last book.

One theme which has been constant throughout the books has been the mystery surrounding Severus Snape. I have long though that he is one of the most interesting and mysterious character in the books. It was a little surprising to me to see that the secrets surrounding Snape, why Dumbledore trusts him, the reasons for his various behavior and his true allegiance was revealed already in the sixth book. But I don't say it is a bad decision, I was just surprised. One of the reasons for the early disclosure of this mystery is perhaps that there are a great many things which need to be explained and finalized in the seventh book that it was more or less necessary to get this particular thing out of the way. It also gives room for some exciting drama in the final book.

So despite the fact that I wasn't overly thrilled with the Half Blood Prince I am (as you probably can tell by now) already looking forward to the seventh and final Harry Potter book. The way the Half Blood Prince builds up to the finale in the last book shows great promise.


Quote day

The Second Law of Thermodynamics:
If you think things are in a mess now, just wait!
-- Jim Warner

Seen in a sig.
To refuse awards is another way of accepting them with more noise than is normal.
- Peter Ustinov

Appeared on my personal google page.


Death Star Subwoofer

I haven't been blogging for quite a while now. It has its reasons. First of all I've been working my (insert appropriate part of body) off trying to write up my thesis. Then I hit the wall. Now I'm currently on sick leave, and the thesis is nowhere done. But that should leave me with more time to blog shouldn't it?

Anyway, ./ had a link to the most awesome piece of HiFi equipment currently being sold on eBay. A Death Star subwoofer. It's truly impressive. Check it out at eBay.co.uk.


Another Google Beta

Google just released Google earth, a program to view pretty much the whole of the earth. Some parts of earth even come in 3D. Here is a picture of southern manhattan:

Of course there is a lot of search features in the program linking it to Google. Pretty cool application if you ask me. I find it a bit slow though and I hope that will improve. Otherwise it will be unbearable to use.
Again here is a picture of where I live, together with a little placemark to give a more precise position:

Quote By Edward Nelson

I've been reading stuff by and about the Princeton Mathematics professor Edward Nelson lately. And I'll be reading more when I get the time. Here's a beautiful quote by prof. Nelson:
Perhaps infinity is not far off in space or time or thought; perhaps it is while engaged in ordinary activity - writing a page, getting a child ready for school, talking with someone, teaching a class, making love - that we are immersed in infinity.

The reason why I've been reading Nelson is that I've been thinking about my own philosophical standpoint with respect to mathematics lately. Nelson is pretty radical but I find his opinions interesting. I will have more to write about that soon (I hope).

Inorder traversal in Haskell

How many ways can you write a function that performs inorder traversal of a tree? On the whiteboard in my office there is currently five different versions. One has quadratic complexity, one is higher order, one uses an accumulator and three of them needs a helper function to do all the work.

All these variations sprang from a discussion with David Wahlstedt about which versions his termination analysis could handle. It happens that my preferred version of the function, which is linear, first order and doesn't need any accumulator nor a helper function is little more difficult to prove to be terminating. And David's termination analysis cannot handle it.

As a little programming exercise I suggest you try to write my preferred version. To make it a challenge make sure you write it in a functional language. It takes a tree (defined in the obvious way) and returns a list of all the internal node in the order they would be visited by an inorder traversal. Remember, the function must be first order, have linear time complexity with no need for an accumulator or a helper function.


Welcome to my place

Google has now added satellite images over most of Europe and a bunch of other places to Google Maps. In the center of this map you can see where I live.


Web based applications

OK, since I cannot get anything written on my thesis right now anyway I might as well do some blogging. What I'd like to write a bit about is web based applications.

I believe Web based applications is the applications of the future. By a web based application I mean an application that you download from the internet when you run it. It typically also communicate over the internet a lot while running. The advantages are clear: You don't have to do anything to get the latest version, you automatically get it when downloading the program. It is the same with the data you're going to handle in the program, it will always be up-to-date. If the company providing the application is storing your personal data for you on their servers you can access it anywhere there is an internet connection. You don't have to worry about backups or transferring files when you get a new computer. This is their problem and they're most likely a lot better at it than you are.

Google is currently the leading company on this. I use GMail for all my emailing nowadays and it is perhaps the best email application I have ever used. (For the record I've used the following email programs: I started using the text based elm and pine. When I got my windows laptop I started using Outlook. I tried to use Netscape once but didn't like it. GMail beats them all.) Another cool Google app is Google Maps. I think it is pretty amazing that it can run so smoothly! Still, there are room for improvements. But the possibilities for Google Maps are simply huge if you imagine adding all kinds of localized information to that program.

One niche which I think could benefit a lot from this is games. The gaming industry has already realized the new posibilities with web based game play which make the games a lot more fun. For small games such as card games and puzzles I think web based deployment is ideal. If you're only after some minutes of diversion you don't want to bother with downloading and installing an application. This has already happened to some extent with site like Shockwave. I list other links below.

The current technology is to use the web browser as an "operating system" to host web based applications. The "machine code" is java script. But the browser comes equipped with a lot of technology for displaying information graphically such as rendering HTML and using CSS. These things together with interaction with the web server from the java script code is usually called AJAX and is currently very hyped. And it IS cool in the sense that it allows us to enjoy these new cool web based applications.

But this need not be the only technology and if it is going to take of seriously it should be integrated with the standard operating system in my opinion. An alternative technology is Java Web Start. Java Web Start has a little ordinary application which can be seen as the start button in windows. It has a list of programs that is available to you for download. The platform used here is not the browser but the Java Virtual Machine. In my opinion Java is a much more mature platform for web based applications but it hasn't received much attention since the applets went out of fashion. (I should add that I think that applets were the wrong thing. It was difficult to get an "application feeling" from them. They were restricted to a little box inside a web page. But they clearly paved way for cooler things.)

I understand perfectly if you're a bit skeptic about this idea. Especially if you have no experience with web based apps. And of course there are drawbacks. There are security issues all over the place and so it can never be the case that all programs are web based. And one needs to be connected to internet pretty much all the time to use them. In some cases this could be circumvented by caching the application locally. That would restrict the user to only use the data available locally on the machine. How much of a problem this is will vary between applications.

Finally I wish to list some cool links to some pretty amazing demos as to what is possible with these new technologies. Some of those things aren't very useful but they sure give a taste of the enormous potential of web based apps.


Quote of the Day

A well adjusted person is one who makes the same mistake twice without getting nervous.

From /.


Regexp humor

Niklas Broberg told me a hilarious thing he'd seen in irc. There was a guy who had erroniously spelled the word "wrong" like this: "worong". When noting his mistake he wrote the following thing in the hope of correcting his mistake:


Wittgenstein was a genius

If people never did silly things nothing intelligent would ever get done.
--Ludwig Wittgenstein


Things said in court

Here a link to a hilarious page with quotes from court. My personal favourite:
Q: Doctor, before you performed the autopsy, did you check for a pulse?
A: No.
Q: Did you check for blood pressure?
A: No.
Q: Did you check for breathing?
A: No.
Q: So, then it is possible that the patient was alive when you began the autopsy?
A: No.
Q: How can you be so sure, Doctor?
A: Because his brain was sitting on my desk in a jar.
Q: But could the patient have still been alive nevertheless?
A: It is possible that he could have been alive and practising law somewhere.


The Insanity on Internet

Apparently there is no end to the crazy things you can find on Internet. I thought I'd seen many strange things but this page takes it to a new level.


Revenge of the Sith

I suppose I should have written about this earlier. Being in the middle of my dissertation-writing-swamp I joined up with my friends to go see Star Wars Episode III, Revenge of the Sith on its premiere. I must say the movie was spectacular and very good. But it was also a tough movie to see. As someone put it, it is really a movie about sin and turning to the dark side. Seeing Anakin's being sucked up by all the hate, anger and confusion was difficult to watch.

I should also note that I have a difficult time to watch and judge star wars movies like other movies. To me they are more like historical documents and it is difficult to have an opinion such things. (Before you think I am a total freak I should say that I do realize the these films are fiction and doesn't relate to reality whatsoever.) When the first prequel came out and turned out to be a not so good movie it really didn't matter to me. I just wanted to see what happened to the characters and what their history was. I guess you can call me a star wars fan...

I was a little disappointed with the premiere though. I thought there would be more people being dressed up and a more tense atmosphere around the whole happening. Part of the reason was because we didn't choose the geek cinema, but still it was the premiere and I would have expected more.

The real reason I started writing this entry is because of a page I saw at starwars.com listing a bunch of easter eggs which appeared in the film. I am a little disappointed with the list, I would have guessed it to be longer. Some of the stuff I noticed but I missed most of it. Lisa, my fiance managed to spot the millennium falcon though which made me a little jealous.


Boole's law of thought

I was browsing in Amazon the other day. The book "An Investigation of the Laws of Thought" by George Boole came up. This is a real classic and I was considering buying it. But was I happy to find that the whole text is available by Project Gutenberg. Now I just need to print the 328 pages...

P.S. I really like Amazon because you can really go shopping there, browsing through there product by various means. They have good recommendation lists and people can set up their own lists of favorite items. I think it works really well and I like it.


Measured my brain

I just saw this test on a friends blog. It is said to measure what kind of thinking one does. My result can be seen below. That third advice really disturbs me...

Your brain: 40% interpersonal, 60% visual, 80% verbal, and 220% mathematical!
Congratulations on being 400% smart! Actually, on my test, everyone is. The above score breaks down what kind of thinking you most enjoy
doing. A score above 100% means you use that kind of thinking more than
average, and a score below 100% means you use it less. It says nothing
about how good you are at any one, just how interested you are in each, relatively. A substantial difference in scores between two people means, conclusively, that they are different kinds of thinkers.

Matching Summary: Each of us has different tastes. Still, I offer the following advice, which I think is obvious:

  1. Don't date someone if your interpersonal percentages differ by more than 80%.
  2. Don't be friends with someone if your verbal percentages differ by more than 100%.
  3. Don't have sex with someone if their math percentage is over 200%.

My test tracked 4 variables How you compared to other people your age and gender:
free online datingfree online dating
You scored higher than 46% on interpersonal
free online datingfree online dating
You scored higher than 45% on visual
free online datingfree online dating
You scored higher than 66% on verbal
free online datingfree online dating
You scored higher than 91% on mathematical
Link: The 4-Variable IQ Test written by chriscoyne on Ok Cupid


A Group Is Its Own Worst Enemy

I just read a nice article called "A Group Is Its Own Worst Enemy" about group psycology and social software. It has an abundance of nice quotes:

Humans are fundamentally individual, and also fundamentally social
So there's this very complicated moment of a group coming together, where enough individuals, for whatever reason, sort of agree that something worthwhile is happening, and the decision they make at that moment is: This is good and must be protected.
The external enemy -- nothing causes a group to galvanize like an external enemy.
People who work on social software are closer in spirit to economists and political scientists than they are to people making compilers.
And the worst crisis is the first crisis, because it's not just "We need to have some rules." It's also "We need to have some rules for making some rules."
The tyranny of the majority.
The user of social software is the group, and ease of use should be for the group. If the ease of use is only calculated from the user's point of view, it will be difficult to defend the group from the "group is its own worst enemy" style attacks from within.

Go on and read it!


Thesis writing frustrations

I'm sitting here days on end and writing my thesis. It's hard work. It's boring. I'm bad at it. Argghh! Why can't I finish sooner! I wish I was really good at writing, words just flowing from my fingertips into the computer and on to the screen. I wish I were better at formalizing all those crazy ideas I've had and which I now have to write up to earn my Ph.D. Well, in a better world perhaps.


Problems with Google Webaccelerator and Firefox

Earlier this week Google released a Webaccelerator which works together with Firefox and Internet Explorer. It's a nifty little add-on which tries to download a cached version of the page your trying to download. The cached versions are stored on Google's server farm. The idea is that the page should be faster to download from Google than from the original site. To speed things up even more the cached copies are compressed when they are sent. I've used it since it was released and according the counter in the program I've saved about 20 minutes of surfing with it. It actually improves the speed quite a lot on some sites!

Until today. When I tried to launch my Firefox a couple of hours ago it wouldn't start. I tried many things like shutting down the webaccelerator. I chatted with some people on the #firefox channel who advised me to try all kinds of things. The only thing that helped in the end was uninstalling the webaccelerator. Too bad.

It seems that Google has some problems with its site at the moment. Some DNS flux or something. So that is probably why the webaccelerator isn't working. But I think it is a rather serious thing to completely stop my browser from working when Google has a DNS problem.

Well, I'm not complaining too much. First of all, the webaccelerator is a beta. Yes, I can hear you saying that Google is currently altering the meaning of that word with all its beta products up and running. But still, it's a beta.

There has also been a lot of complaints about the security risks of the webaccelerator. When visiting some site requiring logins some people have found themselves logged in as someone else. That's really serious! It seems that the guys at Google Labs have a lot to work on.

Well, I will be waiting for an upgrade of the webaccelerator. But once they release an improved version I will install it again. I'm happy to be a beta tester.



The last couple of days I've read a couple of articles about the right wing Christians in the US who seems to be all too certain about what's right and what's wrong. I just read this article about how Kansas is now changing the way they teach the origin of life in schools.

Let me say a few words about my own standpoint. I'm a scientist and I'm a Christian. I don't think there is a conflict between Christianity and science. However, many people act like there were or the try to create a conflict. The conflict is between some Christians and some scientists. Both Christianity and science is about the truth. Because of the way science go about unraveling the truth and the way that the Bible is interpreted Christians and scientists don't always agree on what the truth is. As for me I am first and foremost a Christian. When there is a discrepancy between the two views I choose the Christian version. This is because I have found that the Bible is trustworthy. God exist and the Bible is accurate in describing him. Also, as a scientist I have found that science never holds the final truth. It often varies as new data comes to light and challenges old theories. Don't get me wrong. I am a scientist, I very much believe in the scientific way of scrutinizing things. But I also know that scientists are also humans and that as our ways of examining our world get more refined we learn new things and have to revise our current standpoint. I find God more reliable.

So I am what people would call a creationist. That's a word which has a really bad ring to it among scientists. But I'm not anti-evolutionist. Rather I'm somewhat skeptic to the theory that life as we see it today has evolved the way contemporary scientists claim. I'm not alien to the idea, I'm just skeptic because I don't find the arguments very convincing. In fact, I think it looks like the evolution theory is cracking up. It has been patched in the last twenty years or so. When scientists starts to patch a theory to fit with the data it's a sure sign something is wrong. So my bets are that there are better theories around the corner. I guess you could call me pro-truth.

I think that the story that the Bible tells about how God created heaven and earth is complementary to the answers we seek as scientists about how the creation went about. The Bible is not very specific with the details. These details are for the scientists to discover. That's how I deal with being both a scientist and a Christian.

But all these things I'm reading about right wing Christians in the US makes me sad. They give truth a bad name. They put forward alternative "scientific" theories which aren't scientific at all. They don't seem to have any interest in arriving at the truth other than to postulate it. I don't see how this can be good for anyone. If God exist and the Bible is true then it shouldn't be any problem with arguing for it. There is nothing to be afraid of. Christianity can stand up against scientific scrutiny because it's about the truth.

I have much more to say but it gets outside the topic of this particular posting. I'll make sure to return to it. Also, it's late and I really need to sleep.


The most fearsome hacker

Check out this story. Totally hilarious! And yet sad in a sense.


New Computer

Hmmm... Maybe it's time to buy a new computer?


I'm on Slashdot!

Finally I got a story published on /. . I went to Paul Grahams web site and noticed he had written a new interesting essay on PR firms. Check out the /. story.

I've been trying to get stories posted on /. before but failed. It has felt a little frustrating so this feels like a relief.


Too little ice cream?

Did I mention I like quotes? Here is one of my own sayings which I was asked to put here by a friend of mine:
There is nothing as frustrating as too little ice cream.

OK, let me get this straight. It's not that I eat tons of ice cream. In fact I don't eat ice cream that often. But when I do I don't want too little. I like ice cream very much and having just a little less than enough is simply not enough. Too much ice cream is not good either. But the most frustrating thing is too little ice cream.


OK, I haven't been blogging much lately, but seeing this quote on /. I just had to.
Beware of the Turing Tar-pit in which everything is possible but nothing of interest is easy.

I should have recognized this. A little googling revealed that it is one of Alan Perlis' beautiful epigrams.
The epigram summarises very nicely my research and in fact any research in programming languages. All interesting properties about programs turn out to be undecidable. This might seem like bad news. But I wouldn't be so fast. This is precisely what makes my field of research exciting. Instead of finding the exact answer we have to find good approximations which can be computed in reasonable time.

It seems that the term "Turing Tar-pit" has a pretty interesting meaning nowadays. Quoting from answers.com:
A Turing tarpit is a programming language designed to be Turing-complete while minimizing the number of distinct instructions. Such a language gives up practicality (such as ease of coding, performance, etc.) but is often useful in theoretical computer science.


Licence wizard

Here's a very simple yet helpful web application for those confused with the free software licence jungle. It's a small and ugly looking wizard that takes you through a number of questions to help you determine which licence you may want to apply to your code:
Licence Wizard


Google searching fun

To take a break I decided to search my own name on Google. It turns out that my homepage doesn't come up first! Instead the post about Phil Wadlers blog which I posted on LtU came first. It doesn't seem right!

Apart from that it seems that I'm the only (living) Josef Svenningsson which google has registered. The first link that doesn't refer to me is to a page containing the names "JOSEF ZACKRISSON" and "UNO SVENNINGSSON". That link doesn't show up until page seven among googles search results. That Uno's name would show up is no surprise since he is a famous singer here in Sweden.

On the ninth page among the search results is a link to a page containing information about a certain "Josef August Svenningsson". He lived between 1837 and 1904.

Well, browsing through all those search results it seems I've left a small mark on the Internet. I got quite nostalgic from many of the links I saw.



Yet Another Quote (from /.):
The price of greatness is responsibility.
There is a lot of truth to this quote. But it's late and I need to sleep so I'll postpone elaborating on this subject.


On having an open mind

It's quote time again. Today I read the silliest email sig I have ever seen:
Minds, like parachutes, function best when open
I don't believe in having a constantly open mind. One should have it closed and be very careful what to put in it, just as with the mouth. I read a quote about this several years ago but never wrote it down. Neither did I know who wrote it. After seaching a little on the web it turns out to be a quote from G. K. Chesterton. Is goes as follows:
I think he [H. B. Wells] thought that the object of opening the mind is simply opening the mind. Whereas I am incurably convinced that the object of opening the mind, as of opening the mouth, is to shut it again on something solid.
When trying to dig up this quote I found a good article on this subject on the net called Close Your Mind. It discusses this issue in more depth from a Christian perspective.


A contemporary classic quote

OK, here's a hilarious quote. I was leaving my fiance's apartment the other night and she told me this:
When you're leaving seems to have a laxative effect on me.
No further comments.


Phil Wadler's blog

Just noticed that Phil Wadler has his own blog here at Blogger. He seems to be just as creative as I naming it Wadler's blog. I posted a notice on LtU about this. It's going to be an interesting read, this blog.
Few people has had such a profound influence on a research field as Wadler. He's basically created several subfields in the programming language community. He started the field of deforestation (although Turchin's supercompilation and partial evaluation both existed before and are somewhat related), he introduced monads as a programming paradigm, he was among the first to recognize linearity as an interesting property for various things such as optimization and side effects. He was also one of the pioneers of lazy evaluation and he invented type classes which really makes him the father of Haskell more than anyone else. And the list goes on. So. As I said. His blog is going to be an interesting read.


Getting software right

In the /. discussion I mentioned before about code optimization and development the were links to two rather interesting articles on the net. The first one "They Write the Right Stuff" is about the guys (and gals) who write the software for the space shuttle. It is a really interesting read. It does away with all the romantic images about software as being a creative art performed by snowboarding youngsters. If you want to write code that works then you have to grow up.
The other article, not as good as the first one but still worth a read, is about an ex Microsoft guy who trains software developers. The key thing for him it the team, and how it works. His training camp focuses on getting a team to work together, to have a common vision. The article is called "Drop and Code Me Twenty!".


Optimizing code

There was an interesting discussion on /. yesterday. A guy wanted to know if people had any small code snippets they could share that did fairly common things in the fastest possible way. He wanted to make sure his code ran as fast as possible. Watching the following discussion was a very positive experience. Here are some quotes that sum up the general conclusion. The first quote I use a lot myself.
Premature optimization is the root of all evil
-- Tony Hoare's dictum.

The following quote contains the essence of most of the responses:
1) Code for maintainability
2) Profile your code
3) Optimize the bottlenecks

Many replies were also pointing out that picking the right algorithm is much more important that micro optimizing the code.
For 99% of the coders out there, all that needs to be known about code optimization is: pick the right algorithms!

Here's another beautiful quote:
"Programs should be written for people to read, and only incidentally for machines to execute."
- Structure and Interpretation of Computer Programs

I'm very happy to see this level of maturity from the /. crowd. I think there has been a shift the last five years or so. Before then too many programmers were concerned with speed. I think the reason for this shift is three fold:

1) Programs have become much more sophisticated. To be able to develop these programs one simply have to write maintainable code.
2) Computers have become much faster. You don't need to optimize your program to death to get decent performance out of it. It's OK to spend some clock cycles to get maintainable code.
3) today's CPUs are so complex that it's difficult to tell which piece of assembly code will run fastest. I'm mostly thinking of Intel's processors here with out of order execution, register renaming and multiple pipelines. Not to mention the cache hierarchy. It is nearly impossible to tell what the optimal assembly code for a given task should look like.

I very much welcome this attitude towards programming. Maybe we can start focusing on writing correct software now.


Google Movies

Google did it again! They've added a really nice feature to their search engine, a "movie:" operator. It tracks film reviews and compiles them into a single page with a single score. Just in time for the Academy Awards. More info at the Google blog

Eleanor Rigby

I've just started reading Douglas Coupland's latest book Eleanor Rigby. It's amazing. I've read all fiction books by this guy. He has a way of talking about life, life as it is for ordinary people. Seeing the little details. He often deals with loneliness and the purpose of our lives. But all that is weaved in the story of the characters of his books. I'd like to quote the first couple of lines in his new book:
I had always thought that a person born blind and given sight later on in life through the miracles of modern medicine would feel reborn. Just imagine looking at our world with brand new eyes, everything fresh, covered with dew and charged with beauty - pale skin and yellow daffodils, boiled lobster and a full moon. And yet I've read books that tell me this isn't the way newly created vision plays out in real life. Gifted with sight, previously blind patients become frightened and confused. They can't make sense of shape or color or depth. My brother, William, says, "Well, think about it, Liz - kids lie in their cribs for nearly a year watching hand puppets and colorful toys come and go. They're dumb as planks, and it takes them a long time to even twig to the notion of where they end and the world begins. Why should it be any different just because you're older and technically wiser?"
In the end, those gifted with new eyesight tend to retreat into their own world. Some beg to be made blind again, yet when they consider it further, they hesitate, and realize they're unable to surrender their sight. Bad visions are better than no visions.

Douglas Copeland certainly has a feel for the human nature.



Quote of the day:
"The first time I read this book I felt what I could only explain as a
great disturbance in the Force: it was as if a billion washing
machinces all became unbalanced at once and were suddenly silenced."

From an anonymous book reviewer on Amazon.com.


A sig I saw today

One of the most hilarious signatures I've ever seen:
make install -not war

Seen on /. today.


Harry Potter musings

I was just thinking about Harry Potter today. I have no idea why. I haven't read any of the books recently. However, I was wondering what was going to happen with the character Draco Malfoy. The book series is coming to an end and the final destiny of many of the people in the books will be decided. I have a feeling that Draco Malfoy actually will turn good in the end of the seventh book. I don't know how this is going to happen but he will probably be betrayed by the dark side, then accepted by the good side and realizing that his previous attitude which he was raised with is bad. I think this developments very much makes sense considering the general ethics of the Harry Potter books. There is ofcourse the option that Draco will never change and either die of be trapped on the dark side. But as I said I feel that the books need a person which converts to the good side. And it would be very natural to pick Draco to be the convert.


The Monad.Reader

As a Haskell programmer I take part in the Haskell community. I'm not a very active member, rather I'm a lurker. But there are other more social people in this community. Perhaps the most social character is Shae Erisson. He always hangs out at the #haskell irc channel greeting new people and help them around answering questions about Haskell. He also hosts a number of different wikis and other stuff on his web server. A really frendly guy.

Shae's most recent project is an eZine called The Monad.Reader. The title is ofcourse a pun but if you don't understand it is no use me trying to explain it. But trust me it's actually a really funny name. Well, I think this eZine idea sound like a really fun thing. I think I'm going to try to write something up for it. I have already come up with some ideas for what to share. I'm seeing forward to getting my first copy!


Me, a Google fan

OK I have to admit it. I'm a real fan of the Google company. It feels odd to say it though. I'm not the kind of guy who admires companies, products or trends. The people I look up to are researchers, composers, book writers and such. But still, I have to admit I am a Google fan.

First and foremost, Google search just rocks. There is no alternative. I use it so much every day. Anything that I want to find out, just Google for it and there it is. But it is more than the functionality. I think what plays an even bigger role is their slick design. Or rather the lack thereof. Their main page is so minimalistic it's almost embarrasing. And when you get to the seach results there is no clutter. Everything is very tidy and no graphical noise. The ads aren't annoying either which is a major accomplishment in itself.

Secondly, the thing that I actually use more than the search engine nowadays is Gmail. I rely on Gmail for all my mailing. OK, Gmail does not revolutionize emailing, as Google did web search. But it serves all my needs, it has a decent spamfilter, it saves all my old mails so that I can easily find them and I can reach it from pretty much anywhere. It also allows me to focus my activities using fewer programs. I can do mailing in my webbrowser using the same interface as for surfing. I like that.

Then there is google labs. It seems they have a lot of fun. They dare to test things. They want to go public and make everyone test their things. I like this kind of spirit. It makes me think of Star Trek.

And, ofcourse, here I am publishing using Blogger. It is a nice blogging facility. So, in short, I am a Google fan. Rumours says that Google is going to develop their own browser based on Firefox. Will I switch to using that instead of using Firefox? It is likely. (Depends on how Opera 8 turns out. I might switch back to Opera if I can use it for blogging and email...)


Rock Paper Scissors

I just visited my friend/exstudent Andreas Farre's new homepage. He had a link to one of the coolest sites I've ever seen. The Official Rock Paper Scissors Strategy Guide!

Now, the thing is I sometimes use rock paper scissors as a kind of a joke. Whenever people complain they have to wait long for something or think that things are taking too long time I suggest they should play rock paper scissors. However, people are usually quite happy to play a couple of rounds with me when I suggest this dispite the fact that they would probably laugh at it under different circumstances. I guess this is why I think of it as a joke. When bored poeple are so desperate for something to do they even bare playing rock paper scissors.

Hmm, I've made it sound like it is a game no sane person would ever want to play. It's not that bad. In fact, it is so intriguingly simple that I cannot help being charmed by it.

Blogging urge

Ok, I haven't been blogging for quite a while now. Not that I had a very high tempo before either. Anyway.

I'm getting pretty stressed up at work. This is my last term as a PhD student and my thesis has to be ready before summer. It feels tight. I'm going to have the result ready alright. That's not what I'm worrying about. The thing that really scares me is the writing. I'm really bad at writing. The more I think about it, the more it scares me. Nailing down the words can sometimes be the most difficult thing there is. But here I am writing in my blog and the words come out pretty easily. I guess it is my frustration oozing out through my fingers.

My hacking at work goes fairly well. Although I wish it could go faster. I spent the holidays hacking and I still didn't manage to get things to work in time for me to submit to the department's yearly winter meeting. Well, I managed to get some results the day before I were to present my results. So I managed to give a decent presentation. Just-in-time research :-)