Kira’s Coffeeconomy

by Brent Charbonneau on Mar 21, 2016 5:04:00 PM

Like many startups, Kira takes its coffee very seriously. Probably too seriously. However, one of the simplest things a company can do to keep a team functioning is make sure there’s always coffee when it’s needed. Or, as it’s been summarized by some on our team:

Coffee In → Code Out

When I started at Kira two and a half years ago, keeping the coffee flowing for our eight person team was simple business. Whenever any of us wanted coffee, we simply made it. Brewed in our beautiful “Classic 10 Cup” Chemex, coffee was never more than a few minutes away.

Chemex1-864330-edited.jpg

But as our team grew, so too did our team’s thirst for the hot black elixir. Over time we developed a few unwritten protocols. The first of which was a process to stake a claim on coffee as it was being brewed: the Coffee Conga.

via Giphy

As the sun rises in the east and sets in the west, so to will the coffee flow, filling the coffee mugs lined up in the Coffee Conga from east to west.

Eventually, though, so many people would join into the conga our pots were being overly divided. Through trial and error, we determined that six mugs was the limit we could reasonably brew at once.

What’s that? “It’s a 10 cup chemex,” you say?! A visit to ChemexCoffeeMaker.com’s FAQ provides this helpful answer,

Apparently Chemex thinks we’re all drinking out of dixie cups. ಠ_ಠ

So a “10 cup” Chemex, actually only makes 50oz of Coffee, or, as our exhaustive experiments revealed exactly 6.25 standard 8oz mugs of coffee. We’ve considered trying to increase capacity, but so far limitations in kettle volume and electrical outlet availability have prevented us from horizontally scaling our output.

For a few months we had a good balance with this system… And then the team grew by another 6 people, and we moved into a multi-floor office with a kitchen on the ground floor. In this new space running down three flights of stairs to join the Coffee Conga became problematic, at best. We needed to iterate.

Kira makes heavy use of a team messaging service called Flowdock. On Flowdock we have a bot, named Bort, which is a local instance of a GitHub’s Hubot. Hubot’s scripting extensibility allows us to do all sorts of things, but the script we use the most is our Coffee script (appropriately written in CoffeeScript).

Now, whenever someone starts a new pot, they let other interested coffee consumers know by using the .brewing command in our “Central Perk” channel:

coffeeconomy_screen1.png

Bort notifies the other members of the channel that a brew has begun, and people can claim the five remaining spots (as the number one spot is automatically given to the barista) by using the .dibs command. When all spots are used up, Bort politely, but firmly, declines:

coffee_screen2.png

Once a brew is complete, the barista uses the .fp command to let people know it’s ready.

With our whole system moved online, the urge to start collecting and analyzing usage data was too strong to be ignored, so in November we deployed the latest iteration of the Coffee Script, which introduced the Kira Coffeeconomy.


Just for fun (and perhaps some light social shaming), we can now track every cup of coffee created, and every claimed cup. For any given brew, the barista’s ☕ balance increases by five (6 ☕  created minus 1 ☕ claimedand the balance of everyone who claimed decreases by one.

This has enabled us to gain some interesting insights as to who the producers and who the consumers are within our team.


 

Currently, the Coffeeconomy is a passive system, merely monitoring and tracking everyone’s usage. But I dream of a world where we might reward the top producers with special privileges (or perhaps locking Nima out of the system until he’s returned to a positive balance). Perhaps in the next iteration. Although, rumour has it, someone on the team has been tasked with acquiring a totally boring, generic drip coffee machine.

Use Hubot? Like Coffee? Want to start your own Coffeeconomy? We’ve open sourced our coffee script! Instructions on how to set it up can be found on the Hubot-Coffee Github Repo.

Enjoy!

author-bg1.png
author avatar

Written by Brent Charbonneau

Brent is the Director of Engineering at Kira. He builds new features, hunts down productivity crippling bugs, and fights an endless battle to prevent our chat bot, Bort, from gaining sentience.