The Clean Code Workshop
The purpose of this course is to help developers write elegant, clean code.
Meaning expressive, simple code that is also flexible and testable. The course is a mix of theory, discussions and hands-on exercises designed to teach developers practical techniques they can immediately apply to real-world projects.
Why this workshop?
“Simplicity is the ultimate sophistication”, said Leonardo da Vinci. There is nothing more difficult than solving a complex problem with simple code that is easy to understand, change and maintain by anyone. It’s hard.
Clean Code requires social interaction to understand what’s “simple”; knowledge of design principles; mastery of your tools (IDE); creativity to envision a different, simpler solution; plus the desire and courage to play, to try out various ideas, but still the awareness and humility to know when to revert. Most of these skills are emotion-bound. That’s why it’s so hard.
This training will provide rules, guidelines, tips, best practices and advices to enforce these aspects in the participants via examples, analogies, real stories, and live-coding examples. All fine-tuned in dozens of trainings in Software Engineering teams of all imaginable profiles.
You will meet the vast majority of the code review discussions you had at work, many of the design debates you had, as well as odors that you couldn’t name at that time. All carefully dissected to provide strong arguments, clear pros/cons and typical tradeoffs. Many ideas are backed by reference books like the Clean Code book by Uncle Bob, Refactoring 2nd edition by Martin Fowler, Design Patterns, Extreme Programming, Pragmatic Programmer and many other powerful titles.
You should attend to this workshop if you want to:
• Write clean code that is simple, expressive, yet flexible and testable
• Become fluent in the principles and guidelines of simple code
• Understand what coding style is perceived as “simple” by most developers
• Upgrade your refactoring skills to bend the code with ease
• Learn to use IntelliJ IDEA or Eclipse to its full power
By taking turns at the keyboard to work out a classic Refactoring Coding Kata, you will learn how to:
• Attentively read code and detect code smells
• Rehearse a reflex-refactoring style
• Perform tiny, safe refactoring steps
• Use the main automatic refactoring actions in your IDE
• Extract a variable, method, class; inline; plus many other
This is one of the most wanted (and most refined) topic from Victor’s training curricula. Hundreds of developers in dozens of teams and companies have followed this training until now, leading to successive refinement and adjustments to reflect the ‘common opinion’ of what simple, clean code means.
What will you learn?
- Economics of code, time and emotions
- Common refactoring stoppers and typical solutions
- Motivational techniques for yourself and others
- The Hat Metaphor: three attitudes you must learn to use towards your code
- Refining expressive names
- Name length and Consistency
- Comprehension Refactoring
- Single Responsibility Principle, applied
- Living with tiny functions
- Signature: booleans and Optionals<>, exceptions
- Design options for reducing the number of parameters
- Side effects and Command-Query Separation principle
- Early Return refactoring and Cognitive Complexity
- Extract Method Object refactoring
- True Object-Oriented Design, Demeter’s Law
- Data Structures, Immutability and Functional Programming
- Function Containers and Procedural Paradigm
- Mixing the three paradigms together
- Comments and Formatting:
- Writing expressive code instead of comments: an example
- Good Comments
- Bad Comments
- Life-saving Comments
- Coding Dojo – hands-on Refactoring Kata:
(trainees taking turns at the keyboard)
- Switch vs Polymorphism
- The 3 Hygiene Rules of the Switch
- Feature Envy
The training is a mix of slides, discussions, live-coding explanations plus a collaborative exercise (taking at least 1/3 time).
Victor is one of the top technical trainers in Bucharest, well-known for the passion he dedicates to every minute of his classes. His training experience is impressive: he trained 1.5K+ developers over 300 days of in-house sessions held at dozens of companies throughout Europe. Today, he is regularly called by companies of all sizes to help bringing Software Craftsmanship ideology and eXtreme Programming practices to their technical culture.
After 15 years of professional career, Victor is also a Lead Architect at IBM, where he is crafting code and coaching others every day. He is Associate Professor at Politehnica University (UPB) and founder of Bucharest Software Craftsmanship Community in which he runs monthly free webinars. Victor has become internationally renowned by his passion for Clean Code and is now frequently invited to speak at many conferences around the world. His personal commitment is to grow in developers their passion for code.
Who is it for?
Enthusiast developers that have:
• At least several years of experience with Java
• Prior contact with Legacy Code is recommended, but not required
• Basic understanding of Java 8 lambdas and streams (nice to have)
• A sense of code esthetics (appreciate ‘beautiful code’)
A personal laptop with your favorite IDE, JDK 8+, working Maven (connected to central) and Git. You will be asked to clone a repository several days before the workshop.
Java Champion & Independent Technical Trainer