The Social Networking Kata

Tuesday 30 April 2013 at 11:36 BST

Last week, Sandro and I had a lot of fun running our monthly hands-on session for the London Software Craftsmanship Community. We decided to make things more difficult for ourselves (and the attendees) by combining two of our favourite sessions: testing with BDD, and object calisthenics. The victims lucky people had a choice of solving the problem using BDD/ATDD, object calisthenics, or both. Of course, if they opted for just the latter, TDD was still mandatory.

Our original plan was to use the Bank Account kata: Sandro used it in a previous session with object calisthenics and it worked well. On the day, though, I decided I was bored of it and that we should write a new one. Sandro had the bright idea of thinking in the realm of social networks (paraphrasing his words, "Social networks are cool, bank accounts are not."), and we went from there. A few minutes later, we had something, and it went down really well on the night.

So, I present to you, our Social Networking kata.

Posting : Alice can publish messages to a personal timeline

Reading : Bob can view Alice's timeline

Following : Charlie can subscribe to Alice's and Bob's timelines, and view an aggregated list of all subscriptions

Mentions : Bob can link to Charlie in a message using "@"

Links : Alice can link to a clickable web resource in a message

Direct Messages : Mallory can send a private message to Alice

I hope you like it.

Now, in practice, no one is going to get past the posting and reading requirements in a one-hour dojo. That's OK. Quite a few people expressed an interest in taking it home and continuing the exercise. And when you're done, you can always add more: pictures, hashtags, whatever. It doesn't even require brainpower—just open up Twitter and pick a feature.


If you enjoyed this post, you can subscribe to this blog using Atom.

Maybe you have something to say. You can email me or toot at me. I love feedback. I also love gigantic compliments, so please send those too.

Please feel free to share this on any and all good social networks.

This article is licensed under the Creative Commons Attribution 4.0 International Public License (CC-BY-4.0).