Last week, Sandro and I had a lot
of fun running our monthly hands-on
for the London Software Craftsmanship
decided to make things more difficult for ourselves (and the attendees)
by combining two of our favourite sessions: testing with
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.
- Alice can publish messages to a personal timeline
- Bob can view Alice’s timeline
- Charlie can subscribe to Alice’s and Bob’s timelines,
and view an aggregated list of all subscriptions
- Bob can link to Charlie in a message using “@”
- Alice can link to a clickable web resource in a message
- 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.