Archive for 2012

Steve Jobs – Book Review

Saturday, April 28th, 2012

I received Steve Jobs’ biography as a present last Christmas. I was never a fan of him or of Apple, and always found it annoying that he was praised as a great inventor and visionary. When he died, I was one of those saying “Hey, you know who also died? Dennis Ritchie, and he deserves way more recognition than Jobs.”

I expected the book to be another pile of adoration and I probably wouldn’t have even opened it if it wasn’t for a podcast that happened to pop up on my playlist a few weeks earlier. It was an interview with Walter Isaacson, the author of the biography, about his work on the book, and what it was like to work with Jobs when he was writing it.

In the interview, Isaacson told that Jobs asked him to write the biography a number of times, and he finally agreed under the condition that Jobs would not try to take control over it and would allow him to write a true story of his life. If this was true, I thought, then this could actually be a trustworthy biography and not another tribute to the greatest inventor of our times. So when the book got into my hands, I thought I might just as well read it and find out if Isaacson managed to keep it that way.

Well, he very much did. While it’s clear that Isaacson shows considerable respect to Jobs and all the things he managed to achieve, he also reveals his failures and weaknesses, and does not portray him as a superhero kind of figure. Jobs could be a real jerk to those around him, especially to the people that he worked with, and the biography does not pass over that.

The book also describes a good part of the history of home computers and technology in general. The first chapters, which cover the late seventies and early eighties, were almost a nostalgic read for me, since they brought back so many of my own memories from that time (well, the latter part of it, I’m not that old), when I was a little kid fascinated with those magical 8-bit machines.

But regardless of whether you get a kick out of early 80s computers or not, I recommend the biography, as if nothing else, it’s an excellently written, interesting, and sometimes even inspiring story. I truly enjoyed the read, and learned my lesson not to judge a book by how overrated and overpriced the products are that were created by its subject.

POD Functions Sort Greasemonkey Script

Friday, March 30th, 2012

Being a Perl programmer, I frequently visit CPAN or MetaCPAN to read Perl module documentation. I often go there to look up a specific function or method, and many modules are kind enough to list their functions/methods in the table of contents, so it’s usually easy to quickly find the one I’m looking for.

However, some of those kind modules list functions in non-alphabetical order, which is a bit less useful. Sure, that particular non-alphabetical order might make sense, for example when it groups functions by their purpose, but it still makes it harder to find a specific item on the list. Examples: DBI, DBIx::Class::Schema, DBIx::Class::Storage.

To cope with that, I wrote a small Greasemonkey script which allows you to sort those lists in alphabetical order. It tries to recognize lists of functions or methods using simple heuristicts (such as having a “_” in the list item text, or having no spaces) and puts an icon next to the list, which, upon clicked, sorts the list.

If you’re a Perl programmer with OCD, I’m sure you’ll love this script. Tested to work on Firefox and Chrome/Chromium.

File::PlainPath – Let Paths Be Paths Again

Sunday, February 26th, 2012

The de facto standard way of constructing portable filesystem paths in Perl is through the use of File::Spec‘s catfile and catdir functions. Example:

my $path = File::Spec->catfile('dir', 'subdir', 'file.txt');

This method, or a similar one involving Path::Class, is the most recommended approach and has been adopted by application development frameworks like Dancer (which has a wrapper method for it, named path) and Catalyst (with its path_to method).

The slight problem that I see with this method is that it makes code a bit more complicated, and thus a bit less readable. Paths become lists of parameters and no longer look like paths.

I wrote a simple module that tries to address this by allowing you to write paths the traditional way — as strings, using a directory separator of your choice (/ being the default), while the catfile stuff happens behind the scenes. You can just say:

my $path = path 'dir/subdir/file.txt';

What it does is it splits the path string on each occurrence of the forward slash and feeds the resulting list of path components to File::Spec->catfile, which reassembles them using the appropriate OS-specific directory separator, and constructs the OS-specific path that you want.

The module is up on Github, and should also be available on CPAN shortly.

The Little Story of Opel

Saturday, February 18th, 2012

Yesterday was World Cat Day (as observed in Poland), so I thought this might be the perfect time to tell you a little cat story.

More than two years ago, I posted the story of Rocket, a kitten that I found in my neighborhood — now a big, happy cat living with my parents. This story has a very similar beginning.

It was a cold September evening, I was walking home along a busy street, when I heard a kitten squeak. It was obviously coming from under a car parked near the street, so I started looking, but couldn’t see any kitten under the car. The squeaking continued, so I knew it must have been there, and I kept looking and reaching behind the wheels, but to no avail.

Since many people were passing by, my unusual activities attracted the attention of some of them. One man with an “excuse me sir, what are you doing?” look approached me, but before he even asked me a question, the kitten meowed again, so the man began searching with me.

After we both searched for a while with no success, the guy said “you know what, I live in this block here and I know the owner of this car, let me call him”. In a few minutes, the owner came and joined the search operation.

He looked inside the car just to be sure the kitten didn’t get in there in some miraculous way, but that was not the case. It was obvious that the little guy was somewhere in the car undercarriage, but the meowing seemed to be coming from different places and neither one of us was able to tell exactly where the kitten could be.

In the end, we lifted the car up with a jack, the owner crawled under it and saw some fur sticking out from a hollow spot next to the exhaust pipe. He reached in there and got the kitten out — the poor thing looked all dirty and miserable, but didn’t appear to be hurt in any way. The first guy called his wife, who brought some cat food (it turned out they had two Persian cats) and water for the rescuee.

(more…)

Six (Plus One) Android Apps that Make my Life Suck a bit Less

Tuesday, January 31st, 2012

I planned to write an introductory paragrah about how everyone and their grandma now uses mobile apps, but everyone (and their grandma) already knows that. So let me jump straight to the point — here’s a list of the apps that I found essential since I got myself an Android phone about one and a half year back.

1. K-9 Mail

A powerful e-mail client. Actually, it’s the e-mail client for your Android phone. Comes with a rich feature set that could put many desktop e-mail clients to shame. Has good support for multiple e-mail accounts, IMAP, signatures, PGP, searching — you name it. Highly recommended for everyone who wants to do some serious business with e-mail on their phone.

2. BeyondPod

A podcatcher/player. I’ve tried quite a few, and this one is by far the best. It’s loaded with useful features, but is still maintaining a clean user interface. This app is the top reason why I’ve become a regular listener of a number of podcasts, listening every day while driving, exercising, or doing mundane house chores.

3. OurGroceries

Dead simple app that aids you in putting together shopping lists. I was originally using the traditional paper and pen approach and thought that was all I’d ever need, but then I tried this app and it proved to be more effective. And, it adds that flavor of geekiness to the boring act of grocery shopping.

4. Twitter

The official Twitter client for Android. People used to criticize it and say that the unofficial apps are way better, but I’ve tried all of the popular ones and none of them offered anything particularly interesting to me. The official app is simple, has a clean interface, and does its job quite well.

5. c:geo

A great geocaching app with lots of useful features and a nice user interface. If you want to try geocaching with your Android phone and are looking for an app, look no further and get c:geo.

6. APNdroid

A tiny app with a very specific purpose. All it does is it lets you add a button to your home screen to toggle mobile data connection on and off, making a commonly used feature accessible immediately, instead of forcing you to find it buried somewhere in the settings menu.

Honorable mention: Shuffle

A simple but effective Getting Things Done app. I started implementing GTD a while ago when a guy I worked with told me about it, and he also recommended this app. I didn’t place it on the list, because the current version has a significant flaw — it fails to properly synchronize with Tracks, a GTD web application that I use on the desktop machine, and I can’t really use it until that bug gets fixed (hopefully, soon).