Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Katas
  3. Tennis Refactoring Kata

Tennis Refactoring Kata

MITTypeScript

A refactoring exercise based on tennis scoring rules to practice improving existing code.

Visit WebsiteGitHubGitHub
816 stars1.4k forks0 contributors

What is Tennis Refactoring Kata?

Tennis Refactoring Kata is a practice exercise where developers refactor existing code that implements tennis scoring rules. It simulates a real-world scenario of taking over a colleague's work, with multiple flawed implementations to clean up while keeping tests passing. The goal is to improve code design and maintainability without altering functionality.

Target Audience

Software developers, coding bootcamp participants, and teams looking to practice refactoring techniques, code reading, and test-driven development in a controlled environment.

Value Proposition

It offers a safe, structured way to hone refactoring skills with fast, comprehensive tests and multiple starting points. Unlike generic exercises, it includes realistic design flaws and guided resources, making it ideal for learning through hands-on correction.

Overview

This is a Refactoring Kata based on the rules of Tennis

Use Cases

Best For

  • Practicing test-driven refactoring on a small, focused codebase
  • Learning to identify and fix common code smells like hard-coded values
  • Improving code reading skills with guided scanning exercises
  • Workshops or coaching sessions on software craftsmanship
  • Preparing for technical interviews that involve legacy code tasks
  • Team exercises to discuss code quality and refactoring strategies

Not Ideal For

  • Developers seeking a production-ready tennis scoring library for immediate integration
  • Teams focused on learning new programming syntax without prior codebase context
  • Projects requiring rapid feature development over code quality exercises

Pros & Cons

Pros

Multiple Implementation Variants

Includes several versions like TennisGame1 and TennisGame3, each with unique design smells, providing diverse practice scenarios for refactoring.

Comprehensive Test Suite

Fast-running tests verify correctness, enabling test-driven refactoring and ensuring no behavior changes during improvements, as highlighted in the README.

Realistic Work Scenario

Simulates taking over a colleague's incomplete work with billable hours, adding practical context to the refactoring exercise.

Guided Learning Resources

Offers video demos and exercises like 'Scanning for Code Smells' to build code reading and refactoring skills, as linked in the README.

Cons

Niche Problem Domain

Focused solely on tennis scoring logic, which may not directly apply to refactoring challenges in other business domains or complex systems.

Artificially Inserted Flaws

Deliberate errors like hard-coded player names are simplified and may not reflect the nuanced, emergent issues found in real legacy codebases.

Limited Setup Guidance

While tests are provided, the README lacks detailed instructions for environment setup in all languages, potentially hindering beginners.

Frequently Asked Questions

Quick Stats

Stars816
Forks1,380
Contributors0
Open Issues1
Last commit7 months ago
CreatedSince 2013

Tags

#code-smells#learning-tool#software-craftsmanship#test-driven-development

Links & Resources

Website

Included in

Katas3.1k
Auto-fetched 7 hours ago

Related Projects

The Quantum KatasThe Quantum Katas

Tutorials and programming exercises for learning Q# and quantum computing

Stars4,854
Forks1,247
Last commit1 year ago
Gilded Rose - Many languagesGilded Rose - Many languages

Starting code for the GildedRose Refactoring Kata in many programming languages.

Stars4,222
Forks6,010
Last commit2 months ago
Git katasGit katas

A set of exercises for deliberate Git Practice

Stars1,640
Forks1,073
Last commit3 months ago
RPG Game kataRPG Game kata

My list of code katas

Stars768
Forks235
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub