The beauty of snail-mail

The beauty of snail-mail
My GitHub Octocat sticker arrived yesterday. I had almost forgotten about it, so it was an even nicer surprise to find a letter from Redwood City, CA in my mailbox today. I asked for the sticker on March 4 this year, quite some time ago ;)
I have to say that it’s really nice to see that these guys didn’t back away from sending one tiny sticker cross-atlantic in a hand-labeled envelope. Cool thing!

Spring: A photographer’s best friend

Yep, it’s time for another photo-only post. Enjoy!

1. Etappe vom Eifelsteig
Goldener WestenMaiwanderung 20091. Etappe vom Eifelsteig1. Etappe vom Eifelsteig
1. Etappe vom Eifelsteig1. Etappe vom Eifelsteig

By the way, you should try the Eifelsteig.

genkernel 3.4.10-r2 with dmraid and hibernate-support

This comes from the I-have-to-pay-my-electrical-bill and from the learn-something-fun-about-your-system-everyday-department. As you know I’ve got Gentoo on my workstation. When I still lived in my dorm it was running 24/7 (last but not least to supply everyone with the latest episodes of popular shows). When I moved I started using a hacked-together suspend-to-ram script which worked well enough for the last year or so. Seeing how quick and (seemingly easy) hibernate/suspend-to-disk worked on my new netbook I decided to once again give it a try on my workstation.
Since my system has one of those stupid fake-raids I have always needed an initrd to boot the kernel. The initrd calls dmraid, which maps the strange arrays into usable disk-devices (don’t ask me). The preferred way of creating an initrd with Gentoo is genkernel, which can be used to build a kernel as well. The only problem was that genkernel still lacks support for suspend (user-space suspend, see Gentoo Bug), while I can’t do without dmraid.

So I fired up git and started hacking on the genkernel-code and now have a system which does suspend-to-disk and dmraid. Having said that, I must stress that you should really know what you’re doing if you’re trying to use this. You could potentially shoot yourself in the foot if for some reason a hibernated image gets loaded after your harddrives have already been mounted. I try to avoid that in my patch by calling suspend_resume immediately after dmraid has been called (and only there). Improvements or constructive flames would be highly appreciated.

imapfilter: RWTH Mailboxen sortieren

Wie jeder RWTH-Student hab ich natürlich auch ein RWTH-Postfach. Und dazu noch eins als Mitarbeiter des RZ. Ist eigentlich eine ganz nette Sache, nur dass man die Dinger nirgends vorsortieren kann (aka procmail oder so) sondern nur mit sowas wie dem Thunderbird-Filter auf Anwenderseite. Heisst dann im Endeffekt auf bestimmt 5 Systemen die Regel anlegen wenn man sich eine neue ML abonniert.
imapfilter macht auch nichts anderes, nur dass man es bequem von einer Stelle (sprich: Server) aus alle 5 Minuten laufen lassen kann, und nur eine config hat. Dann sind die Mails auch richtig sortiert falls man mal den Webmail-Client benutzen muss. Die Konfiguration ist auch ziemlich easy, so sieht sie z.B. eine einfache Config aus:
options.timeout = 60
options.subscribe = true
RWTH = IMAP {
server = 'mailbox.rwth-aachen.de',
username = 'ab123456+rwth-aachen.de',
password = 'geheim',
ssl = 'ssl3',
}
result = RWTH.INBOX:contain_subject('[mailingliste]')
RWTH.INBOX:move_messages(RWTH['mailingliste'], result)
Mit einer Regel die alle Mails aus der INBOX die im Betreff [mailingliste] haben in den Folder “mailingliste” auf dem gleichen Server verschiebt. Das Ganze geht natürlich auch mit mehreren Servern und sogar mit Mails kopieren/verschieben zwischen diesen Servern. Die verschiedenen Optionen um Mails zu matchen bzw. was man damit macht sieht man unter “man imapfilter”.

Sony Ericsson C510: Get a phone that works ;)

Sony Ericsson C510So, this is not another in-depth review of the latest piece of technology on my desk. Sufficient to say my cellphone-contract expired and I had the chance to exchange my old one. You may remember that it was an o2 XDA Neo, which I blogged about back then. While this cellphone sure had a lot of features and could have been called a “business phone”, it sucked on so many levels for me.
The lesson I learned is that it might sound tempting to have WLAN in your phone, coupled with a big screen and a stylo. Also the ability to put movies on an SD-card as well as music sounds cool, but honestly I didn’t watch a single one. And there there’s the problem of crappy software. The old phone ran Windows Mobile. It has some business-features like a good calendar and good email functionality, but a lot of the really basic stuff was missing. You weren’t able to use MP3s as ring-tones or alarm, it didn’t have a stopwatch or an egg-timer. So you had to download software for that (even for simply playing MP3s in an easy manner). And it couldn’t interface well with anything besides the Microsoft ActiveSync software. The weight of that phone made it all the more worse.
The point I’m trying to make is that you should really ask yourself what you need in a phone the next time you buy one. Think about how often you schlepp your laptop around and if you really need internet on your phone then. Think about your favorite digital camera or iPod and if your phone can or should really replace their functionality. And think about compatibility to your Mac/Linux system as well. I was able to send SMS using Bluetooth and the C510 from Linux in one day, something I didn’t really achieve in the 2 years before with the XDA. And not just using some fancy GUI (I’m using Wammu) but also directly from the command-line (using Gnokii and rfcomm), which for me is the most important part. Yeah!
By the way, the photos it takes are quite ok. I even started a flickr-group for the C510, without a lot success so far.

Photography quickie: Mirror, mirror…

Trying to take a shot of my new cell-phone (after all it’s raining today so there’s nothing to photograph on the other side of my window), I lacked sufficient natural lighting and the few lamps in my room don’t amount to much when it comes to object photography. A flash is the only logical choice in this situation. Since I still have no external flash which can be oriented and covered/diffused easily I’m still relying on the builtin-flash of the 400D. Flashing something (shiny) head-on gives really ugly shadows and reflections, as we all know. It also makes for skin that looks like it was soaked in a jar of butter. So, I had the really simple idea of reflecting the flash towards the ceiling, where it can bounce back and scatter. I used a small mirror at an angle of about 45 degrees. This only works indoors and with a bright ceiling which isn’t too far away from the flash (1-3m is OK I suppose). Now for the juicy images ;)
Flash direct vs indirectBest viewed large, this shows a) no flash at all b) direct flash c) indirect flash. Notice the shadows (or lack thereof) around the phone in the shots.

Flash direct vs indirectAnother good example, a) direct flash b) indirect flash. People which look greasy on photos (which is everyone) will be happy to see that it doesn’t have to be like that. I also like how the second image has more depth than the first, which looks “flat” from the lack of natural shadows (where the light-source usually is above the object).

Please take note that both of these shots were more than insufficiently lit without a flash, so the natural-looking light distribution can almost completely be attributed to the flash.

Almost Summer

Happy Easter
With already two full short-trouser-days this year, summer should be right around the corner. As I’ve got nothing else to write I’m gonna post a few photos again, from the walks we took over the last few weeks.

WanderungSamstagsspaziergangWanderung Plombieres/Gueule-TalWanderung Plombieres/Gueule-Tal
Wanderung Plombieres/Gueule-TalSamstagsspaziergang
Wanderung Plombieres/Gueule-TalWanderungWanderungWanderung

The semester starts next week, but I’m hoping to keep up the regular walks around Aachen.

Mini Review: Acer Aspire One 110L

Acer Aspire OneThis is a small review for a small laptop. You might remember that I bought a MacBook a few months back, and may ask yourself why anyone would need two laptops (or even one for some people). Well, I can’t answer that question for everyone, but think about it the next time you buy an expensive cell-phone just so you can go online, read emails and listen to music with it.
The price
If it weren’t for the low price-tag of about 200€ I wouldn’t have bought the Acer Aspire One in the first place. Of course there are different configurations and I bought the smallest one. This means the smallest processor, 3-cell-battery, 512mb RAM and an 8gb flashdrive as HDD. I didn’t try, but I don’t think you can install Windows XP on this one.
Hardware
Not only is the Aspire One affordable, it also weighs in at just 990g. Combined with the fact that is has no mechanical harddrive you can literally toss it around while using it, you can carry it on the hinge connecting display and body.
The screen is crisp and bright enough, although it is glossy. The 1024×600 resolution is no problem if you use the right window-manager and dial down the various GUIs at some spots.
The keyboard was another important factor for me, and I read that it’s better on the Aspire One than on other netbooks of the same size. True enough, I can type quite fluently (I’m writing this post on it right now). It even got the row of F-keys, which is cool for using ion. The mousepad is probably the smallest I’ve ever seen, yet it manages to be usable. You can scroll at the right edge of it.
The battery is the only thing I might consider upgrading in the future, as I can’t get 3 hours out of it right now. Fortunately the power-adapter is small and light.
Something you should buy alongside your Aspire One is an SD-card to extend your hard-drive capacity. I bought an 16gb card which contains my homedir, and the card doesn’t stick out of the body so it’s fine for permanent use.
Linux / Performance
I have to say I was positively surprised at what I’m able to do on this machine. I can listen to a shoutcast-stream, have an IM running, a few shell sessions and still use Firefox ok. The processor in most cases isn’t the limiting factor, but the slow speed of the internal HDD. This is another reason for putting your (big) files, like photos, onto the SD-card, which will be faster in most cases.
Debian GNU/LinuxI went with Debian GNU/Linux on the Aspire One, I couldn’t even imagine Gentoo on it. Debian just released Lenny and with the default install almost everything worked out of the box. I’ve got suspend-to-ram and hibernate working fine and fast. There are pages dedicated to the Aspire One from multiple distributions and it’s best to read all of them. One thing you’ll probably have to do is build a custom kernel, as the stock ones will eat the data on your left-side SD-slot when suspending (yep, it happened to me ;).
Links
The best resource I found was the ArchLinux-Wiki at: http://wiki.archlinux.org/index.php/Acer_Aspire_One. Pay special attention to the part about the Card-reader!
When installing Debian you should also check the Debian Wiki: http://wiki.debian.org/DebianAcerOne

heipei.net – Oh my god, that’s the funky shit!

Yeah, you read correctly. As of right now, this website can be reached via heipei.net again.
For those of you who haven’t been reading this weblog 2 years ago: The domain heipei.net was snatched from me in September ‘06. This of course happened to same part due to sloppiness when trying to move the domain (I can’t even recall the details). I have been monitoring the domain since then, and had discovered that the domain started expiring at the end of last year. After a 75-day redemption-period it was finally deleted, and I was able to register it (with no backorder or extra-charge).

Although most people know my weblog by now, I suspect a fair share of them has problems memorizing hackvalue.de/heipei/. And I think I’ll still be getting mail addressed to heipei(ät)heipei.net (at least spam :P). So, starting today, you can also reach me via
heipei.net
Please update any links on your websites/weblogs. The whole site can still be reached using the hackvalue.de/heipei/-prefix, but I’d prefer it if you referred to this domain directly.

Xcode: git describe in your Info.plist

Xcode git describeDebugging programs for yourself (or from bug-reports from other people) requires knowing which version caused the bug. Of course most people think in terms of major releases, but a developer needs to know the exact revision, as this might make the crucial difference. UNIX command-line programs usually offer a –version switch, which returns detailed version and build-option information.

If you want to have something similar with Xcode you can use the “New Run Script Build Phase” to add a simple script to your build-process. In the case of GitX, the code looks like this (the original can be found at xcode-git-build-scripts at GitHub):

#!/usr/bin/env ruby

version = `/usr/bin/env git describe`.chomp

info_file = File.join(ENV['BUILT_PRODUCTS_DIR'], ENV['INFOPLIST_PATH'])
info = File.open(info_file, "r").read

version_re = /([t ]+<key>CFBundleVersion</key>n[t ]+<string>).*?(</string>)/
info =~ version_re
bundle_version_string = $1 + version + $2

info.gsub!(version_re, bundle_version_string)
File.open(info_file, "w") { |file| file.write(info) }
puts "Set version string to '#{version}'"

Needless to say that this script is not very error-resistant, but since ruby is included with OSX and people compiling GitX usually have git installed, it should work in most cases.
Update
I just discovered that the CFBundVersion is supposed to be a monotically increasing integer, separated only by periods. This is required by MacOS and things like Sparkle. The string “git describe” returns doesn’t match these criteria, obviously. So, if you encounter problems, you should fall back to using the format of x.y.z.<commits> where x.y.z is your major release number and <commits> is the number of commits since mentioned tag.