KATA TIME™ - FizzBuzz and You!

Session 1 - Using Refactoring to Make a Better World

Today's Kata

Fizz Buzz

Fizz buzz is a group word game for children to teach them about division.

- Wikipedia

The goal of this kata is to take a number and return a String. The String will be the String representation of the given number's value, excepting multiples of 3 and 5, those numbers will be replaced with the values of Fizz and Buzz. Those replacements will stack together to form a longer String of FizzBuzz if the number is both a multiple of 3 and 5.

Tom Scott offers us some history to this kata and a great look at how you might approach solving this without TDD. So if you want to see how you can do this in a procedural way before jumping into doing it through TDD take a look: FizzBuzz: One Simple Interview Question

Today's Goals

  • Talk about being D.R.Y., Don't Repeat Yourself, and how to avoid the ROOT OF ALL EVIL, the ol' Copy and Paste, with refactoring.
  • Learning a little more about the importance of refactoring both your production code and your test code.
  • Introduction to the concept of High Level Concepts - Low Level Details in writing clean code.
  • Talk about writing code that embraces Grady Booch's idea of clean code reading like "well written prose".

    “Clean code is simple and direct. Clean code reads like well-written prose. Clean code never obscures the designer’s intent but rather is full of crisp abstractions and straightforward lines of control.

    - Grady Booch author of Object Oriented Analysis and Design with Applications”

Code Along Repo Link

Session Video

Session Code