Programming books

I meet a lot of people who claim that they want to learn how to program. That’s really great, but why they tell me this instead of just getting on with it, is beyond me. The follow-up is usually a question about which programming books I recommend. Since I get asked this with annoying regularity, I will post my recommendations here for everybody to read.

The one most important programming book you can ever read is K&R’s classic “The C Programming Language”. I could end it all here, but with only one book it wouldn’t be much of a list, would it? So I’m going to add one other book, and that is Jonathan Bartlett’s not-quite-as-good-but-still-excellent “Programming from the Ground Up”.

Any of those two books should give you a solid foundation in programming. After that, you don’t need books. You need to download and mess around with code.

Published in: on 2006.11.10 at 13:15  Leave a Comment  

Feisty breakage: let the fun begin

The Feisty repositories have been open for some time now, but initially there was very little coming in. Now its slowly beginning to pick up, and today looks like a good day. How about this:

1. Gnome panel has its usual development cycle issues. It’s not refusing to start, and it doesn’t throw off all those annoying “Panel already running” crap, but loads of applets die after a while.

2. Fonts are so ugly at the moment that reading any text gives me major headaches.

3. Of all the Mono-based applications I’ve tried so far, only two seem to be working: MemoryEaterPerfected (aka Beagle) and Tomboy. Everything else refuses.

4. DRI is not working, which means no UFO:AI until kernel, Xorg and Fglrx are in sync again 😦

Well, that’s it for now, but more should start breaking soon. The big breakage fest will start after UDS. I hope they do their worst this time. Edgy development was outright boring..

Published in: on 2006.11.09 at 11:14  Leave a Comment  

Leaftag is cool

I recently compiled leaftag and have been toying around with it. It’s actually really cool, despite all the disgusting marketing terms you can attach to it (Semantic Desktop, Desktop 2.0, Social Desktop, Moronic Desktop, etc). Leaftag allows you to attach tags to files on your file system. These tags could be things like “Important”, “Todo”, “Nude babe”, “Divorce letter” or whatever you like.

There are loads of ideas about integrating leaftag desktop applications like Nautilus, which is probably a good idea. But I’m personally happy with the “tagutils” command which does pretty much what I need it to.  You can tag files with tagutils tag, find files that have a tag attached to them with tagutils ls and so on.

In a way leaftag works like locate. Both build up indexed databases of files in order to speed up searching. The difference is that locate searches by file name, tagutils by tag. If you tag your files well, finding them based on “concepts” should be simple.

Leaftag uses an sqlite database for its index. I’m not sure how well that scales, but I guess time will tell. I’ve heard some rumors about leaftag possibly using tracker as a back-end. It cannot yet cope with moving files, but you could always overcome that by creating a zsh function that calls mv as well as updates the index for the file. Oh, by the way, when I say file, think URI.

All in all, leaftag is cool. I like it because I can see this being useful, as opposed to so many of the other “technologies” that the marketing droids are vomiting at us these days. It would be cool if one day Gnome decides to integrate it, but I think that is highly unlikely. The Holy Prophets of the Temple of Gnome in Their Infinite Wisdom will probably come to the conclusion that Gnome users are too stupid to tag files. *sigh*

Published in: on 2006.11.08 at 11:12  Leave a Comment  

Shitting in my home directory

One thing I really don’t like about Gnome and KDE (but trust me, Gnome is more offensive than KDE) is that they like dropping turds into my home directory. I have set up my directory structure to my liking. All, and I mean all directories are lowercase only (this obviously includes getting mutt to stop assuming I want a Mail directory).

So why the hell do both desktop environments insist on farting out a ~/Desktop right into my center of harmony? Freedesktop spec, you say? To hell with them and their ideas. This should be configurable. I, for instance, would have liked to call the directory ~/.desktop, since I have absolutely no use for it anyways. I *never* do a cd Desktop, so why should it be there polluting my home directory?

With KDE, the story pretty much ends there. Enter the tyrant of all desktop environments, Gnome. Gnome’s ability to do evil and mess up people’s hard work is unrivalled. All of a sudden I have a Templates directory. What for? For templates, obviously. Well, I’ve got news for you: vim already does templates for me. I don’t need it from Gnome as well. And plus, if you insist, please hide it away as ~/templates?

It doesn’t end there. Various media players assume that my music is stored in a directory called Music, MyMusic or some other stupid name that clashes with my own naming scheme. No, I want to call my directory ~/music, period. Muine, which is the superior Gnome media player, at least doesn’t have a problem with this.

Now to the dumbest of all applications: f-spot. Don’t get me wrong, I like f-spot in a way. For most parts, it’s a neat application (although digikam is better). But any time I want to import pictures it wants to copy my pictures into a directory called ~/Photos, never minding the fact that I already have my images sorted out in a directory called, believe it or not, ~/pictures. Now there is a checkbox you can untick so that f-spot doesn’t create a Photos directory and copy your images there (wasting valuable disk space), but guess what? Just to spite you, the developers force you to go and untick that box every time you import. Thanks for nothing, assholes.

And why the hell do you insist on calling the damn directory Photos? Maybe you only use f-spot for photos, but I don’t. For instance, I’ve got a bunch of images related to Tolkien’s Middle Earth. I’ve tagged all these images by character, location, artist etc. It works really well for me. But these are *not* photographs, so why insist on this stupid name?

*sigh* (I needed to get this off my chest)

Note that fluxbox doesn’t behave this way. Of the applications I normally use, only mutt is a bit braindead with its naming. But in mutt this is easily fixed, in Gnome not (remember, in Gnome-land the luser is a complete idiot who doesn’t deserve deciding how their own home directory should be structured).

Oh, and if you think I should submit a patch, forget it. Remember, we are talking about Gnome here. You can only contribute if you belong to the Holy Temple of Gnome. Normal users are simply too stupid to help out. Normal users should just sit back and happily accept it when the Profets of Gnome shove feces, in bit-sized pieces, into their carefully crafted home directories.

Published in: on 2006.11.02 at 07:57  Leave a Comment  

Another Beryl user

Since more and more people here at AITI are using compiz/beryl these days, I finally gave in and decided to try it as well. Because of the particular ATI card I have, open source drivers are out, and I have to use fglrx. For the time being that means Xgl (as opposed to aiglx).

It took a while to get everything up and running, but now here I am with a working Beryl. And it *is* cool. Unecessary, but so very, very cool.

Published in: on 2006.10.31 at 15:57  Leave a Comment  

Playing with Gnome yet again

I love fluxbox. I think it’s a great window manager, that does just the right thing. My preferred terminal application is rxvt (actually, urxvt these days). I probably spend 99% of my time using a terminal, running GNU screen. The applications I use the most are vim and irssi.

Every once in a while I try out Gnome and KDE. After a short period of RAM munching I usually end up running back to fluxbox.  This time I’m trying out Gnome again, on an Ubuntu box.

For one, I can say that it feels a bit faster than it used to. I’m even running beagle, and I’m still able to use the system. That is a first, for me at least. But Gnome is still a far cry from fluxbox. The most annoying thing of all is that it keeps throwing out stupid little messages at me. Yesterday, for instance, an annoying thing jumped at me to inform me that “my battery is fully charged”. WHAT KIND OF UTTER STUPIDITY IS THAT? Do I care? Shouldn’t it be the laptop’s job to control my battery level? Why the hell to I have to get this? I know I can disable this somehow, but IIRC, Gnome claims to be about sane defaults..

Evolution has a way of just pissing on me as well. Constant pop-up messages. Funny, mutt never behaves like that. I guess that’s why mutt is usable, Evolution is not. And most importantly: why, why, why does my mail client handle my todo list? If somebody could do the whole world a huge favor and split this beast into seperate applications, this globe would be better place.

There are some really good Gnome apps though, the best ones being Tomboy and Muine. F-spot is slowly getting there. It’s neat, but there are some things I’d like to be able to do with it. The Ubuntu crowd screwed Nautilus and use the horrible browser mode lunacy by default. A few mouse clicks and you are back to the normal, useable spatial Nautilus, which is quite nice acutally.

The main difference between using fluxbox and Gnome is that in fluxbox you are busy using rxvt and vim, working away, whereas in Gnome you are using gnome-terminal and Gvim, constantly being interrupted by some stupid message dialog jumping right into your face and ruining your workflow. Nice touch.

Published in: on 2006.10.31 at 09:00  Leave a Comment  

Another weekend of Wesnoth

This weekend the kids went to visit their Aunt, so Ama and I had some peace for a change. There were so many things I had wanted to take the opportunity to do while they were away, but instead I played some more Wesnoth.

What I did this time around was try to use as few units as possible on each level. That way the units a I did have were given enough combat opportunities. I even got Konrad involved in battles already on the first mission, something I’ve never done before.

Another thing is that I didn’t use the Merman’s simply as cannon fodder for a change. I worked out a strategy at the Bay of Pearls which worked very well, and I only lost a single Merman. The mermans later became very useful at Muff Malal’s Peninsula. Since I only used very few units on land, I used the merman to keep the zombies occupied while I planned my attack from land. It worked perfectly.

But now I’m stuck at Isle of the Damned. I’m so close to defeating the last lich (the Northern one), but I run out of time. And those wraiths are just so damned annoying. I wonder if it’s possible to beat all three liches with two of each (warriors, archers, horsemen, magi, scouts, shamans) plus Konrad and Ye Olde Greybeard. All the characters are level 3, but still..

I had a really great weekend. I think the main reason is that I stopped thinking about all the things Wesnoth would do differently and just played it for what it is. Of course, I’m not sure the master plan was to send the kids away for the weekend just so that I could play computer games. Oops..

Published in: on 2006.10.30 at 14:06  Leave a Comment  

Double shot of Wesnoth

Since we had a “long” weekend, I had some free time for a change. It’s been ages since I last played Battle for Wesnoth, so I decided to give it a go. I was a bit curious to see what had changed since 1.0 (yes, it’s actually been that long).

Battle for Wesnoth is almost there. It’s very playable and you can have hours of fun with it. There are still some minor points that annoy me. Most of it is probably just me nitpicking.

Most of my issues have to do with the battle system. I know the Wesnoth developers want to keep it simple. But I still feel that fighters equipped with projectile weapons (and that includes spellcasters as well) should have some advantage of distance. That is, after all, the biggest advantage of an archer, that they can shoot from a distance. In close combat, they don’t carry the same heavy armor, so they are at a disadvantage.

I also feel that increases in level should be more significant. I spent a lot of time over the weekend trying to upgrade as many characters as possible in early levels. By the time I got to the Siege of Elsenfar, I had several level 2 characters, and two level 3 ones. But it didn’t seem to make much of a difference.

As a matter of fact, in the Bay of Pearls I tried something. I created 12 horsemen, new characters without any experience. They were followed by 10 archers, also new. It was far easier to win with them than it was with my normal, experienced characters. They completely stampeded everthing in their way, and although a lost quite a few of them, I never felt in any danger. Come to think of it, maybe that is the intended strategy.

Finally, I’m not sure that I like that fact that you have a limited amount of turns. On some levels, where haste is crucial, it may make sense, but even then there are better ways. I hate losing just because “I ran out of turns”. Instead, give me a penalty, or make the enemy grow in strength if I go beyond the limit, or something. Don’t just end it.

One thing that makes Wesnoth a fun play is the fact that you don’t have to concentrate too hard to play it. I’m guessing that if the battle system were modified, and upgrading characters played a larger role, the game would become significantly more complex. Not to mention that it would become a very different game, focusing more on role-playing aspects as well as on how you position your warriors for battle.

So far, I’ve mostly been playing “Heir to the Throne”, which is the campaign I like the best. It just feels like the story behind it has really been worked on. I wish there were more campaigns like that.  I tried “The two Brothers”, or whatever it’s called, but it didn’t feel “right”.

So, all in all, Wesnoth is still a cool game. If you haven’t tried it, I suggest you do. While you’re at it, try UFO:AI as well, a game that is slowly starting to feel So Right.

Published in: on 2006.10.24 at 07:48  Leave a Comment  

My contribution to the world of innovations

Last night I got a great idea for a new gadget for cars. I think it may be useful so please don’t touch that URL widget..

This is how it works: when somebody gets into the driver’s seat of the car the first thing that happens is that a breathalizer shoots out of the panel. In order to be able to start the car the driver must breathe into it. If there is any alcohol detected, the breathalizer quickly gives way for a large, pneumatically power boxing glove which continuously knocks the “driver” in the face. For added effect, a sampled sound saying “you stupid, stupid idiot!” could be added.

Don’t get me wrong: I enjoy the occasional drink-up just as much as the next guy. It’s a great way to spend an evening (once in a while), and it has the additional benefit that you might say something foolish enough to impress somebody enough that you end up having purely recreational sex. Never mind that your partner d’amour for the evening is just a dumb-ass drunk as you are.

But one thing I don’t like is people who drink and drive.

Published in: on 2006.10.19 at 09:28  Comments (4)  

More stuff on

Now things are moving really fast. Two LUGS are now up on Linux Accra and Linux Cape. More will be coming soon, so keep checking back.

Published in: on 2006.10.17 at 16:34  Leave a Comment