Stuff Michael Meeks is doing

This is my (in)activity log. You might like to visit Collabora Productivity a subsidiary of Collabora focusing on LibreOffice support and services for whom I work. Also if you have the time to read this sort of stuff you could enlighten yourself by going to Unraveling Wittgenstein's net or if you are feeling objectionable perhaps here. Failing that, there are all manner of interesting things to read on the LibreOffice Planet news feed.

Older items: 2015: ( J F M ), 2014: ( J F M A M J J A S O N D ), 2013, 2012, 2011, 2010, 2009, 2009, 2008, 2007, 2006, 2005, 2004, 2003, 2002, 2001, 2000, 1999, legacy html

Removing unused code in LibreOffice

One of the unfortunate things that LibreOffice inherited, as part of the several decades worth of unpaid technical debt, is unused code that has been left lying around indefinitely. This was particularly unhelpful when mingled with the weight and depth of the useful code we have around the place. Caolan McNamara of RedHat wrote a beautiful tool callcatcher that identified these unused methods, and in recent times in LibreOffice we've had an unusedcode.easy file in our toplevel with a list of methods that should be removed. It's pretty easy to find and expunge a method or two, with a quick git grep, and dropping a patch to the developers mailing list. To escape from a pile of administration recently, I knocked up a pretty nasty perl script to parse the git numstat output, to see how we're doing. That produces a fun graph:

It seems that over half of our unused code has now bitten the dust. Uunfortunately as we remove more, more wasteage tends to be revealed, which explains some of the upward jumps in the graph, nevertheless the trend is clearly down. One of the side benefits of the unsung heros working at the conversion of our old-style macro driven generics to modern STL is that this looses us several unused methods per class converted.

If you want to get involved with LibreOffice development, it doesn't get much easier than this - please do check out the code and have a go. For the more adventurous finding an unused destructor, without a matching unused constructor is proof of a leak that needs chasing, of which there are a handful.

Failing that, why not run Caolan's callcatcher over your project to see which nooks and crannies are surplus to requirements.

My content in this blog and associated images / data under images/ and data/ directories are (usually) created by me and (unless obviously labelled otherwise) are licensed under the public domain, and/or if that doesn't float your boat a CC0 license. I encourage linking back (of course) to help people decide for themselves, in context, in the battle for ideas, and I love fixes / improvements / corrections by private mail.

In case it's not painfully obvious: the reflections reflected here are my own; mine, all mine ! and don't reflect the views of Collabora, SUSE, Novell, The Document Foundation, Spaghetti Hurlers (International), or anyone else. It's also important to realise that I'm not in on the Swedish Conspiracy. Occasionally people ask for formal photos for conferences or fun.

Michael Meeks (

Made with PyBlosxom