"Clean Code" is one of the most used phrases in software engineering but is also one of the most misused. What does Clean Code mean, and what makes our code dirty or clean? The concept was popularized by Robert C. Martin or "Uncle Bob", and it is a set of practices that will help you write code that is easier to change, read and understand and less prone to mistakes or issues when it comes time to change or expand it. In this course, Gui Ferreira will teach you everything you need to know to start writing excellent C# code using the knowledge he gained after years of writing clean code professionally for big companies.
Welcome
What will you learn in this course?
Who is this course for and prerequisites
Why Clean Code is essential
The Boy Scout Rule
The Broken Windows Theory
The YAGNI principle
The KISS principle
The Principle of Least Surprise
What is Coupling?
What is Cohesion?
Readability vs Performance
Spotting Duplication
Writing Idiomatic code
Section Recap
Introduction
The impact of Naming
How long should a Name be
Naming Variables
Naming Booleans
Naming Methods
Naming Classes
Using Acronyms and Abbreviations
Section Recap
Introduction
Good and Bad Comments
Removing Historic Comments
Converting Comments to Code
Removing Formatting Comments
Replacing Comments with Tests
Section Recap
Introduction
Applying Indentation
Using Braces
Using Whitespace
Vertically Ordering a Class
Section Recap
Introduction
Writing Boolean Comparisons
Removing Double Negatives
Avoiding short-circuits
Avoiding Magic Numbers
Expressive Switch Statements
Section Recap
Introduction
Removing Nesting
Returning early
Using Guard Clauses
Applying the Single Responsibility Principle
Removing Flag Arguments
Parameter Order
Controlling the number of Parameters
Output Parameters
Working with collections
Section Recap
Introduction
Exceptions vs Error Codes
Writing the Try-Catch block
Providing Context with Exceptions
Section Recap
Introduction
Applying the Single Responsibility Principle
Segregating Interface
Writing Constructors
Removing Nested Classes
Converting anemic to rich objects
Primitive Obsession
Section Recap
Introduction
The Problem of Nulls
Creating Null Objects
Rewriting Null Returns
Section Recap
Introduction
The importance of Tests to Clean Code
Writing better assertions
Using the Act, Arrange, Assert structure
Replacing Mocks with real Objects
Using Test Data Builders
Using realistic test data
Section Recap
Introduction
Measuring code complexity
Using refactoring tools
Applying Standards with an editorconfig
Using a Spell Checker
Enforcing Code Quality
Section Recap
Refactoring Walkthrough
Conclusion
Course Info
Lifetime access
Add to Cart
Guilherme Ferreira, also known as Gui, is a Minimalist Software Craftsman, passionate about simplicity and continuous learning. Gui is a Microsoft MVP for Developer Technologies, a Tech Speaker, a YouTuber, and a .NET content creator. With over 15 years of experience in software development, Gui went from Startups to Tech Giants. Along his journey, he got to know several hats, including Software Engineer, Architect, CTO, and Developer Advocate, gathering a diverse and invaluable skill set.
More courses by Gui Ferreira© 2023 Dometrain. All rights reserved.