Code Katas with PHPSpec
If martial artists use kata as a method for exercise and practice, what might be the equivalent for coders, like us? Well, code katas are short, repeatable programming challenges, which are meant to exercise everything from your focus, to your workflow.
This Series Has Been Archived
You are viewing an archived course. Some of the concepts in this video may no longer be relevant in 2026.
Progress
Series Info
- Episodes
- 7
- Run Time
- 2h 36m
- Difficulty
- Intermediate
- Last Updated
- Nov 11, 2015
- Version
- Latest
Series Episodes
- Episodes (7)
Prime Factors
In the first episode in our "Code Kata" series, we'll tackle the prime factors challenge. We must use TDD to build a class that will compute the prime factors for any given number.Roman Numerals
In our next practice session, we need to build a class that will automatically translate a number into its roman numeral counterpart. As with the previous episode, we'll use TDD and PHPSpec to drive this process.Bowling Game
In this code kata, we need to recreate the scoring system for a game of bowling. Does that sound tough? How do we deal with scoring spares, or strikes, or multiple strikes!? Well, if we use TDD to work toward our goal, it shouldn't be too tough. Let's dig in.String Calculator
In this Kata, we need to build a string calculator class; however, there are a number of rules and gotchas related to how we perform the addition. Using PHPSpec once again, let's tackle this challenge.Tennis Scoring
Let's tackle the tennis scoring kata. If you're familiar with the game, you'll know that the rules can be a bit tricky. As such, this will make for a great exercise!FizzBuzz
Now that you've worked your way through a number of code kata challenges, let's review the obligatory FizzBuzz exercise, and learn just how easy it is to solve.Small Refactors and the Gilded Rose
View the slightly altered setup and solution (see second branch) for this lesson on GitHub.
