Category Archives: programming

The Architecture of Open Source Applications

Some time ago, I was asked if I would write a chapter on Telepathy for a new book on software architecture: The Architecture of Open Source Applications. Finally today, the book as been released. You can read it online (or … Continue reading

Posted in programming, telepathy, writing | 2 Comments

LD_PRELOAD GObject lifetime debugging tool

For years and years I’ve dreamt of a tool that would show me what GObjects are currently alive, and let me have a look at information about them. Today, while trying to debug a particularly horrid reference leak (program wedged … Continue reading

Posted in c, collabora, example code, programming, telepathy, work | 11 Comments

making my C more like Python

Asynchronous programming in C can be such a pain. You’re always creating little structs in order to pass around user_data. So often I find myself wishing it were like Python, and I could just create an anonymous tuple. Then I … Continue reading

Posted in c, example code, programming | 9 Comments

higher level channel requesting in telepathy-glib

Thanks to the awesome work of Guillaume, telepathy-glib 0.11.12 now includes high-level API for requesting communications channels via Mission Control (the Channel Dispatcher). API is provided both for channels you wish to handle, or channels you want someone else to … Continue reading

Posted in example code, programming, telepathy | Comments Off

g_variant_equal() and dictionaries

For anyone using g_variant_equal() with a type containing a dictionary, you should the aware that, somewhat unexpectedly in my opinion, g_variant_equal() only returns true if (and only if) the keys in the dictionary are in the same order (GVariant implements … Continue reading

Posted in example code, gvariant, hacking, programming, work | 2 Comments

introspecting tp-glib and converting DBus-GLib GValues to GVariants

Telepathy is a modular framework. At the very heart of Telepathy there is a specification that describes how the various connection managers, clients and other components interact with each other. The specification is written in terms of a set of … Continue reading

Posted in c, example code, gobject-introspection, hacking, programming, telepathy, work | Comments Off

this is what goes around; and this.. this is what comes around

It used to be that no applications would compile for 64-bit architectures, because everyone was trying to cram pointers into ints. Today I had the opposite. The head of some code I'm working on wouldn't compile in a 32-bit environment, … Continue reading

Posted in c, hacking, programming | Comments Off

Useful python trick of the day: dict.get()

How often in Python have you written something like: d[k] if k in d else "Default" Admittedly this has gotten a lot shorter since the inclusion of ternary operators in Python, but did you know that Python provides a get … Continue reading

Posted in hacking, programming, python | Comments Off

improving your code by fixing warnings

I don't know why, but there is a class of software programmer who seem to believe that compiler and runtime warnings are somehow optional, or something that can be cleaned up at a later date. This class of programmer is … Continue reading

Posted in best practice, listen to your tools, programming, work | Comments Off