Book Review: The Heart Mender

Some time ago I found out about Book Sneeze, a service by Thomas Nelson offering free books in exchange for reviewing them on your blog (the reviews aren’t required to be positive).

I decided to give it a try, and a couple days after signing up my account got approved. The website shows a changing selection of a bit more than a handful books available at any time. When I visited the page, most stuff available seemed to be about religion or self-help, which I’m not really interested in, and I decided for the book which looked the most like a novel. It happened to be Andy Andrews’ «The Heart Mender» (formerly published as Island of Saints).

After the usual delay (snail post is painfully slow here) I received the expected package, and they were even so nice as to include a second copy to give away. I’ll see what I do with it :). Anyway, here goes the review!

When I started reading the book, it surprised me twofold: first of all, it didn’t begin with the actual story I had expected, but with a narration of how the author got to write the book, after finding a box containing WWII artefacts and a photo buried in his backyard. Even more surprising, though, I got captivated by it after reading just the first few pages, something many few books achieve so fast.

After a few chapters exploring the origin of the artefacts, the author begins with the actual story of how Josef Landerman, Lieutenant of a German U-Boat sent to the Gulf of Mexico, ends up at the mercy of Helen Mason. Helen, a widow who hasn’t been able to overcome her ill fortune, is thus confronted with the choice of saving the life of someone wearing the same uniform that killed her husband years ago. Even if Helen decides to help him, what will await him so far from home?

While it’s sold as a romance focusing on the topic of forgiveness, the book doesn’t miss its fair share of adventure and it is a pleasurable read. I can only recommend it.

Experiments with image recognition

It’s summer, which means: I’ve got time for some crazy experiments! As you may know, two years ago I played around with voice recognition. My original idea for this summer was to do some robotics stuff, but unfortunately I’ve had problems getting the serial connection to work. But don’t worry, because I’ve found something else to do. I noticed a nice red box lying around in my room, so I thought: «let’s see how difficult it is to get my computer to see it».

For extra fun, I also decided to impose two rules: no reading up on existing algorithms or «weird maths» (I’ll have enough time for this when I study Computer Vision at university), and no «magic» (ie., implementing everything myself and not using existing functions for edge detection or whatever).

First steps

Of course, my first choice for trying this was Python, so I installed PIL and SciPy, and took a photo of the box. With just a function call, they give me access to each pixel’s RGB value, so it’s really easy to have it change all points that aren’t red into black and other funny stuff.

However, iterating through all the pixels in the image was quite slow (in the order of several seconds) so I decided to switch to C and OpenCV, which turned out to be really nice to work with. After a while I had written down the first algorithm I could think of, and it kinda worked (see video at right). I want to thank Michal for the idea of converting the image to the HSV colour space for colour checking.

Noise reduction

After I had a first success, I worked on some new multi-pass code with lots of loops to see if I can get some noise reduction. I started by turning everything which isn’t detected as red into black so that I get a better overview of what’s going on. Then I improved this to let it find non-matching pixels surrounded by red ones (on the top and the left they must be adjacent, but on the right and bottom the nearest red may be some distance away; this works even for groups of pixels since the image is processed from left to right and from top to bottom). Finally, I added some more code to remove any little group of red pixels surrounded by non-matching ones. The effect of this will be seen later.

Illumination

For some reason the detection gets mad if there is artificial light (or maybe it’s just that I haven’t found the right colour values to check for). No light at all (except for that of the computer screens) works better -after reducing the minimum levels of saturation and brightness I was checking for-, but it gives a lot of noise. My first program therefore fails miserably under such conditions.

However, now that I have the noise reduction this is no longer a problem. See by yourself: image at right. (The really bright points are those which didn’t match but have been converted to red since they are surrounded).

Second try at box detection

I could just have put my previous box detection algorithm on top of it, but I decided to make use of the fact that the noise reduction is successfully removing everything except for the box. Thus, instead of searching for red lines likes before I just localize the left-most, right-most, highest and lowest red points.

Using those four points, I calculate the centre of the box (and I could also reliably determine the position of the four corners, if I added some more code to find whether the box is horizontally aligned or not).

Finally I calculate the relative movement of the centre point and this way I can control a pointer (bottom right of the video). Here we go:

(And it works as well at night! - Code is here)

Yet another GUADEC post

gnome-sponsored-badge

I haven’t blogged for quite a few weeks, so I guess it’s time I revive my blog, and what better way to do this than writing about how awesome GUADEC was? :)

Saturday 25

I went to the Barcelona airport to take a plane at twelve. The plane started almost two hours later because part of the airport was closed for inspection or something, but I finally arrived at Amsterdam. There I took a train to Den Haag and after half an hour of enjoying the green view through the window I arrived at Central Station.

Ten minutes later I entered the hotel and found Clemens and the others from invented here. We went to RevSpace for a while. There wasn’t much going on (the GNU Hackers meeting was already over), but I think the place is pretty cool. Too bad there seems to be no hackerspace in Barcelona…

After a while we went out for dinner, and sitting at the restaurant we found Vincent. Back at the hotel I had a drink with some Canonical folks, and finally I went to sleep and discovered who my room mate would be: Juanjo.

Monday 26 & Tuesday 27

On Monday I went to the design thinking workshop out of curiosity for what that’d be, and it turned out to be an interesting experience. I’d have preferred if they had chosen another topic, though, since “How might we simplify the handling of digital information?” is something I’ve been working on and thinking about for the past year so I have my mind pretty much made up on this topic.

I met several Google Summer of Code students and the GNOME Shell team, I infiltrated myself into the GSoC dinner and participated in the soccer match Tuesday evening.

Wednesday 28

Wednesday, my first GUADEC starts! Opening talk, Web, Who makes GNOME, State of GNOME Shell, Shell Yes!, GNOME: State of the Union (most funny talk ever), Crypto, Clutter, Clutter.

See the GUADEC blog and Steph’s blog posts for more details.

Once the venue closed I went with Will and Steph to the Canonical party and eventually we arrived there.

Thursday 29

After just five hours of needed sleep I had Seif on the phone waking me up. He and Thorsten had just arrived, and we started working on the slides for our talk. I went to the Haagse Hogeschool and assisted to part of Emmanuele’s “So you think you can release?” talk. Then, after Youness joined us, we finished this: Zeitgeist Slides – GUADEC 2010, and finally it was time for our presentation where we talked about the state of Zeitgeist and introduced Teamgeist.

I attended several other talks (JavaScript, How a Free Desktop can help -and hinder- Free Speech, GNOME 3 and Your Application and Malware threats to a Linux Desktop by Thorsten Sick), and finally there was a GNOME Shell dinner at an Indian place. After that we all went to the Collabora Beach Party until they started closing up.

See also: GUADEC blog, Steph’s blog.

Friday 30

Adrien familiarized us with his work making it easy to making GNOME more connected by accessing online information through Tracker, there was more talk about how we need to embrace the web (using web technologies for easier development and also integrating online data into our applications was a very recurring topic all along GUADEC), Fabrice Mous keynote gave me another example of how governments suck at throwing money around, there was a talk on the future of Cairo and finally Danilo talked about Launchpad.

GUADEC closed with the announcement that the next Desktop Summit will be in Berlin (cool, maybe I’ll get to see the c-base then?) and after helping clean up the kilometric mess of network cables (btw, kudos to everyone who helped organizing GUADEC – you guys rock!) I headed to the RevSpace again for the afterparty for ice cream and many games of pinball! On the way back to the hotel Benjamin explained me his secret plans for breaking GNOME.

Again, more here and here.

Satuday 31

Slept until late, hanged around in the hotel lobby for some hours with some other guys (I also passed by RevSpace to see if I could find anyone there, no luck) and finally I took the train back to Amsterdam, ate something there, and for a change I had to wait one hour for the plane to arrive. I’m back in normal life now, but the next GUADEC is only one year away :).

GPG key signing with CAFF

I’ve finally got around to doing my homework from FOSDEM and since I’m sure before long I’ll have forgotten again how all this works, let me write it down here.

1. Installing CAFF (CA – Fire and Forget)

Easy.

sudo aptitude install signing-party

2. Configuring CAFF

For this we open up ~/.caffrc and write in something like this:

$CONFIG{'owner'} = 'Siegfried Gevatter';
$CONFIG{'email'} = 'name@example.com';
$CONFIG{'keyid'} = [ qw{1CFC22F3363DEAE3} ];
$CONFIG{'gpg-sign-args'} = 'save';

The last line avoids the default behavior of dropping you into an interactive gpg session for each key, and just signs all IDs automatically after asked for confirmation. I’ve also set the trust level to 2 (“I have checked this key casually.“) by creating a ~/.caff/gnupghome/gpg.conf file with:

personal-digest-preferences SHA256
cert-digest-algo SHA256
default-cert-level 2

To further streamline the process, I’ve defined an alias in my ~./.bashrc so that CAFF won’t ask for confirmation for every single e-mail it sends:

alias caff="caff -m yes"

3. Installing and configuring sSMTP

Now so that CAFF can send out the mails, we need a mail agent. If you don’t have one already, you’ll need to install one and configure it to work with your e-mail setup (in my case, Gmail). I decided to go with sSMTP, but you can use any other MTA of your choice.

I followed those instructions to configure it:  Send Mail with Gmail and sSMTP. Additionally, I changed the permissions of the /etc/ssmtp/ssmtp.conf file to 640 (-rw-r—–) and the owner to root.rainct (where rainct is my username) so that the plain-text password in it is protected.

4. Using CAFF

That’s it. Well, at least for the setup part, now the real work begins, verifying and signing all the keys. In my case I had them printed out on paper and just typed “caff <id1> <id2> <…>” (eg. “caff 363DEAE3“). CAFF then downloads the keys, asks for confirmation for each of them so you can double-check, and finally e-mails the signatures to everyone.

By the way, in case you accidentally sign the wrong key (eg. one you had on your list but whose owner you didn’t met), you can still revoke your signature (see this “Help revoking a signature” mailing list post).

Zeitgeist 0.3.3 is out!

From the release announcement:

On behalf of the Zeitgeist Project team, I am pleased to announce the immediate availability of Zeitgeist 0.3.3. It introduces an improved relationship algorithm, new sorting types for queries, a data-source registry (providing the possibility of easily disabling individual loggers) and several bug fixes and other enhancements.

What is Zeitgeist?

Zeitgeist is an event-logging framework for desktop and mobile devices. Applications can push events into the log, and anyone can query the log via the rich query API. The logged events are semantically categorized and can come from any sort of activity, such as file usage, communications, browsing history, etc. The Zeitgeist engine is a user-level service and does not provide a GUI. It is intended to support dedicated journalling applications and deep integration with other desktop components.

Where?

Downloads: https://launchpad.net/zeitgeist/+download (zeitgeist-0.3.3.tar.gz)

About Zeitgeist: http://zeitgeist-project.com

Wiki: http://live.gnome.org/Zeitgeist

News since 0.3.2

Engine:

- Added MostPopularActor, LeastPopularActor, MostRecentActor and
LeastRecentActor as possible ReturnTypes for FindEvents and
FindEventsId (LP: #493903).
- Let {Find,Get,Insert}* hooks know the bus name of the caller, when
executed over D-Bus.
- Add an extension implementing a data-source registry (allowing to disable
data-sources from a centralized place and see their description).
- Overhauled FindRelatedUris for better results and improved performance.
- Changed FindEvents, FindEventIds and FindRelatedUris to not treat zeros in
the given TimeRange specially; "(0, 0)" can no longer be used (LP: #490242).
- Fixed a crash in the GtkRecentlyUsed data-source parsing malfored .desktop
files (LP: #526357), and added support for more file mimetypes (LP: #510761).
- Fixed a crash in the GtkRecentlyUsed data-source trying to read broken
symlinks disguised as .desktop files (LP: #523761).
- Fixed a crash in the GtkRecentlyUsed data-source which happened when there
was no display friendly version of a URI (LP: #531793).
- Renamed --no-passive-loggers option to --no-datahub. Output printed by
zeitgeist-datahub is no longer visible in zeitgeist-daemon's output.
- Added --log-level option to change the output verbosity.
- DeleteEvents now correctly removes any unreferenced values (URIs, actors,
etc.) and not only the events themselves (LP: #491646).
- Fixed insertion of events with a payload (LP: #557708).
- Fixed an exception in DeleteEvents.
- Fixed event deletions not always getting committed (LP: #566184).
- Ignore deletion requests for non-existant events.

Python API:
- Made the Interpretation and Manifestation classes iterable.
- Added symbol lookup by URI, in the form of dictionary access.
- Fixed the display name for Interpretation.SOURCECODE.
- Fixed find_events_for_values and find_event_ids_for_values (LP: #510804).
- Added a get_extension() method to ZeitgeistDBusInterface, to get convenient
access to D-Bus interfaces provided by engine extensions.

Overall:
- More fixes and code enhancements.
- Manpage updates.
- Translation updates.

 
web development