Programs that put files in the root.
Like, “c:\panda.rpt”.
Or “c:\c28791e0aa1b31a2a343bd\update”. A directory I can’t delete. For some reason.
The root is sacred space.
Programs that put files in the root.
Like, “c:\panda.rpt”.
Or “c:\c28791e0aa1b31a2a343bd\update”. A directory I can’t delete. For some reason.
The root is sacred space.

Count the buzzwords.
And no, you don’t win a coffee mug. It’s just a fancy title.
Who writes texts like these? They must be on crack or something.
Ran into a strange problem today.
I’m building a site in PHP5 with some recently found Ajax stuff using the wonderful jQuery library. However, the problem I found was that when I used SSPI/NTLM authentication, the ajax queries sent to the server would always generate a login screen. It was very weird, because it worked fine in IE7, it worked fine whenever I ran normal load page requests from the browser itself, but whenever jQuery asked an ajax question, pop! came the login dialog again.
After some research, it turns out it wasn’t Firefox’s fault after all. Apparently, jQuery adds a “Connection: close” parameter in some specific cases (which happens to be every case on my machine), and that wrecked wreaked havoc with the NTLM authentication, because it happens in multiple stages over a single tcp connection, and closing the connection after every stage is a very bad idea.
Digging through the code I found the two lines
if (xml.overrideMimeType)
xml.setRequestHeader("Connection", "close");
which were the culprit. Since I didn’t want to hack jquery.js itself, causing a deployment/maintenance problem, I eventually found how to do it.
<script language="JavaScript">
$.ajaxSetup( {
beforeSend: function(xml) {
if (xml.overrideMimeType)
xml.setRequestHeader("Connection", "keep-alive");
}
} );
</script>
Case closed.
I just came back from taking a walk through town, and it struck me when I took my walk that this town – with a few reasonable changes – could be so beautiful. Right now, it’s full of narrow, winding streets without any particular order to it. The main street through town is also narrow and winding, and there’s a speed limit of 30 km/h imposed on it (~20 mph).
What follows is my proposed changes to Skärhamn. There’ll have to be some changes, some widening of the streets. Most of this won’t fit into the existing town structure, so we probably have to BLAST A FEW OLD SCRUFFY HOMES WITH DYNAMITE! BOOM!! BOOM!! HAHAHAHAHAHAHAHAH!!!!!
The blast map below indicates where major demolitions may have to occur.

The main road will be replaced with a boulevard-style street with trees planted in the middle and nice pedestrian walkways along the side. This will make everything much greener, and with the appropriate changes to the local businesses along the side – placing little french cafeterias, boutiques and so on there – the town could be given a much more cozy and enjoyable feeling.

Of course, the existing white, wooden houses would be preserved – at least a nucleus of them – to provide a quaint, picturesque part of the old historic city to stroll through.
The boulevard would be built along the green line in the map below. The blue corridor would be changed into a four-lane, 70 km/h (45 mph) business street with ample space reserved for shopping malls, movie theatres, gas stations and fast-food restaurants, providing a casual shopping experience for the entire family. A proposed Wal-Mart Supercenter might have to be located – depending on available space – on the other side of the cross-Tjörn freeway, marked in red on the map.

Altogether, I feel that this represents a rather modest improvement to the town and could very well be the thing that drives Skärhamn into the 21st century.

JavaScript is one of those gray areas in my life that I tend to stay away from. I’ve fiddled around with it once or twice, but it’s never had much of an appeal to me.
That is, until I found jQuery. And Interface.
I think this is the first time I’ve fallen in love with a JavaScript library. I’ve never gotten tears in my eyes from a demo before, but I did now. I’m sitting here, thinking “oh.. my.. god.. I just HAVE to embed this into ALL MY WEBPAGES, in fact, EVERY WEBPAGE I’VE EVER DONE, RIGHT NOW!”…
It’s like Jupiter, Mars, Mercury, Cupid and Fortuna all suddenly lined up together with Ajax and settled nicely into the little operator $, saying “hey, I’m your new best friend, where do you want to go today?”
Who would have thought that it would be so difficult to create images with text in PHP, especially using small capitals?
I’m building a website where the titles are supposed to be in small capitals. To simplify things, I didn’t want to create it in Photoshop, but just have php render everything automatically. Which it now does, I have a script called titlemaker.php (which I’m going to clean up a bit) which renders a series of texts in both normal font and small caps, and creates png images from it.
It turns out there’s rather a lot of things going on behind the scenes to make everything come out right. The GD library’s TTF support isn’t made for typesetting exactly.
Well, at least now it works. If you’d like the php source, email me.
Sometimes, things just start working, without reason.
This is a great mystery.
I love the Matrix movies. I know some people feel differently; but to me, they present a panoramic view over our entire mankind. To me, they provide a deep insight in what a simulated world must look like. It combines elements of machine-like mathematical purity with the chaotic and emotional mankind; the unification of which is not unlike the deep and paradoxical notions of quantum physics.
The Matrix movies make a deep and fundamental statement about free will. Throughout history, philosophers argue whether mankind really has a free will; if we can at any moment choose between different choices (no regard taken to whether we actually use that choice or not in practice), or if the universe is completely deterministic. If mathematical rules govern the movement of celestial bodies, keep the planets orbiting in perfect trajectories – so that it is possible to determine the exact location of Jupiter 10000 years from now – are there similar rules that govern our behavior? The mere fact that we seem to make logical decisions may not mean that the decision was not already decided beforehand, without our knowledge. Spoken mathematically, if S and S’ represent two different states, is the transition t(S, S’) between those two states governed by rules to the extent that it is possible – given all relevant circumstances – to determine exactly what I will do thirty years from now?
It only gets more difficult if we take into account such statements that God may know exactly who gets saved in the end and who doesn’t. Isn’t that deterministic? Is it predetermined – and how can God cast judgement if so – or is it foreseen? If it is possible to look at a world without being bound by time, so the entire history of man is laid out in full view, do we still have a free will?
I belong to the school that says, yes, we do. And I think the advances in quantum theory and chaos theory may one day prove me right. Isaac Asimov’s books about the Foundation offers an interesting view on the topic through its “psychohistory” – that it’s possible to determine a society’s development through sufficiently well-defined principles and equations, but that it’s also impossible to predict the decisions of a single individual (I love the notion of “achaotic equations”). It corresponds nicely with the Heisenberg uncertainty principle: That it’s impossible to know both the exact position and momentum of a particle at the same time. I believe there is a similar notion (whether it can in fact be proved or not is an exercise I happily leave to the reader) with human beings: While there are a certain type of “Newtonian” laws (such as economics) that predict how our society is progressing, it is also impossible to determine exactly the future of a single individual. Once again, spoken mathematically, it is impossible to derive a future state S’ exactly from a given present state S and a transition function t because of the inherent fundamental uncertainty properties of t itself.
The Matrix movies seem to make even a further suggestion: That we human beings crave that uncertainty, that we cannot function without it. That mankind in a fully deterministic universe would not only fail to accept the given world but even reject it. Nowhere is this more interestingly explained than in the final fight scene in Matrix Revolutions between the two nearly omnipotent characters Neo and Agent Smith:
Agent Smith: Why, Mr. Anderson? Why do you do it? Why get up? Why keep fighting? Do you believe you’re fighting for something? For more that your survival? Can you tell me what it is? Do you even know? Is it freedom? Or truth? Perhaps peace? Yes? No? Could it be for love? Illusions, Mr. Anderson. Vagaries of perception. The temporary constructs of a feeble human intellect trying desperately to justify an existence that is without meaning or purpose. And all of them as artificial as the Matrix itself, although only a human mind could invent something as insipid as love. You must be able to see it, Mr. Anderson. You must know it by now. You can’t win. It’s pointless to keep fighting. Why, Mr. Anderson? Why? Why do you persist?
Neo: Because I choose to.
Even the Architect, the program that created the Matrix world itself, acknowledges: “The problem, as you so adequately put it, is choice.”
Time travel does not make things easier, as demonstrated in another movie, Twelve Monkeys, which demonstrates the Novikov self-consistency principle: Stating that “if an event exists that would give rise to a paradox, or to any ‘change’ to the past whatsoever, then the probability of that event is zero” (quote from Wikipedia).
If one were to look at the world without time, then, where every choice has “already been made” in a sense, doesn’t that make the universe deterministic? Is there still free will, if everything has already been settled and determined? Well, put mathematically, it may still turn out to be impossible to formulate a function t(S, S’) for a single individual. The fact that the two states S and S’ have already taken place, may turn out to be a mere coincidence.