MYCMT 2021-03
Four half-days: 10:00-13:30 PST (1800-2130 UTC)
About This Class
This interactive online class looks at the problems we encounter in our codebases, such as code that is hard to read and maintain, and designs that cause the code to be hard to understand and test. We look at finding messy code by their “smell”, and explore ways to tidy up those messes using refactoring. We use automated refactorings in tools like IntelliJ IDEA so that we can improve legacy code that isn't well-covered by existing tests. We finish with ways to improve the reliability of your code through well-written Unit Tests and Test-Driven Development.
See below for more details
Tickets Prices in USD
Schedule
March 8th, 2021
This is the first day of class, lasting 3 1/2 hours. Starts promptly at 10am PST (1800 UTC) and goes to 1:30pm PST (2130 UTC).
March 9th, 2021
This is the second day of class, lasting 3 1/2 hours. Starts promptly at 10am PST (1800 UTC) and goes to 1:30pm PST (2130 UTC).
March 10th, 2021
This is the third day of class, lasting 3 1/2 hours. Starts promptly at 10am PST (1800 UTC) and goes to 1:30pm PST (2130 UTC).
March 11th, 2021
This is the last day of class, lasting 3 1/2 hours. Starts promptly at 10am PST (1800 UTC) and goes to 1:30pm PST (2130 UTC).
Interested in future courses? Enter your Name and Email:
Additional Information
Prerequisites
You don't need to be a Java expert, but you will need to be able to read and write straightforward Java code as all exercises and code samples are in Java. Since we won't be using any complex Java libraries, if you know C#, you'll also be able to get a lot out of this class. For JavaScript/TypeScript you won't get as much as we'll lean a lot on automated refactorings that can't be easily done in JS/TS, however all of the concepts still apply to object-oriented code.
Class Format & Schedule
This is an online, real-time, interactive class taught through Zoom, starting at 10am PST (1800 UTC) for 3 1/2 hours (including breaks). The class is spread across 4 days to fit in your day, as well as provide lots of sleep cycles in between to improve your learning.
The Content
Code Smell: Long Method
- What they are, and a long look at the Long Method code smell.
- Exercise: find code smells
Refactoring & Testing
- What refactoring really is (and what it's not)
- Rules of refactoring
- Five modes of refactoring
- Revealing hidden design by continually applying Tiny Clarifications
Exercise: refactor away some code smells
Boundaries and refactoring at different levels
Tests and how they support refactoring
Exercise: run and examine tests
Primitive Obsession Code Smell
This code smell is often overlooked, but it's one of the most common code smells and refactoring away that smell (through encapsulation) is one of the most powerful ways to improve your code's design.
Exercise: identify and refactor Primitive Obsession.
Feature Envy Code Smell
Closely related to Primitive Obsession is the Feature Envy code smell. Once you solve Primitive Obsession by creating a new type, behavior elsewhere starts to look out of place. Feature Envy puts the behavior where it belongs.
Exercise: Encapsulate Collection
Refactoring Heuristics
A set of a dozen heuristics that you can apply to your code base to improve the readability of the code as well as the testability.
Test-First Thinking
Even when you can't do Test-Driven Development, learning the Test-First Thinking and the Two Test Questions make it easier to write testable code, even in a poorly tested codebase.
Good Unit Tests
What are good unit tests? How to decide what test to write first? And what tests do you write next?
Test-Driven Development
End with a taste of Test-Driven Development using the "Predictive TDD" cycle and get an understanding of TDD as a complete process, even for code not developed using TDD.
Parting Gifts
After the class is over, you will get:
- Copies of all slides
- Code shown and worked on during class
- Video recording of the entire class for your review
- Access to a private Discord community to ask questions