: Expert Talks Bengaluru: Coding Dojo: Refactoring Legacy Code to Clean Code
What's a Coding Dojo?
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 (exercise) of this Coding Dojo is based on the Expense Report example made famous by Robert "Uncle Bob" C. Martin. It is a piece of legacy code that violates some of the SOLID principles. Because of that, the code resists the implementation of a certain set of new requirements. We will discuss how the code resists these new requirements, and how to refactor the code safe-guarded by characterization tests to make implementing new requirements easier and safer.
The mob programming of the Coding Dojo will be done in Java. Attendees can do the Kata in any of the following languages: C, C#, C++, Go, Java, JavaScript, or Kotlin. Bring your laptop and friends.
We will start with some bad code and cover the following topics:
Agenda
- 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.
Facilitator
Your facilitator is Christian Hujer. Christian is a pragmatic 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, Kotlin, and Perl. He has worked as developer, systems architect, trainer, coach, and mentor, 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 Software, Better World
. With his team, he teaches developers how to write better software through training, coaching, and project participation.