Understanding code written by someone else will always remain one of the toughest challenges for a programmer, whether adding features, fixing bugs or rushing to meet the deadlines. Therefore, the ultimate mark of professionalism is to respect your readers by writing simple, expressive code that is a pleasure to work with. But you can't get there without relentlessly improving your code by continuous refactoring.
After leading the development of 7 projects, coaching and training hundreds on this topic and consulting on many legacy systems, this webinar summarizes the essential refactoring moves that any developer should master.
This is the recording of a 3½ hours live webinar that took place in July 2020 with 48 attendees. The content is dense but spiced with jokes, analogies but also questions and answers from the audience.
During this webinar we covered some of the most important topics in refactoring:
- The Key Practices of Refactoring
- Split Variable to Improve Semantics
- Replace Temp with Query Function
- Pure Functions: definition and why they are good
- Guard Clauses and Early Returns
- Split Loop
- Living with Boolean Parameters
- Parameterize and Extract Method
- Util Methods to Value Objects
- Introduce Parameter Object
- Immutable Classes: how to design, and their benefits
What to expect?
We will refactor ten exercises, discussing every design decision, with pros and cons, risks, biases and expected evolution in time. The three sessions of live-coding will be spiced with thorough explanations of fundamental design concepts.
Throughout the session, all the code was regularly pushed to a git that you can download on your machine to inspect, test and hack it as you please. For best understanding, you can work the exercises in parallel, comparing your code with the remote branch anytime you loose track.
After following this workshop, you'll take away at least a dozen of key practical techniques that you can immediately apply to your day-to-day work.
Any developer looking to craft simple, elegant code, and able to read basic Java syntax. The content is interesting for any level, from the very junior to the most experienced senior. As a matter a fact, 44% of the live attendees had over 10 years of experience!
Your machine should be able to download from Maven Central, should have a Java 8+ SDK installed and a decent IDE. If you want to directly follow my actions, download and install IntelliJ Community Edition, as I occasionally used some of its specific features.
After purchase, you will be able to download the final code zipped together with the git history, allowing you to browse through the commits at your own pace.
If you want to get the best value out of this workshop, here are some prep resources: