Apply essential clean code principles, such as DRY, KISS, Law of Demeter, and SOLID. This course helps reinforce best practices through practical implementation and real-world examples.
Overview
Syllabus
- Unit 1: DRY (Don't Repeat Yourself) in Action
- Applying the DRY Principle in Calculating Averages
- Variable Extraction and PI Constant Refactoring in Circle Calculations
- Replace Temp Variables with Query Methods in Scala
- Unit 2: KISS (Keep It Simple, Stupid) Strategies
- Refactor for Simplicity and Readability
- Simplifying Leap Year Calculation
- Simplify Palindrome Checker Using the KISS Principle
- Unit 3: Law of Demeter: Limiting Object Interactions for Cleaner Code
- Adhering to the Law of Demeter in a Library System
- Refactoring for the Law of Demeter in a Food Delivery Service System
- Unit 4: Understanding and Implementing SOLID Principles
- Refactoring for Single Responsibility Principle in Scala
- Open/Closed Principle Refactoring for Product Pricing
- Implementing the Interface Segregation Principle in Scala
- Implementing Dependency Inversion Principle with Printers in Scala