GithubHelp home page GithubHelp logo

palvarav / tennis-refactoring-kata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from emilybache/tennis-refactoring-kata

0.0 0.0 0.0 1.38 MB

Starting code for a Refactoring Code Kata on the Tennis rules

License: MIT License

C++ 9.47% Python 4.57% C# 3.79% Go 2.52% Java 5.03% JavaScript 5.98% Objective-C 3.87% OCaml 1.90% Perl 3.11% PHP 4.44% Ruby 2.62% Scala 2.98% Makefile 0.17% HTML 2.56% ABAP 6.27% Groovy 2.31% TypeScript 29.37% Swift 3.30% Kotlin 4.45% CMake 1.29%

tennis-refactoring-kata's Introduction

Tennis Refactoring Kata

Imagine you work for a consultancy company, and one of your colleagues has been doing some work for the Tennis Society. The contract is for 10 hours billable work, and your colleague has spent 8.5 hours working on it. Unfortunately he has now fallen ill. He says he has completed the work, and the tests all pass. Your boss has asked you to take over from him. She wants you to spend an hour or so on the code so she can bill the client for the full 10 hours. She instructs you to tidy up the code a little and perhaps make some notes so you can give your colleague some feedback on his chosen design. You should also prepare to talk to your boss about the value of this refactoring work, over and above the extra billable hours.

There are three versions of this refactoring kata, each with their own design smells and challenges. I suggest you start with the first one, with the class "TennisGame1". The test suite provided is fairly comprehensive, and fast to run. You should not need to change the tests, only run them often as you refactor.

If you like this Kata, you may be interested in my books and website SammanCoaching.org

Kata Description

Here is a description of the problem this code is designed to solve: Tennis Kata.

Questions to discuss afterwards

  • How did it feel to work with such fast, comprehensive tests?
  • Did you make mistakes while refactoring that were caught by the tests?
  • If you used a tool to record your test runs, review it. Could you have taken smaller steps? Made fewer refactoring mistakes?
  • Did you ever make any refactoring mistakes and then back out your changes? How did it feel to throw away code?
  • What would you say to your colleague if they had written this code?
  • What would you say to your boss about the value of this refactoring work? Was there more reason to do it over and above the extra billable hour or so?

tennis-refactoring-kata's People

Contributors

emilybache avatar codecop avatar objarni avatar hsegnitz avatar alexboly avatar jonasg avatar colindecarlo avatar balp avatar neppord avatar dependabot[bot] avatar paulroho avatar dertseha avatar ygrek avatar leider avatar ursmetz avatar ytyubox avatar pen-y-fan avatar matthiaslischka avatar luisrovirosa avatar devl avatar dvrensk avatar danipardo avatar junior-ales avatar lechus avatar leon19 avatar marcoemrich avatar garak avatar muldec avatar zeevallin avatar thomasdane avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.