Coding Dojo Special: Legacy Code Kata "Expense Report" with Christian Hujer

Location image of event venue


A Coding Dojo is a practice group in which programmers get together to learn from each other by working on a programming challenge. They are there to have fun and to engage in deliberate practice in order to improve their skills.

About this Coding Dojo

The Kata of this Coding Dojo is based on the famous Expense Report example. It is a piece of Legacy Code which violates some of the SOLID principles. Because of that, the code resists the implementation of certain new requirements. We will discuss how the code resists these new requirements, and how to refactor the code safely to make implementing new requirements easier and safer.

The mob programming of the Coding Dojo will be done in Java. You can do the Kata in any of the following languages: C, Go, Java, or JavaScript. Bring your laptop and friends.

We will start with some bad code and cover the following topics:


- Setting the frame
- Present the Legacy Code
- Present the New Requirements
- Discuss how this Legacy Code resists the New Requirements
- Testing (this) legacy code
- Characterization testing.
- How this code resists testing.
- How to break the resistance.
- Understanding Maintainability Issues
- SRP violations
- OCP violations
- Refactoring the Code

The agenda is flexible. Following the flow of the audience will be regarded more important than sticking to the preset agenda.


Your facilitator is Christian Hujer. Christian is a non-dogmatic evangelist of good practices like XP, Clean Code, DevOps, TDD, and BDD. He's a seasoned developer with ~35 years of polyglot experience including Assembler, C, Golang, Java, JavaScript, and Perl. He has worked as developer, systems architect, and trainer, and regularly speaks at meetups and conferences. His experience ranges from microcontrollers (RFID and Smart Cards) to the cloud. He moved from Munich to Pune in India in 2012. In 2015, he founded Nelkinda Software Craft with the mantra "Better World through Better Software". With his team, he teaches developers how to write better software through training, coaching, and project participation.