When you have an SMP machine (including dual core CPUs - but I'm sure everyone knows that by now), you quickly learn to use the -jN flag to GNU make(1). N is the number of CPUs you have and it lets make(1) run that many jobs in parallel whenever possible, thus using all your CPUs and giving you a nice speed benefit.
However when creating a Debian package you can't always specify this when you use a tool like dpkg-buildpackage(1), debuild(1) or svn-buildpackage(1). A simple trick is to just invoke these tools with the environment variable MAKE set to make -jN. Now whenever make(1) will invoke a sub-make, it will use the -jN parameter for it and since debian/rules is the first make invocation, all your actual compilation will always happen with multiple jobs in parallel.
This is not perfect however, all sub-makes will be called with -j too now, so you'll get more jobs then CPUs. I tried using MAKEFLAGS but that didn't quite work out, if someone knows of a better solution let me know. But this one works anyway.
Finally, since a short while, all my hard disks are setup to use encrypted disks using LUKS. Works like a charm and you don't really notice it slow down. Unfortunately I am now left wondering what the point is, given that I currently live in the UK. Not that there is anything exciting on my hard disks, but I'm one of these people who care about principles regarding freedom.
One possible thing to do is create a key on a USB stick instead of using a password. It would mean I can destroy it when they ask for it as it seems they have to ask you by letter first. Although I can't imagine a situation where I'd rather lose all my data myself too then have the police poke their nose in it.
At some level I can't help but compare them (the UK government) with the music and video industry: create new (broken) laws as they are unwilling to adapt to innovations.
A while ago I bragged about my own music player. Basically I couldn't find the player I liked so started creating my own. It was the first time I wrote anything related to media or a GUI -good thing my basic requirement was simplicity- and was interesting to do, but I never found the code amazing.
A little later, after using my own app with pride and also implementing a few features incredibly inefficient, I discovered Decibel Audio Player. The code is way more advanced then mine and it's a lot better. It has most of the things I did want in my player eventually already and yet is still very simple. Definitely recommended, I'm not going to bother anymore improving my own creation.
PS: did I mention that, just like mine was, Decibel is also written in Python?
Subscribe to: Posts (Atom)