Skip to content

zombiecodekill/HotDrinksMachine-Kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

HotDrinksMachine-Kata

Hot Drinks Machine Refactoring Kata

Welcome to the hot drinks machine.

This application has been lovingly created and maintained by Alan of AcmeHotDrinks Ltd for the past 20 years. Alan loves nothing more than to write his special code in his favourite editor, Notepad.

Unfortunately due to a recent management reorganization he was found to be surplus to requirements. Or he retired or won the lottery and moved to the Bahamas. The point is you are now in charge of this glorious 1990s webpage mascarading as a web application.

The main complaint from the users is that the status notifications should be timed in line with when the steps happen.

The correct timings are:

  • Boiling the water takes 10 seconds
  • Steeping the water in the tea takes 5 seconds
  • Pouring the tea/coffee/chocolate in the cup takes 4 seconds
  • Adding the so-called lemon juice takes 1 second
  • Brewing the coffee grounds takes 5 seconds
  • Adding sugar takes 1 second
  • Adding milk takes 2 seconds
  • Adding chocolate in the cup takes 2 seconds

The other major point of dissatisfaction is if the machine runs out of cups, the drinks are spilt on the floor. The hardware engineer says he is going to install a drip tray, but you may want to think of a better design when the machine is out of cups.

The customers have also requested some new features that were either never finished or never started by Alan.

They would like:

  • To make Latte coffee
  • To make Mocha coffee
  • To make Java coffee
  • To make Caffè macchiato
  • To make Cappuccino
  • To make Expresso coffee
  • To make English Breakfast Tea (with milk instead of lemon)
  • To be able to add sugar to the Tea
  • To be able to make coffee without sugar
  • To be able to make coffee without milk
  • To be able to refill the machine when it runs out of ingredients
  • The machine should be connected to a reliable power source so that the water heating element no longer runs out of power

There have also been a couple of suggestions made about the UI:

  • It would be great to see the full readout of steps without needing to keep clicking the OK button
  • To adjust the colours enough to stop the customers eyeballs from bleeding.

Finally, almost all of your customers have modern browsers, however Alan's brother Neville is very enamoured by Internet Explorer so the application will need to continue to support at least IE 11.

About

Hot Drinks Machine Refactoring Kata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages