Giter Club home page Giter Club logo

kasdihacene / expensereport Goto Github PK

View Code? Open in Web Editor NEW

This project forked from christianhujer/expensereport

0.0 0.0 0.0 276 KB

The ExpenseReport legacy code refactoring example in various languages

C 3.19% Makefile 9.38% C# 5.11% C++ 3.42% Go 3.07% Java 17.76% JavaScript 4.26% Kotlin 3.38% Python 4.04% Rust 3.27% Shell 1.67% TypeScript 7.08% Swift 5.95% PHP 3.59% Dart 4.91% Scala 3.27% Clojure 3.93% Pascal 3.07% Fortran 5.64% XSLT 3.98%

expensereport's Introduction

ExpenseReport

The ExpenseReport legacy code refactoring kata in various languages.

This is an example of a piece of legacy code with lots of code smells. The goal is to support the following new feature as best as you can:

  • Add Lunch with an expense limit of 2000.

Process

  1. ๐Ÿ“š Read the code to understand what it does and how it works.
  2. ๐Ÿฆจ Read the code and check for design smells.
  3. ๐Ÿง‘โ€๐Ÿ”ฌ Analyze what you would have to change to implement the new requirement without refactoring the code.
  4. ๐Ÿงช Write a characterization test. Take note of all design smells that you missed that made your life writing a test miserable.
  5. ๐Ÿ”ง Refactor the code.
  6. ๐Ÿ”ง Refactor the test.
  7. ๐Ÿ‘ผ Test-drive the new feature.

Supported Languages

The ExpenseReport example currently exists in the following languages:

Planned languages

(in no particular order and with no guarantee)

  • Ada
  • D
  • Eiffel
  • Elixir
  • Elm
  • Erlang
  • Haskell
  • Julia
  • Logo
  • Modula-2 (once the linker starts working again)
  • Oberon
  • R

Languages explicitly not planned

  • Brainfuck
  • Malbolge
  • Whitespace

Solutions

To see solutions, switch to the branch solutions.

Warning The solutions branch will be rebased!

Credits

I first encountered the ExpenseReport example during a bootcamp at Equal Experts. I also have seen the ExpenseReport example being used by Robert "Uncle Bob" C. Martin. I have tried to research its origins but so far I have failed. If you know who has first come up with this example, please get in touch with me.

expensereport's People

Contributors

christianhujer avatar kasdihacene 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.