Course Outline
Day 1
Introduction
Adopting Standardized Naming Conventions
- Names for packages, files, classes, methods, and variables should be meaningful and derived from their purpose.
- Names must be readable.
- Names must be searchable.
- Consider the namespace: does it make sense in context?
Classes, Objects, and Data Structures
- Distinguish between objects that perform actions and structures that merely hold data.
- Understand when to use data structures and why.
- Understand when to use objects and why.
- Object-Oriented Design (OOD) and abstraction.
- Usage of getters/setters and their rationale.
- Prefer many small classes, each with focused methods and functions.
Writing Effective Comments
- Differentiate between good and bad comments.
- Learn how to write effective comments and disregard unnecessary ones.
Day 2
Functions
- Each function should do one thing.
- Keep functions small.
- Handle arguments effectively (distinguish between good and bad practices).
- Avoid unintended side effects.
Error Handling
- Determine when to handle errors directly versus letting them bubble up.
- If an exception is handled, understand what to do with it and why.
- Utilize custom error handling classes.
Code Formatting: Strategies for improving code formatting.
Test-Driven Design: Open discussion on Uncle Bob's concept that programs should be developed using Test-Driven Development (TDD).
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.