Entries Tagged 'General' ↓

Genius

Your IQ Is 105

Your Logical Intelligence is Above Average
Your Verbal Intelligence is Above Average
Your Mathematical Intelligence is Genius
Your General Knowledge is Average
A Quick and Dirty IQ Test

Catching copypaste errors

When writing GObjects it’s usually a good idea to follow same naming conventions. It not only makes your code easier to follow but makes easy to automatically catch some semantic errors otherwise easily overlooked.

Long time ago I wrote a two-part script which (ab)uses perl and cpp to extract calls to g_object_class_install_property() and g_signal_new() and checking the parameters follow a consistent pattern. For example:

  g_object_class_install_property (object_class,
                                   PROP_MIN_POSITION,
                                   g_param_spec_int ("min_position",
                                                     P_("Minimal Position"),
                                                     P_("Smallest possible value for the \"position\" property"),
                                                     0,
                                                     G_MAXINT,
                                                     0,
                                                     G_PARAM_READABLE));

  ...
  g_object_class_install_property (object_class,
                                   PROP_MIN_POSITION,
                                   g_param_spec_int ("max_position",
                                                     P_("Maximal Position"),
                                                     P_("Largest possible value for the \"position\" property"),
                                                     0,
                                                     G_MAXINT,
                                                     G_MAXINT,
                                                     G_PARAM_READABLE));

When creating new signals it’s even easier to make copypaste errors and forget to rename one of the parameters since there are more:

  signals [CYCLE_CHILD_FOCUS] =
    g_signal_new ("cycle_child_focus",
                  G_TYPE_FROM_CLASS (object_class),
                  G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
                  G_STRUCT_OFFSET (GtkPanedClass, cycle_handle_focus),
                  NULL, NULL,
                  _gtk_marshal_BOOLEAN__BOOLEAN,
                  G_TYPE_BOOLEAN, 1,
                  G_TYPE_BOOLEAN);

Recently crispin took both pieces and combined them into easier to use, single two-in-one, script object_check.pl. It checks the function parameters and prints them out if they don’t match naming conventions. Of course if you’re using your own naming conventions the tool won’t be as useful, it’ll print all false positives then.

Apparently there were such bugs in Galeon (again? I thought we caught them the last time.) No such bugs in Epiphany. Damn.

Package maintenance is teh suck

Ok, so Luc went on to have a holiday, a pleasant one I hope, and left me with some packages to manage. Well, it appears that what’s in the repository doesn’t exactly match what was last packaged so now I have the fun task to figure out how exactly they differ and which bits to keep from which one. meld probably comes in handy.

One annoying thing that changed was how po-files are handled. As I don’t otherwise maintain packages with user visible string I’m slightly out of touch with practical details (we do localisation quite a bit differently from GNOME for example.) Not to mention that process has been evolving and changing at least a couple of times in the, but who’s counting. And it also seems that make distcheck is failing. Well who really needs distcheck anyway, it’s worked so far… I think.

Holidays in maemo land

Pros: you can relax and forget all about work, your cow-orkers will take care of everything while you’re away

Cons: you could be the one still working

Since I already spent my holidays it’s my turn to cover for my colleagues. Oh, the joys of bugfixing.

We’re also beginning to prepare a new maemo release. The source code, as much as we’ve managed to put in the maemo svn repository (user: guest, pass: guest), is pretty much up to date but the packaging bits are bit rusty and building packages straight from the repository still has some rough edges to smooth out. And it just hit me that we have slightly overlooked a set of packages that are by nature different from others. Fun fun fun.

And of course there are million other little things to take care of. I’m sure I’ll be enjoying the holidays next few weeks.

Oh, the Aieeee is still there, partly because it’s working for us (tm) and partly because no one has yet implemented a cleaner solution for it. But mostly it’s because I’m just lazy.

He’s got a TOWEL!

Went to see The Hitchhiker’s Guide to the Galaxy. It didn’t quite live up to my expectations, unfortunately, but I was probably getting too much with the hype. Sure it had its funny moments, but I kept having a nagging feeling there were missed opportunities and the scenes that were funny fell a bit short.

Reading the book(s) gives you much better insight to many things in the film, some of which probably make very little sense otherwise. Fortunately the story is very different, and not just the same old thing in different medium, so you can enjoy it not knowing beforehand all the events.

Fun bits: sofas, philosophical blockbusters, I have an idea, the gun, lemons

First up: sit through the WHOLE song in the end, and then a little longer, it is worth it. 😀 — Oh damn…

Light rain

Torrential rain halts world champs

A little rain never hurt anybody, I’m not going let few drops of water stop me from riding back home. It’s a warm summer day anyway. There’s nothing wrong with Finnish summer. lalalalala… I can’t hear you!

Running is bad for your health

Running is bad for your health.

Even if you’re only spectating.

Especially if you’re on the roads I take to ride home; me riding full speed in the midst of the crowd can make lots of damage.

Helsinki City Marathon was yesterday which I noticed when trying to get back home from the office. I can only awe in wonder for everyone who can finish the race. I never could get the hang of running despite jogging voluntarily while in the army – to kill time. I very much prefer riding a bike, though I don’t do long trips too often, or rollerblading.

No marathon runners, spectators, or organizers were harmed in the making of this post.

Hack the planet

Ooh, got added to planet maemo. The number of people I get to annoy at least doubled. Now there’ll be two.

f-spot woes

Maybe all software sucks or maybe It’s just me, but there doesn’t seem to be anything I can’t find problems with during the first few minutes I’m using something.

While everyone seems to be praising f-spot I find its date handling during imports pretty bad. It seems to be throwing away the time the photo was actually taken and using the import time instead. Clearly that’s not desirable when importing all the photos you took during your long holiday.

After some trying I did manage to import everything with satisfactory results after hacking the code a bit. In the process, however, I ended up removing gimp and gphoto2 which depended on libgphoto2 which I had to rebuild because I had to upgrade libexif because exif, which I thought I could use to fix the dates, needed newer version. In the end it was all for nothing. I just hacked f-spot to use the file timestamp instead of current time when EXIF tags are missing.

Once I got the photos imported using f-spot seems kind of nice. The UI could use some polish, though, some things feel ambiguous and cryptic, and I find some interactions missing or unexpected. And at least in the beginning the monthly timeline is just feeling too coarse.

Which server do you want to patch today?

This email from the IT department explained a server outage:

The root cause of this failure was remarkable.  In a truly bizarre
chain of events, Microsoft's buggy software required so many patches
to be propogated that the filesystem overfilled and important services
ran out of resources.

(From rec.humor.funny)