Older blog entries for Skud (starting at number 222)

Start your commit message with a verb

I’ve been pair programming with a lot of different people, with a variety of skill levels, on Growstuff over the last year. One thing I’ve noticed is that some people freeze up when it comes to writing a commit message. They type “git commit” and then sit there for a minute going “uhhhh”.

I understand this. It’s hard to convert maybe an hour’s hard work in code into a short sentence of English. How do you compress such complex ideas? How do you even make words, when your brain has been deep in code?

So here’s the tip I give to my pairing buddies who freeze up when it comes time to commit, and I offer it here for free: Start your commit message with a verb.


The rest usually comes easily. What did you add? What did you fix? What did you refactor? Grammatically, this is the direct object, and starting with a verb works as an effective prompt to figure out what it might be.

Sometimes you need an indirect object as well (“Added planting_count to crops”) or a reason (“Added planting_count to improve performance”) but really, if you can get a verb and a direct object, you’re most of the way there. And it’s certainly better than “WTF!?” or “yay bugfixes!” or “.”, all of which I’ve seen as commit messages.

You’re welcome.

(Of course, if you don’t freeze up when you have to write a commit message, then keep doing what works for you.)

Syndicated 2013-08-24 00:41:45 from Infotropism

Clicky Analytics with Mediawiki

This is one of those posts I’m making for the benefit of anyone who googles, wondering whether there’s a Mediawiki extension to integrate Clicky Analytics.

As of right now, there’s not, but there is a good explanation of how you can put some custom code in your LocalSettings.php to integrate any analytics stuff that you like.

Here’s a generic version that will work for any analytics system, hopefully cut-and-pasteable. It works fine on my Mediawiki install right now (version 1.20.x) but is not guaranteed for any future versions. Or, well, it’s not actually guaranteed for this one, now I think about it. Use it at your own risk, is what I’m saying.

Note that you have to paste the analytics code from your provider in around line 16.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!