Modern programming, Clean code and Refactoring 2.0
TRAINING DESCRIPTION
This training is intended for developers and technical leads who want to adopt the practice of continuous refactoring.
Most commercial projects today rely on solutions that are developed over many years. Teams face challenges in working with legacy code and the eternal dilemma of what and how to refactor daily.
The topics covered in Techniques for Working with Code focus on how to write code that reads like a book and refactor complex systems.
Order dedicated trainingBASIC PROGRAM
- Module 1: Software Craftsmanship
- Module 2: Formulating Algorithms
- Module 3: Comments
- Module 4: Naming Conventions
- Module 5: Simplifying Methods
- Module 6: Method Composition
- Module 7: The Natural Order of Refactoring™
- Module 8: Exception Handling [optional]
- Module 9: Selected Topics in Unit Testing [optional]
DETAILED PROGRAM
Module 1: Software Craftsmanship
- Why clean code matters
- Simplicity, communication, and flexibility
- Technical debt
- Cost of poor code quality
- Efficiency in working with code
Module 2: Formulating Algorithms
- What does “code that expresses an algorithm” mean?
- Intentional vs. accidental complexity
- Translating algorithms into code
Module 3: Comments
- The purpose of comments
- Good and bad comments
- Legal comments
- Explanatory comments
- Explaining intentions
- Warnings
- TODO comments
- Reinforcing comments
- Secondary comments
- Unnecessary comments
- Redundancy
- Position markers
- Closing braces
- Commented-out code
- Non-local information
Module 4: Naming Conventions
- The importance of names
- Expressing intent in names
- Avoiding misinformation
- Highlighting differences
- Searchable names
- Prefixes
- Class names
- Method names
- Humor
- Analogies and puns
- Using context
- Names to avoid
- Length of names
Module 5: Simplifying Methods
- Method size
- Blocks and indentation
- Method responsibility
- Switch statements
- Descriptive names
- Number of arguments
- Command-Query Separation
- Exceptions
- Structural repetition
- McCabe’s Complexity Metric
- What and when to refactor
- Refactoring conditional expressions
- Introducing the Null Object pattern
Module 6: Method Composition
- Refactoring techniques:
- Extract Method
- Inline Method
- Inline Temp
- Replace Temp with Query
- Introduce Explaining Variable
- Split Temporary Variable
- Remove Assignments to Parameters
- Extract Method Object
- Substitute Algorithm
Module 7: The Natural Order of Refactoring™
- Different dimensions of refactoring
- Refactoring as a process
- Algorithm Formulation Technique
- Comment Utilization Technique
- Naming Technique
- Name Length Selection Technique
- McCabe Complexity Analysis Technique
- Method Decomposition Technique
- Test Recreation Technique
- Small Steps Technique™
- The Process of the Natural Order of Refactoring™
Module 8: Exception Handling [optional]
- Exceptions vs. return values
- Checked vs. unchecked exceptions
- Creating exception hierarchies
- Null reference handling
- Providing context
- Best practices for try-catch-finally structures
Module 9: Selected Topics in Unit Testing [optional]
- Exceptions vs. return values
- Checked vs. unchecked exceptions
- Creating exception hierarchies
- Null reference handling
- Providing context
- Best practices for try-catch-finally structures