Monday, May 16, 2011

Coffee and its Effects on Feature Creep

Starting in mid-2004 and until the end of 2006, I worked at a small DNS and DHCP software company called Nominum.  These days Nominum offers both software and services, but at its core what has allowed it to be as successful as it has been is the fact that its development group is, singularly, the most brilliant and personally committed to the company group of developers I've ever seen.  Most of the developers with whom I worked had been there from just about the beginning of the company.  It was the sort of environment where my VP was still doing the Costco shopping (though admittedly she enjoyed it), everyone knew every other employee's spouse's name, and we got together to have our dogs play. 

That's less relevant, however.  The two introductory bits of information necessary for this posting are:
  1. Nominum at the time had tons of RPI alumni, and because of this had implemented an RPI-sourced chat system named Lily.  Lily is more IRC-like than Yahoo Messenger-like in the sense that it's largely oriented toward offering multi-person chats (in IRC these are channels; in Lily these are called discussions); you can also send private messages, but it's typically used less often; Lily was very heavily used (one of the earliest lessons I had to learn was that if it was 1AM and my boss just sent me a private message asking me a question or asking me to take care of something, it was OK to say "actually, I was about to go to sleep; I'll deal with it in the morning."  It took me some time to learn this lesson);
  2. We worked approximately a mile away from Starbucks, and we went for coffee every day.
The problem was that the coffee ordering process was just terribly inefficient.  At some point in the day, someone would pop up on the "coffee" discussion and send out a broadcast "coffee?" to all interested parties.  At that point, people would have to say on the discussion what they want (e.g. "I'll have my venti non-fat 180 degrees vanilla  latte with two equals, extra squirt of vanilla, and whipped cream."  No, seriously, that was my drink at the time), the person who was volunteering to go would then write the order down (with a pen and a piece of paper), they'd go to Starbucks where the barista would have to decipher their handwriting, and make the drinks.  Typically, the person who went to pick up would pay for the whole order and then would try to keep track of how much each person owed them (people did not often have the exact cost of their drink available).

It doesn't take too many iterations of this to get a little sick of the inefficiency.

Lily was really easy to interact with -- it was a telnet-based interface, and we weren't doing any encryption.  Writing a bot to interact with Lily proved to be a trivial task.  I called it Caffeinator.

By the end of the first weekend of development (this was, obviously, a rather extra-curricular sort of effort), Caffeinator could see that ordering was opened, then listen to people saying "I'd like X," from which it would create a shopping list which it could post as a web page.  When ordering was closed, the person doing the shopping could visit the web page and print it out.  The order takers were happy.  Starbucks was happy.  Success.

It was still painful to have to say "I'll have my venti non-fat 180 degrees vanilla latte with two equals, extra squirt of vanilla, and whipped cream" every day.  So it was easy to have Caffeinator start keeping track of your favorite.  Saying "my favorite gnfl is a grande non-fat latte," for example, meant you could next time simply say "I'll have my gnfl" and Caffeinator would note you wanted a grande non-fat latte."

In rapid succession, we added the ability for it to optimize ordering for the Starbucks drink carriers (Starbucks drink carriers accommodate four drinks; ideally, all four drinks are similarly sized for balance, but at minimum it's preferred to have two pairs of identically-sized drinks).  We also added the ability to order for other people (so if I'm in John's cube when coffee ordering is open, John could say "Roy will have his gnfl") and the ability to define other people's drinks, if they let you (yes, I implemented coffee drink definition ACLs).  And that was still not that big of a deal.  It all sort of made sense.

In hindsight, it was probably right around the time that I implemented debt tracking into Caffeinator that I should have taken a break from enhancing it and reconsidered whether feature creep had gone way too far. 

Remember the part where someone comes back with your drink and you find out you don't have the $4.15 you owe them? It's annoying.  So after a particularly fun weekend, suddenly debts could be declared to Caffeinator.  Obviously, the potential for mischief when you can say "John owes me $4.15" is high, so the first implementation required people to declare their own debt ("I owe Roy $4.15.").  Of course, I also had to implement debt repayment ("John paid me $4.15").  The next implementation allowed for a proposed debt ("John owes me $4.15," which would result in Caffeinator telling you "John says you owe them $4.15.  If you agree, send me a message including this key: 'xxxasdfasdf325'").   Then, of course, I got curious about the total balance of debt/credit and so had Caffeinator report your TCNW (Total Caffeinator Net Worth) -- your total credits minus your total debts. 

It didn't take long to see some people's TCNW fluctuate way more highly than simply coffee ordering could account for, and realize Caffeinator became the default way in which social monetary debts were being tracked.  Your coworker with Amazon Prime order something for you? "I owe Matt $88.95." 

Once the network of debt and credit became saturated enough, it turned out that most people had dozens of people with whom they carried either a Caffeinator debt or a Caffeinator credit, and I came up with a way to allow people to simplify their credit/debt situation by reassigning debt.  Imagine Jim owes you $10, and you owe Bob $10.  Well, that's easy.  Tell Caffeinator "reassign $10 from Jim to Bob" and suddenly Jim owed Bob $10, and you were out of the picture.  Heck, two people owe you $5 and you owe four people $2.50 each? You can eliminate six credit/debt relationships at once. 

Of course, this being an environment full of mischief, the next thing we had to deal with was people gaming the system just for the sake of annoying others.  Bob owes you $1? Well, declare that you owe twenty people $.05 each, then reassign $.05 of Bob's debt to each of these people.  Suddenly, these twenty people find Bob owes them $.05 for no particular reason and Bob's really unhappy with you.

My last enhancement to Caffeinator was to allow people to opt out of debt reassignment.  That seemed to stop most of the gaming.

And that's how I set out to simplify ordering Starbucks and created an internal banking system. 


  1. As I recall, the author of caffeinator was not immune from gaming it for amusement value and annoying others. =)

  2. It's only feature creep if there isn't the time to implement (and doesn't mess with a clean interface). Otherwise, it's innovation of neat things (provided there is a customer request). :)

  3. found it on hacker news. It's a brilliant piece :)

  4. Awesome story, it is now one of my favorite programming tales ; )

    (found it on reddit)

  5. Easy remedy for the hack you suffered: don't notify people of any debt below a certain threshold. I'd start with $1. You could try and game it, like owing 20 people 99 cents each, but that doesn't sound like a lot of harm.

    Or even better: round all debts to the lower dollar. (If you owe $1.75 to Bob, the system will show you $1.) No more petty cents. Of course, keep tracking cents internally.

  6. Hi, Roy -- it's Kurt Weiske! This point made's home page.

    How's tricks?

  7. Enjoyable post. I couldn't help but think of this PBF comic:

  8. Oh, hey Kurt! :). Funny to see you -- and everyone else -- on this relatively old blog post.

  9. And I was always too far away from the office to make use of this

  10. A fine example of the 'Tute Screw at work.

  11. I just lost my comment because I wasn't logged in to wordpress.

    At MX Telecom we had something similar to this (for pasties and chinese food), but just pooled all debts; Bob would owe $1 to some nebulous "the office". We'd get whoever's balance was lowest to do the order, which incentivised people to stay reasonably positive.

  12. Acetech Information, a leading software development company of India offers Software Development,Custom Software Development ,Website Design, website development , search engine optimization, ecommerce and website maintenance services for its customers around the globe.

  13. This comment has been removed by a blog administrator.

  14. OMG, that is an amazing story. Thanks.

  15. This comment has been removed by the author.

  16. This comment has been removed by a blog administrator.

  17. Great story, it is presently one of my most loved programming know more Israel Coffeel

  18. This comment has been removed by a blog administrator.

  19. Great post it helps me a lot, I'm impressed; Your idea is outstanding; the issue is something that not enough people are speaking intelligently about. I am pleased that I stumbled across this in my search for something relating to this.I also write a review here Keurig B60 Coffee Maker

  20. Nice blog, this blog provide the more information about coffee and its effects. Thank you so much for sharing with us.
    How to Upload App to Google Play

  21. I found this post while searching some information of google search. It is very informative post so please keep posting and updating information.

    Brand Development Company | Travel Portal Development | Software Development Solutions | Web Design Company in India | Mobile App Development Company

  22. I'm glad I found this web site, I couldn't find any knowledge on this matter prior to.Also operate a site and if you are ever interested in doing some visitor writing for me if possible feel free to let me know, im always look for people to check out my web site. cold brew coffee

  23. Very nice article, I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!. Medium roast coffee

  24. Nice its great..Amazing Thanks for the information everything is perfect and great..If you are looking for any of the services below click on the link..
    IT consulting services
    Forex trading software
    Bespoke software development company in London
    Money Transfer Software company

    I will also share them with others.

  25. Thanks for sharing the knowledgeable stuff to enlighten usno words for this amazing blog.. learnt so many things I recommend everyone to learn something from this blogger and blog.. I am sharing it with others also..
    Summer training in Lucknow
    SAP training in Lucknow
    SAP FICO training in Lucknow
    Python Training in Lucknow

  26. Amazing Article, thanks for sharing your story.
    Visit us for more stories-

  27. I have read many of your post and this post is wonderful.... all of your post are just awesome
    Please do visit my website hope you'll like it: Best Restraunt in Lucknow
    Best Tiffin service in Lucknow
    Best Tiffin Service
    Best Homemade Food

  28. Nice blog..! Thanks for posting useful information.You have provided an nice article,
    Please do visit my website hope you'll like it: Best nursery plants in Jaunpur
    Best nursery services
    Best Nursery plants
    Best Bagwani services

  29. Thanks for sharing this knowledgeable things by your blog. If you need website designing services, visit our website at Ogen Infosystem and get a responsive website design for you. We also provide digital marketing services, like- PPC, SEO, Facebook Marketing etc.
    Website Designing Company in Delhi