Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Perth Code Dojo 2

Perth Code Dojo 2

Checkout

William Webster

September 26, 2014
Tweet

More Decks by William Webster

Other Decks in Programming

Transcript

  1. Check-In ➔ Your name ➔ What you do (at work)

    ➔ A random fact about yourself
  2. Code Dojo Format A Coding Dojo is a coding session

    centered around a programming challenge. The dojo provides a safe place to learn and experiment away from the pressures of business delivery. All programmers of varying skill levels meet as equals to learn and share.
  3. Software Craftsmanship “Deliberate practice is closely related to the attained

    level of performance of many types of experts” - Dr. K. Anders Ericsson 10,000 hrs rule - Malcolm Gladwell
  4. Pomodoro ➔ Pomodoro Technique ◆ 25 mins on, 5 mins

    off ◆ http://tomatoi.st/perthcodedojo ➔ Four iterations
  5. Retro & Pizza Closing with Pizza and a mini retrospective

    ➔ Share solutions on the big screen ➔ Discuss challenge / approach ➔ Feedback on the dojo
  6. Supermarket Checkout Implement a check out that handles the following

    items and returns a running total Product Cost Special Apples 50 cents Buy 2 get 3rd free Cherries 5 dollars Mangos 3 dollars
  7. Objective Make the checkout be extendable. So it can handle

    multiple discount and be flexible for the future.
  8. Scenario 1 Implement a check out that handles the following

    items and returns a running total Product Cost Special Apples 50 cents Buy 2 get 3rd free Cherries 5 dollars Mangos 3 dollars
  9. Scenario 2 Buy 3 cherries and save 7.50 Product Cost

    Special Apples 50 cents Buy 2 get 3rd free Cherries 5 dollars Buy 3 save 7.50 dollars Mangos 3 dollars
  10. Scenario 3 20 % off Cherries Bonus: Apply a 80%

    discount. What happens to your total balance?
  11. Mini Retro How did you find the exercise? What did

    you learn? Share your solution!