Marcus Biel

Marcus Biel

Clean Code Academy | Evangelist
Java Clean Code Evangelist, International Speaker, Java Author, JCP Member, Director of Developer Experience at Red Hat, Proud husband and father.

Marcus is a Clean Code evangelist who has authored a series of video tutorials that focus on teaching others how to create the cleanest and most well-structured code possible. As a conference speaker, he shares his ideas on Java Clean Code development. Marcus is also an author, technical book reviewer and JCP member. In 2017, Marcus was named TOP 13 Java influencer worldwide by jaxenter.com. On his website Clean Code Academy, he offers comprehensive online training for Java Clean Coding.

All talks from Marcus

| TBD

Live Refactoring Session: Getting rid of dirty code

A typical refactoring situation: Untested legacy code, written in Java 5, 14 years ago. Without tests, we cannot touch the code, but without touching and understanding the code we cannot write tests. Chicken-and-egg problem! What to do?

In this live hacking, I will refactor a small Sudoku Brute Force Solver. The code is anything but bad, but its age shows. In short sections, we want to give the legacy code a rejuvenating treatment. In doing this, I want to introduce you to my personal approach when refactoring untested legacy code.

Among many other things, we will cover:

  • Code readability
  • Comments
  • General OO
  • Encapsulation
  • Coupling
  • Cohesion
  • Immutable Classes
  • Modern IO
  • Java 8 Streams

 

I recommend that you familiarize yourself with the Sudoku rules and check the original code beforehand:
https://github.com/fzoli/Sudoku/blob/master/src/java/sudoku/chan/SudokuSolver.java
https://github.com/fzoli/Sudoku/blob/master/src/java/sudoku/chan/Grid.java