An alternative to incontinent cats

Veröffentlicht
2016-01-19 21:49
Written by

Someone really did give me a kitten for Christmas once. He was cute and funny and unwillingly cuddly. I got a lot of enjoyment out of him, not to mention years of semi-safe passwords. He also chased away our existing cat and eventually we couldn't look after him as our living circumstances changed. To his credit the giver of the kitten was honest that he didn't actually have any other way of looking after the kitten and didn't blame us when the kitten, grown to a scrappy cat, disappeared under a cloud of neglect.

 

I mention the kitten because I am still recovering from Christmas (I know it's almost been a month) and there is some sort of cyclic track running through my mind merging two quotes “CiviCRM is free as in kittens not free as in beer” with “Kittens are for life not just Christmas”. Sometimes my mind just munges it all down to “free beer” and “Merry Civimess” but I feel like something worth saying is trying to free itself from the brain-mush.

 

The idea I'm circling in on is that contributions to open source projects are a bit like Christmas presents. Mostly given in a spirit of generosity, the thought is always appreciated and the gift usually is too. Sometimes you get that most-redeemable of vouchers, money. Sometimes you get a gift with a cost, like a picture that needs framing … (erm yes that gift also came from the kitten giver), sometimes you get sorely needed useful gifts, and sometimes you get kittens.

 

Kittens are clearly the most appealing of the gifts and what sort of grinch would not accept a kitten graciously? However, it's a small step from 'gracious accepter of kittens' to 'mad-cat-lady'. The cutest of kittens turns into a smelly-walking-vet-bill in time.

 

A good portion of kitten-givers are actually honest that their motives are at least in part in order to pass the care onto someone else. I've heard it and I've said it myself - “I want to get this into core so I don't have to maintain it”. Erm, and sometimes I haven't always been honest enough to admit that.

 

When I look at the list of code contributions / pull requests I see quite a few kittens mewing their adorable meows. Lots of nice improvements, lots of compelling fixes. But I have mixed feelings because I know that not only do you have to look after kittens, but if you can't quite manage to look after a kitten properly the gift giver will be complaining about how they gave you a lovely kitten and you neglected the poor creature so much it's now half crippled, and they will pressure you to pay the vets bills for it's palliative care.

 

I would go as far as to say that every PR that doesn't increase test coverage or improve the code quality or fix a recent regression is actually an incontinent moggy in the making.

 

Fortunately among the mewling masses in 2015 there was a hidden gem and so the non-kittenista award for 2015 goes to (drum roll ) … Johan Vervloet.

 

Johanv stands out not only for submitting masses of unit tests but also for persevering with pursuing new approaches in response to feedback. For those of you who are familiar with the api we have long struggled with the fact that the dao-based api (address.get, email.get etc) can only interact with one table. Thanks to Johan in 4.7 that hurdle has been smashed and those api can now be filtered by the custom fields that extend them … but wait, like a daytime-informercial, there is more... that single-tableness was also the key blocker to using ACLs more broadly in the api. So not long after Johan's work, Coleman added ACL-awareness to those same-DAO-based api. The code is all well-tested, all kitten-free.

 

I do like kittens and I can't always resist them – but we can't care for an endless number of them. Our test code has been getting better and better and there are precedents for testing all sorts of areas of code (like form-intiated receipts, searches and CiviReports) now. Of course if you are doing your first code contribution to CiviCRM we would love to accept your kitten. But, if you've done a few patches before then stop to ask yourself “how can I elevate myself to be more than a #kittenista” and if you don't know – ask.

 

Meow.

 

 

Filed under

Comments

V. nicely put, Eileen!

Before this, I had always thought of the Kitten as CiviCRM and the recipient of the kitten as our users and implementors (i.e. as a user, you don't have to pay for it, but you should support and look after it - submit bug fixes, send donations, etc.) but I am now totally behind your way of looking at it - fairly sure that I will never read a better explanation of why people should write tests for CivICRM :)

come for the features, stay for eileen's blog posts...

I decided in the end not to mention it in my blog but this was the (beautiful and moving) blog post that made me think about the fact that things given with good intentions can create a burden for the receiver http://lecretia.org/the-kindness-of-strangers/.

Thanks Eileen for an incredibly thoughtful blog post!

Is there a 'guide to submitting great PRs' somewhere? You know: code formatting, comments, unit tests, best practices with links to more detailed pages for all. That would certainly be a good resource to point contributors to ...

Good idea - I know there is something for commit messages but not sure about an overall guide. def worth doing!