Course Outline
Day 1
Introduction
Meaningful and standardized naming conventions
- Names for packages, files, classes, voids, functions, and variables must reflect their purpose.
- Names should be easy to read.
- Names should be searchable.
- Consider the generated namespace: does it make logical sense?
Classes, objects, and data structures
- Distinguish between objects that perform actions and structures that merely hold data.
- Understand when and why to use data structures.
- Understand when and why to use objects.
- Explore Object-Oriented Design (OOD) and abstraction.
- The role and benefits of getters and setters.
- Prefer many small classes with small, focused voids and functions.
Effective commenting
- Identify the difference between good and bad comments.
- Learn how to write useful comments and disregard unnecessary ones.
Day 2
Functions
- Focus on one task per function.
- Keep functions small.
- Arguments: identifying good vs. bad practices.
- Avoiding unintended side effects.
Error handling
- Determine when to handle errors internally versus letting them propagate.
- If an exception is caught, understand what to do with it and why.
- Implementing custom error handling classes.
Code formatting: Strategies to improve code layout and readability.
Test-Driven Design (TDD): Open discussion of Uncle Bob’s philosophy that programs should adhere to TDD principles.
Requirements
This course has no specific prerequisites.
Testimonials (2)
The teacher addressed many relevant topics for clean coding with practical examples.
Ben van Oeveren - Movella
Course - Clean Code
I really liked that there were a lot of practical exercises in which you could put the learned immediately into action.