GithubHelp home page GithubHelp logo

emilybache / yatzy-refactoring-kata Goto Github PK

View Code? Open in Web Editor NEW
102.0 5.0 315.0 964 KB

Starting code for a Refactoring Code Kata on the Yatzy rules

Home Page: https://youtu.be/SvcJKNF_nRQ

License: MIT License

C++ 14.94% C# 10.28% Java 12.30% JavaScript 8.85% Python 3.64% Ruby 3.20% Perl 3.85% Swift 4.97% TypeScript 4.08% PHP 5.08% Kotlin 4.46% Elixir 2.98% Clojure 3.79% Batchfile 0.03% CMake 1.98% C 2.83% Scala 3.46% Go 3.25% Rust 6.03%

yatzy-refactoring-kata's Introduction

Support this and all my katas via Patreon

Yatzy Refactoring Kata

There is a top code kata video explaining why you might want to try this refactoring kata. The original exercise was designed by Jon Jagger and is available in his Cyber-Dojo. See his blog post. I have changed it a little, so that the rules more closely match what I'm used to.

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

Kata Description

The problem that this code is designed to solve is explained here: Yatzy

Contributing to this Kata

Please do not send me your refactored solutions. I am however grateful for language translations and updates to dependencies.

I recently added new refactoring challenges to the Java version and I would appreciate translations of Yatzy2 and Yatzy3 in other languages.

Code Reading Practice

Test your code reading skills. Here is a description of what to do: Scanning for Code Smells. There are suitable lists of urls to open in some of the language subdirectories.

yatzy-refactoring-kata's People

Contributors

awehrung avatar balp avatar bmaland avatar codecop avatar daddyshortlegs avatar davidmohamedfr avatar dependabot[bot] avatar devl avatar dvrensk avatar emilybache avatar flepied avatar fredrikwendt avatar isidore avatar jcartwright avatar jonasg avatar jpchateau avatar leider avatar leon19 avatar marcoemrich avatar nagromc avatar neppord avatar oriolhub avatar pen-y-fan avatar rembane avatar sarcas avatar skillsforteams avatar superwese avatar voegelas avatar yaghmaie avatar ythirion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yatzy-refactoring-kata's Issues

Provided Ruby file fails tests for versions >= 2.7

The provided ruby code and accompanying tests won't pass for recent versions of Ruby.

$ ruby test_yatzy.rb
test_yatzy.rb:1:in `require_relative': --> ~/Yatzy-Refactoring-Kata/ruby/yatzy.rb
_5 is reserved for numbered parameters
    1  class Yatzy
>  86    def initialize(d1, d2, d3, d4, _5)
>  93    end
  256  end
.... # similar errors elided for brevity

This is because the provided file follows the convention of the original problem, and uses underscore number in variables names: _1, _2 etc.

Since Ruby 2.7 (released 2019), numbered parameters have been reserved in the language as default block parameters.

This means that, in order to get passing tests to start the refactor in currently supported versions of Ruby, you need to rename these variables.

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.