20th May, 2012

8000 commits

ohloh reckons that this week the count of commits in LibreOffice belonging to me hit 8000 accumulated over last approx 12 years.

I thought I’d sample each per-thousand rollover to see what they were…

Commit 8000: A minor startup time improvement and code simplication
Commit 7000: fix dnd crash. Generic bug fixing of fdo#39950
Commit 6000: callcatcher: remove unused code. Removing a few hunks of code that get compiled into the product, but that nothing calls. Some of the callcatcher foo which we use to trim the fat off LibreOffice
Commit 5000: Generic bug-fixing from grovelling over abrt traces, rhbz#710004 band-aid for immediate crash in IsAlignPossible.
Commit 4000: Workaround a weird-ass warning. from a minor compiler bug gcc#47679.
Commit 3000: Fix BSD uno bridges. We merged the various uno bridges together for the various unix platforms that use gcc to reduce the burden of maintaining so many. So needed to add the little register return quirk of the BSD platforms.
Commit 2000: Silence the (then) new gcc 4.5 warnings in our code
Commit 1000: Documented FSPA anchor values should override escher attributes when different. Efforts to get object positioning right on .doc import
Commit 1: MSOffice Controls {Im|Ex}port. Apparently my first post-StarOffice commit. Getting those “OCX” controls imported from MSOffice file formats.

Does this mean I’m an awesomely productive coder versus everybody else ? Nah, not really. For one thing, we started off with CVS went through mercurial and end up with git, and there’s generally a lot of difference in how many commits you generate with commit-unfriendly CVS vs git which makes you commit gung ho.

And there’s differences in commit style from one person to another too of course. I tend to generate a lot of commits because I like to refactor and code in “see my train of thought so you (ok me when I have to revisit it) can see where I went wrong if I do” steps rather than dump in a single commit that affects a hundred interconnected things. But it’s all the same amount of code at the end of the day.

Another wrinkle is that various development rules ended up hiding the true ownership of a lot of older commits. e.g.
a) Per day-0-release commits were all flattened of course, I only worked on StarOffice a short while before that event, so that’s a fairly small amount for me. But presumably a truly frightening number of commits for e.g. jp
b) for a while we worked by commiting only to cvs branches which release engineering would merge into master, e.g. this commit is an example, which is why the Hamburg release engineers hold unbeatable commit rates :-)
c) And later the burden of commiting to OpenOffice.org for non Sun staff became almost impossible to bear, e.g. provide install sets for Windows and Linux, get a QA volunteer to QA the install set for you and sign off on it. Which was all pretty hard to do given the speed of the one or two windows buildbots available for the purpose and the limited number of QA people. Much easier to just dump the patch into bugzilla and see if someone inside the bunker could take care of all that for you, e.g. commits like this

Posted at 9:12 pm | Comments Off

7th May, 2012

Extending Clutter-Box2d

The following is a block diagram of ClutterBox2dmm. It’s at a high level of abstraction, so most of the detail is lost. What’s of interest is that Cluttermm is stacked on top of Clutter and that there exists a Clutter-Box2d.

Clutter is the graphics library I use for first year C++. I’ll explain why some day. The Clutter library is written in C. Cluttermm contains the C++ bindings for Clutter. Therefore we can use the awesome accelerated graphics of Clutter in C++. Clutter also has a related library called Clutter-Box2d. The Clutter-Box2d library contains C bindings for the upstream (and awesome) Box2D C++ library. Box2D is used in many places including, I believe, in Angry Birds. Box2D has also been cloned in many languages such as JavaScript. On top of Clutter-Box2d, I mantain Clutter-Box2dmm which are C++ bindings to Clutter-Box2d (yes, C++ bindings to C bindings for a C++ library….but it does make sense).

I’ve just extended both Clutter-box2d and Clutter-box2dmm to support the IsFixedRotation() functionality in Box2d. This hack isn’t hard. It does require modifying the C library Clutter-Box2d and then modifginy the C++ library Clutter-Box2dmm on top of this. The relevent commits are here and here. If you need this feature in Clutter-box2dmm you currently have to compile from source. Get it whilst it’s hot.

Posted at 10:18 pm | Comments Off