I2CAP goes to the Western Region

I’m on my way to Western Region for about a week. I will be taking part in the I2CAP program. We will be giving teachers in the region an introduction to programming using Ruby.

I expect it’s going to be fun. This is only the second region that we teach Ruby in. But for me personally it will be my first I2CAP experience.

One thing it does mean is that I probably won’t be spending too much time on-line for about a week. So I’ll just blog about the trip when I get back instead.

Advertisements
Published in: on 2006.09.29 at 19:27  Leave a Comment  

The path to Nirvana: latex-beamer

Anytime I have to prepare slides for a presentation I use the superior solution: Latex Beamer. This class has a way of always impressing me with its capabilities.

Usually I’m fine with the default theme, but this time I wanted to add a sidebar to my slides. I thought it would look cool. I used a theme called “Hannover”, which I found very nice and clean. My \author command usually holds my name and email. This looks fine on the cover slide, but since the Hannover theme puts the author name in the sidebar as well, my email address streched outside the sidebar. It didn’t look good at all.

But, hey this is Latex. And this is the beamer class. The solution is to use this command: \author[short name]{long name}. I use my full name as my “short name” and my name and email as my “long name”. Problem solved.

Published in: on 2006.09.20 at 09:53  Leave a Comment  

A birthday in the family

Just a quick note to say that today is my daughter’s birthday. Vanessa Amaia Danielsson is two years old today! I had planned to wake her up this morning to sing “Happy Birthday”, but of course she woke up before everybody. She was up by 3:00 this morning, and dragged everybody out of bed.

Published in: on 2006.09.18 at 08:09  Comments (1)  

SFD 2006 Accra

The past Saturday, September 16, was Software Freedom Day 2006, an international event celebrating free software. Linux Accra hosted the event in Accra together with AITI.

The event came off to a slightly late start, which didn’t really surprise anybody. It was raining in the morning and that kept people from coming. While we were waiting for people to drop in, we screened Elephants Dream, the worlds first open movie.

After the movie, we had a few presentations. Jhonnel spoke about Software Freedom Day in General, Sabra gave an introduction to what free software is and I spoke shortly on AITI’s commitment to open source. This was followed by a short Q&A session, after which everybody moved out of the auditorium to look at the various demonstrations we had. During the Q&A I took the opportunity to clarify that Linux is not the same thing as open source. Before that, it was more Software Linux Day than anything else.

We had prepared for an install fest, but nobody brought their PCs. So instead Odzangba did a step-by-step walkthrough of installing Linux. That seemed to be what attracted many people’s attention. Apart from that, we were demonstrating Kewl.Nextgen, an open source CMS, OpenOffice.org and a few other things.

The event went fairly well. Attendance was a bit on the low side, but that’s unfortunately what happens when it rains in the morning. People decide to stay at home. I want to make sure that next year’s SFD attracts much more attention. I also want to make sure that we demonstrate more interesting solutions. I just don’t feel like demonstrating OpenOffice gives the public a good idea of what is possible with free software..

Published in: on 2006.09.18 at 08:05  Leave a Comment  

Back to Latex

I always used to love Latex. There was a time that everything I wrote was done in Latex.

For some odd reason that I still can’t comprehend, I began using Docbook more and more a few years ago. I guess I was swept away by the “XML is great so we must use it for everything” wave. Maybe I was also influenced by the fact that many documentation projects use Docbook. And if everybody else is using it, then it must be good, right? Wrong.

I am working on writing some training manuals on Ruby, and I started off in Docbook. But Docbook always gets in your face. There are more tags than text in the document. Obviously you spend most of your time typing tags. That is, when you are not busy looking through the list of available tags, trying to find a suitable one.

But that’s only the beginning. Next you will have to fight with xsltproc (usually not a big problem) and fop (usually a very big problem). The output quality leaves a lot to be desired. I’ve tried several times to get syntax highlighted code inserted into my documents, but each time it has failed miserably.

Before anybody complains: I know that Docbook is superior and that Latex is old, outdated and useless. But I really don’t care. I can get actual work done in Latex, it doesn’t constantly annoy me and it actually makes working on documents fun. Getting PDFs is a breeze and the output quality is high. Syntax highlighted code is not a problem at all, with the great listings package.

To conclude: I’m back to using Latex, and I am absolutely loving it. If you are also frustrated with Docbook and its toolchain, maybe you should look into Latex. The mindless drones will of course do everything they can to keep you using Docbook, but don’t mind them.

Published in: on 2006.09.13 at 19:38  Comments (1)  

The aliens are attacking!

In my previous post, I mentioned that I had been programming Ruby all weekend. That was almost true. I did actually have a little bit of time left over, so I decided to compile UFO: Alien Invasion. It took quite a while to compile (which is probably why I actually managed to be productive).

Finally it was done. I started it up, but didn’t hear any music, although I had downloaded the music files and copied them into the base/music directory. I noticed some messages that indicated that it couldn’t find a file called ‘theme.ogg’, which wasn’t surprising since the file I had was called ‘UFO AI Music – Theme.ogg’ (or something like that). So I started searching through the sources in search of the expected file names. Eventually I had renamed all the files.

I tried again, and this time I could hear music. Now I could finally focus on the game itself.

UFO:AI is a game inspired by the classical X-COM: UFO Defense a game I was addicted many years ago. So I was really happy when I stumbled over UFO:AI a while ago. But then I didn’t have a machine capable of running it. Now I do.

UFO:AI looks really nice. It uses a modified version of the Quake 2 engine. I didn’t play the game enough to really get a feel for how playable it is, but at least I went through the first two missions, and it at least seems nice. There were a few aspects of the game that didn’t quite feel right, at least not yet, but they were mostly minor details. I think that this could become a game a spend a lot of time playing.

I hope I’ll get time to really dig into the game next weekend. Then I should have a better idea of how playable the game actually is.

Published in: on 2006.09.11 at 16:02  Leave a Comment  

Ruby weekend

I had a really great weekend. We had lights, and because of the rains I couldn’t really go anywhere. So I stayed at home and programmed.

I’ve been working on a forum server lately. My idea is to create a forum application that does not run in the browser. Well, point of correction: you can (or will be able to) a front-end that runs in a browser. But, as my friends know, I really don’t like applications that run in a document reader. So I intend to write a client in Qt4.

So far the server allows you to manage members and forums. It also does session management. You can’t create threads or write posts quite yet, but I’m getting there. I’m currently using XML-RPC for client/server communication and PostgreSQL as the database backend. Once the server is working I can think about abstracting the database layer.

One other thing I’ve been working on for quite some time now is a project I’ve simply called “Source Lab”. As most programmers, I’ve written a large number of small programs, or maybe I should call them code snippets, usually to test new features. Since I always used to keep these snippets in obscure directories under ~/tmp, they tend to get lost everytime I do a major clean-up.

I wanted to make sure all my small programs and snippets don’t get lost, so I created Source Lab. My first and currently only Source Lab is the Ruby Source Lab. It’s started off a just a collection of Ruby scripts organized in directories. Then I got the idea to have a system for navigation through the mess. So I started creating HTML documents.

But, being lazy, all the typing quickly got on my nerves. So I wrote some more Ruby, this time to help me manage my documents. I wanted to insert my Ruby scripts in the HTML pages I created, and of course I wanted them to be syntax highlighted and line-numbered. I also wanted to be able to capture the output of running the programs, and stick that in the pages as well. In many cases the programs are interactive, that is, the program will prompt the user to enter some information.

Thanks to Ruby, and various other tools, such as GNU source-highlight, this turned out to be a breeze. For interactive scripts I just use Ruby’s PTY module, and I managed to create a generic script that seems to work well so far. Now all I have to do is create a small HTML skeleton, with macros at the places where I want to insert a Ruby script or command output, and the make utility will generate all the pages for me.

One other thing I managed to do this weekend was to compile the Qt4 bindings for Ruby. Haven’t had a chance to play around with them much yet, but at least the samples ran well. Hopefully, I’ll get some time during the week to start tinkering with Qt4 in Ruby!

Published in: on 2006.09.11 at 08:02  Leave a Comment  

Autopackage

Warzone 2100 looks like a really interesting game, and I wanted to try it out. On their web site I noticed that they provide an Autopackage. I’ve never tried those things out before, but now I was in a hurry to test the game, so I thought to myself “What the heck, this things are supposed to just work”.

You can see the result by clicking the thumbnail:


Can somebody please remind me, what was so wrong about apt-get now again?

UPDATE: Since autopackage (the really-very-super-mega-simple-package-manager) failed, I grabbed the source archive and compiled the game myself instead. As expected, that worked without a glitch..

Published in: on 2006.09.01 at 08:23  Leave a Comment