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.

Listening to Ogg Vorbis…

I just stumbled upon something called Ogg Vorbis the other day. Ogg Vorbis is a new audio encoding format similar to mp3. The advantage of Ogg Vorbis is that it’s opensource, without the patent-problems that plague mp3 and free. It’s also slightly better that mp3, which means that the files are smaller.

So I’ve started to re-rip all my Cd’s and encode them in Ogg Vorbis. I use Grip to automate the task of ripping and encoding the Cd’s. Grip first asks freedb for information about the disc, it then uses cdparanoia to do the ripping and then starts oggenc to do the encoding. A pretty cool program.

I’m still waiting for my 10 Cd’s to arrive, but with a little luck I’ll get them tonight. Then I can start the ripping :-)

I hate mosquitoes!

Last night a mosquito kept me awake for three hours, until I finally managed to smack it at 3:18 in the morning! The summer is finally here in Denmark, so it’s getting hot. So, before I went to bed, I opened my windows to let some cold air in. The cold air went in, together with the mosquito…

Let’s have some music!

Today I ordered a pile of new CDs — 10 CDs in total! It all started when I discovered that Karl Jenkins had made more than one album with Adiemus. In fact he’s made four of them — I had only listened to the first one Adiemus — Songs Of Sanctuary. So I when downtown to look for the remaining three albums. But I could only find one of them, so I went searching on the web. I found two Danish stores that had the albums: www.gufmusik.dk and www.cdskiven.dk. The first shop was the cheapest, but they also had fewer titles than the second shop. At first I thought that would be a problem, but they told me that they had all the titles that I wanted in stock, even thought they hadn’t updated their webpages.

Now that I was searching for good music I also remembered that I’d heard some Era. Their music sound a bit like Enya / Enigma / Adiemus which means that it’s good :-) So I also bought their first album.

I searched further, and found some CDs by Jean-Michel Jarre. My dad has his album In Concert Houston & Lyon which I’ve heard a lot. It’s a live recording where he plays some of his best songs. But now I’ll get a chance to hear all the songs of his CDs, since I’ve bought six of them :-)

So now I’m looking forward to receiving the Cd’s. According to www.gufmusik.dk they will be shipped next Monday.