The FizzBuzz Kata Step-By-Step Using the Pseudocode Programming Process

Date Published: June 22, 2020

The FizzBuzz Kata Step-By-Step Using the Pseudocode Programming Process

For my second attempt at the FizzBuzz kata, I used the Pseudocode Programming Process.

I recently tried the FizzBuzz kata again, this time using the Pseudocode Programming Process described by Steve McConnell in Code Complete. The last time I tried this kata I used test-driven development instead.

  1. Open Terminal in VS Code, navigate to desired folder
  2. run dotnet new xunit to create project
  3. use code . to open that project
  4. Go to Ardalis's FizzBuzz Kata Instructions
  5. Create public class Formatter under the same namespace as the class UnitTest1 is declared under
  6. Create public string FizzBuzz(int input) in Formatter
  7. Write pseudocode in FizzBuzz

    1. See how I did this step here (note my first line of pseudocode here is unnecessary)
  8. Write code fulfilling the kata instructions

    1. Your pseudocode should be thorough enough that this step is fairly mechanical
    2. Leave your pseudocode as comments - it should be thorough and specific enough to serve as documentation (especially in such a simple program)
    3. See how I did this step here
  9. Write and run tests

    1. Use Act, Arrange, Assert
    2. For more in-depth descriptions of writing tests, read my previous step-by-step of the FizzBuzz kata
  10. Done!

    1. See my final code here

Thanks for reading! I hope you find this and other articles here at ilyanaDev helpful! Be sure to follow me on Twitter @ilyanaDev.

ilyanaDev

Copyright © 2021