There are many brilliant refactoring katas out there (e.g. https://kata-log.rocks/), each aiming to expose the software crafter to various design decisions ranging from the tiniest change to extensive changes in design, that you ough to break in safe baby steps. However, these katas often lack that "feeling of reality" - you'd never expect to find code looking like that in a real-life project today.
The exercise I propose to you here is a raw (anonymized) code sample I recently saw at a client during a Clean Code workshop. No tests, no spec. We found ourselves discussing hours on that code, with very little need for more information, and I'd like to try it out with you folks.
Check the code out, and try to give it a run before the event:
https://github.com/victorrentea/kata-....
Topics on the menu:
Immutability
Split Loops
Reducing Cognitive Complexity
DRY principle
Abuse of FP-style coding without adopting the FP mindset
Command-Query separation
Naming
Coupling
Format: I will type and debate topics with the audience, asking you how to proceed further. So you'll be in control :)
Although the code is in Java, the discussion will be generally applicable to most languages (C#, PHP, TS, Kotlin..)
About the speaker (entertainer):
Victor Rentea is a Java Champion, Consultant, and Trainer writing code since 2006. His passion is Refactoring, Simple Design, and Unit Testing, about which he regularly talks at top conferences, but also to the Bucharest Software Craftsmanship Community that he founded. On victorrentea.ro you can find his blog, selection of his best talks, training curriculum, live masterclasses, and social channels.
Auf dieser Seite können Sie das Online-Video Live-Refactoring a realistic codebase mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Victor Rentea 01 Januar 1970 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 8,456 Mal angesehen und es wurde von 247 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!