Archive for July 2001

There’s a snake on our balcony!

Yikes! Yesterday we discovered a snake on our balcony! It was about a meter long (three feet) and had a green-brown colour. We don’t know if it’s dangerous — it’s kind of scary :-/ It’s also a bit strange how it has ended up on the balcony, as it’s two meters up in the air. But it has probably climbed the wall, as it’s made up of some rough bricks with crack it them.

It’s now been 14 hours since we last saw the snake, so we assume that it has found it’s way down again in the course of the night. Let’s hope it wont bother us again.

(We never saw the snake again.)

Hungarian motorists…

Today we drove to the Hungarian capital, Budapest. On our way back we saw no less than three accidents. Luckily it seamed that no people were injured, but the cars involved were more or less destroyed.

Compared with Danish motorists, Hungarian drivers take a lot of chances. People are in a lot of hurry and don’t miss the slightest chance to overtake us when we’re driving behind a slow lorry. It’s often only in the very last second that they manage to return to their own lane again… Most of the time it goes well, but not always it seams.

Wonderful cheap pizzas!

Today we drove to the city Kecskemét where we ate some really good pizzas at a place called Labirintus. (Unfortunetely their webpage isn’t as good as their food.) The meal ended up costing about 2500 Ft which is about 10 USD! And that includes soft drinks for my mom, my dad, my little brother, and me! It’s amazing how little food costs here in Hungary.

Also, the meals at McDonald are also much cheaper than in Denmark — as much as 50-60% under the Danish price. At restaurants we could order a big Coca-Cola for under a dollar. In Denmark it would have costed more than three times as much.

After we had seen the town we drove further south to see the Putza, which is the Hungarian plains. There we saw a horseshow where the riders demonstrated how they had full control over the horses, even when the whips were sounding right above their heads — impressive.

The Lord of the Rings

I’ve just finished reading The Lord of the Rings by J. R. R. Tolkien. I started with reading The Hobbit and then the three books in the trioligy: The Fellowship of the Ring, The Two Towers, and The Return of the King. It’s probably the longest story I’ve ever read, but still, I wish it was even longer, because it was so good.

I think it’s a good idea to start with The Hobbit, although it is written for children, as it tells the story about how Bilbo Baggins (a Hobbit) helps Thorin Oakenshield defeat the dragon Smaug so that the dwarfs can regain their treasures. The great wizard Gandalf the Gray is also with them some of the way. It is only much later that Gandalf discoverer that the magical ring found by Bilbo is The One Ring.

By reading The Hobbit you’ll be introduced to the world of Middle Earth where the action takes place. You’ll learn about the Elves, Dwarfs, Humans, Orcs, etc. You’ll also be presented with a great deal of background information, names and so on. Most of the famous locations and artifacts have both Human and Elverish names, and it takes a while before you can remember all this.

But herein lays the beauty of this epic: The world created by Tolkien is vast and has a long history. He has literally created an entire world including all its inhabitants, it’s folklore, it’s myths and so on. You’ll hear a lot about ancient times, glorious battles, great men, etc. And Tolkien has managed to make everything fit seamlessly together which makes the story feel real.

So if you don’t know what to do for the next month or so, start reading this fantastic story. And when you’ve done, you should start looking forward to the films that are coming along. Take a look at the website for sneak previews and other info about them. Now that I’ve read the book I just can’t wait to see it on the big screen. I think it looks very promising so far. The first film should be ready in December 2001, so it’s only a couple of months…

Making documentation for PHP Weather

I’ve been playing a lot lately with a lot of exciting technologies, such as XML. I wanted to produce some nice documentation for PHP Weather. I then thought of Docbook. But I’ve never used Docbook before — I hardly knew what it was.

So I tried writing a little, and I produced both

HTML and PDF files. But it looks awful! The lines are not justified, the font used is Times, etc. Compared with LaTeX I didn’t like it. I know that I can change these things, and I did manage to change the font to Palatino, but it still didn’t look “right”.

So I set out to try and use the XML-files produced by PHPDoc to make code for LaTeX. First I tried using a XSLT stylesheet to transform the XML code. That worked a little, but it wasn’t powerful enough — you can do some simple things, but not nearly enough.

So I then decided to do it myself with the aid of PHP. At first I had a really hard time figuring out how to parse the data properly. PHP can parse XML, but you’re only given three events to react on: open-tags, character-data, and close-tags. You have to do the rest… But I managed to find a solution, so now I have a nice script called phpdoc2latex.php that does what it says it does: converts XML files produced with PHPDoc into LaTeX code. You can see the result in the CVS repository.

As you can see, I’ve added some extras to the doc-comments :-) The really nice graphs are made with an amazing program called Dot from the Graphviz package.