I’ve written about profiling before in the general case. But when it comes to multithreading, there are a few more factors to consider such as lock contention and cache invalidation that affect performance. And this is where mutrace (mutex profiler) comes into the picture. The profiler has a very low overhead compared (no perceived delay for me) to other solutions and gives quite nice results. I tested it on My Media System (C++) and Nemo (C#) and got interesting results for both. I knew more or less what the results for mms would be, but the results for Nemo was a bit suprising. The lock contention was significantly higher than for mms, even though I didn’t really use a multithreaded design for Nemo. So I guess it comes from the mono platform itself. Sadly it seems that mono programs aren’t compiled with -rdynamic, so the results that one gets are quite hard to decipher.
Author: Anders Rune Jensen
Andnav2, open maps for the android
As I was researching the android platform before buying a HTC Hero, one of the things that really got me excited was the mappping/gps application andnav2. It’s a frontend for openstreetmap, that uses the open routing service to provide turn-by-turn, all for free. The only thing is that it requires is a internet connection for routing, but it’s not really a problem as a route is only a few kilobytes. Maps can be preloaded onto the device also, for situations where one doesn’t have an internet connection available (like when traveling). I used the nice TrekBuddy atlas creater application to fill the device with maps of all of Denmark, London, Berlin and Europe at a decent level.
I was really impressed by the openstreetmap when I was in Corsica earlier this month. I had preloaded maps onto the device before going and it really served us well as the rented car didn’t have a GPS, and my other GPS of course didn’t have maps for Corsica. This was using the excellent maemo mapper and the Nokia N810, but it should be the same with the android.
The user interface of andnav2 could use a lot of cleaning. It’s not very user-friendly, but it will hopefully improve. As the coverage of openstreetmap improves, it will be harder and harder for companies like Tom Tom to ask 750kr for their mapping application like on the iPhone.
Also as the search interface in android marked sucks hard (of the irony Google), one needs to enter andnav2 and not andnav, as that will only show the older version.
Happy mapping!
Edit: The author released a new version, that only works on android > 1.6 (because of TTS), and appears to not really care about older versions of Android. I have approached him multiple times asking for him to fix it, sadly he’s been playing the silent ninja. Just making the old binary available would be fine, but sadly no. Since the source is not available there isn’t much we can do except wait for HTC to release the 2.0.
Edit2: Working version available here: http://people.iola.dk/arj/2009/11/25/andnav2-working-on-hero-again/
I recently aquired a HTC Hero phone. More on that later. First I just wanted to help out other poor souls out there, who are forced to use Windows to upgrade the software on the phone. There is a bug in the installer for the HTC Sync program which leads to the drivers not being installed, in turn resulting in the inability for the computer to find the android device. Very frustrating to the say the least. The installer writes the driver to the localized program files directory (on a Danish version of Windows this is C:\Programmer), but looks for it at the hard-coded path C:\Program Files, resulting in the drivers not being installed. Fixing the problem is pretty easy:
- Copy the HTC directory from C:\Programmer to C:\Program Files (you might need to create this first)
- uninstall the HTC Sync application and the HTC drivers
- Reinstall the HTC Sync application
After that you should be able to upgrade the phone to the much improved new firmware.
Happy phoning 🙂
I was flaming Ubuntu in an earlier post for their lack of quality in their releases, so I thought it would be fair to give them credit when it is due. They have a project called One Hundred Paper Cuts where they try to fix low hanging fruit, easy bugs but annoying bugs. Bugs that when stacked together really can make you go from loving a piece of software to hating it. When I look through the blog post for their round 6, I really like what they are fixing.
We need more of this in software. It’s so easy, and has become so accepted, to ship a half-baked product and just slap a beta sign on it nowadays. Release early, release often is great, but there is also a time for making fixing all the small annoying bugs. If they plan on fixing this bug, then this is a step in the right direction.
Gmail please fix your spam filter
Lately Gmail has been become increasingly frustrating to use. When I check mail in the morning I have about 5 spam mails in my inbox. Even some from Viagra. Even worse, the number of false positives (ham classified as spam) has also been increasing so that I now at least once a day have to resort to looking for legitimate mail in my spam folder. For a spam filter this is the worst case scenario. Actually it seems like Gmail has trouble categorizing spam as seen below. I hope it’s only a UI bug, but something deeper down is definately rotten.
The OpenBSD Releases Process
Theo de Raadt talks about the OpenBSD Releases Process. It’s short but sweet little interesting talk that touches a lot of different aspects about releasing software and doing development. I hightly recommended to anyone who cares about this field, that ought to mean any people doing software. They have a different way about thinking about a lot of things, of course their focus on security is special which also shows off in their release management. What I really liked was that they import stuff into their tree and then they take ownership of it. That way, I think, they avoid a lot of the problem that plague e.g. Ubuntu, like crappy intel drivers in latest Jaunty, the thrashing hell failure, unstable tracker in Jaunty. Of course all that comes at a certain cost, they are running ancient version of some pieces of the tree, but at least they know that it works.
Running Chrome in Ubuntu
Getting Chrome running in Ubuntu is now pretty easy, simple add the following line to /etc/apt/sources.list:
deb http://dl.google.com/linux/deb/ stable main
Then you can install Chrome using the package manager and it will keep itself updated. Sadly the browser is quite alpha (no flash, random errors, no tabs saving on exit) but they update it every week and it runs insanely fast compared to firefox.
I recently upgraded the harddrive in my trusty old IBM T60. I mirrored the hd using a little dd magic and everything worked fine, including the IBM rescue partition. The only thing that wasn’t working anymore was hibernation in Ubuntu. This was because it relied on wierd UUIDs instead of actual device names. Fixing it was pretty easy, once you know what the problem is. First step is to fix up /etc/fstab so that the swap partition has the right UUID. You can get the UUID of a device using something like:
sudo vol_id -u /dev/sda4
Next step is to fix up the location of the resume partition. Open /etc/initramfs-tools/conf.d/resume and change the UUID to the same as you just put into fstab. Then run:
sudo update-initramfs -u
And you should be running again 🙂
Random Ubuntu notes
There’s an annoying problem in Ubuntu 9.04 that if you have set your machine to automatically login, but have a password on gnome keyring manager, then it will prompt you for the password before wireless is enabled. There is a bug about it here on launchpad. And as usual the Ubuntu guys doesn’t seem to want to take responsibility for the software they are providing. Reminds me of this thrashing bug reported over 3 years ago and it’s still open. It’s actiually the first result on google (out of 544.000) if you search for thrashing hell 🙂
Another thing I noticed was that I was looking through the system messages and found the following wierd message.
Jul 17 16:46:35 arj-laptop pulseaudio[3290]: main.c: Called SUID root and real-time and/or high-priority scheduling was requested in the configuration. However, we lack the necessary privileges:
Jul 17 16:46:35 arj-laptop pulseaudio[3290]: main.c: We are not in group ‘pulse-rt’, PolicyKit refuse to grant us the requested privileges and we have no increase RLIMIT_NICE/RLIMIT_RTPRIO resource limits.
Jul 17 16:46:35 arj-laptop pulseaudio[3290]: main.c: For enabling real-time/high-priority scheduling please acquire the appropriate PolicyKit privileges, or become a member of ‘pulse-rt’, or increase the RLIMIT_NICE/RLIMIT_RTPRIO resource limits for this user.
Which was easy enough for me to fix (sudo addgroup arj pulse-rt), though it still would have been nice if this was done properly. This might help some people who has been getting skipping music.
What a title for a book. The book was recommended by Joel Spolsky, he calls the book mandatory for what managers in his Fog Creek Software should read. That was what peaked my curiosity at first, then I read that the book is from 1936 and I was really intrigued. So I thought I’d order the book and see what all the fuss was about. And glad I did! The book is full of interesting anecdotes and advice that still rings as true today as the day they were written. It’s funny to read examples from the 1899, but that really doesn’t make them less true, on the contrary, it just shows that he was onto something fundamental in the human nature. The book touches many aspects of life, from business, to family to friends. On wikipedia all the advices are summed up, but I really recommned that you read it for yourself. It’s worth it.