Course Overview
As a developer, you should be able to write code which works - of course!
A lot of developers write bad code nonetheless - even though the code works. Because "working code" is not the same as "clean code"!
This course teaches you how to write clean code - code that is easy to read and understand by humans, not just computers!
In this course, you'll learn what exactly clean code is and, more importantly, how you can write clean code. Because if your code is written in a clean way, it's easier to read and understand and therefore easier to maintain.
Because it's NOT just the computer who needs to understand your code - your colleagues and your future self needs to be able to understand it as well!
In this course, we'll dive into all the main "pain points" related to clean code (or bad code - depending on how you look at it) and you will not just learn what makes up bad code but of course also how to turn it into clean code.
Specifically, you will learn about:
Naming "things" (variables, properties, classes, functions, ...) properly and in a clean way
Common pitfalls and mistakes you should avoid when naming things
Comments and that most of them are bad
Good comments you might consider adding to your code
Code formatting - both horizontal and vertical formatting
Functions and how to limit the number of function parameters
How to write clean functions by focusing on "one thing"
How levels of abstraction help you split functions and keep them small
How to write DRY functions and avoid unexpected side effects
Avoiding deeply nested control structures with guards and by extracting functionality into functions
Errors and error handling as a replacement for if-statements
Objects & data containers/ data structures and why that differentiation could matter
Cohesion and how to write good (small!) classes
The Law of Demeter and why it matters for clean code
What the SOLID principles are and why they matter when it comes to writing clean code
Much more!
This course is a compilation of common patterns, best practices, principles and rules related to writing clean code.
In this course, you'll learn about a broad variety of concepts, rules, ideas, thoughts and principles and by the end of course, you'll have a good idea of what to keep in mind when it comes to writing clean code.
This is not a design patterns or general patterns course though - we will entirely focus on patterns, rules and concepts that help with writing clean code specifically.
All these concepts and rules are backed up by examples, code snippets and demos. And to ensure that you get the most out of this course, and you don't just learn a bunch of theory which you forget soon after, there also are plenty of challenges for you to apply what you learned!
This course uses Python, JavaScript and TypeScript for code examples but you don't need to know these languages to follow along and get a lot out of the course. In addition, the course does not focus on a specific programming style or paradigm (like functional programming, object-oriented programming etc) but instead covers general concepts and techniques which will always apply.
What are the course prerequisites?
Basic programming knowledge (no matter which language) is required!
You don't need to know any specific programming language or programming paradigm to follow along
NO prior experience with writing clean code is required
FAQ
FAQ area empty
Course curriculum
Chương 1 Getting Started 12 bài · 31 phút
- Welcome to the Course! Học thử 2:27
- What is "Clean Code"? Học thử 5:57
- Clean Code - Key Pain Points & How To Write Clean Code Học thử 3:31
-
How Is This Course Structured? 1:22
- Course Prerequisites Học thử 3:16
-
Clean Code & Strongly Typed Languages 2:31
-
About The Course Code Examples 2:04
- Join Our Learning Community! Học thử
- Functional, OOP, Procedural: The Course Concepts Always Apply! Học thử 1:29
-
Clean Code, Principles & Patterns & Clean Architecture 3:17
- Clean Code vs Quick Code Học thử 5:01
-
Module & Course Resources
Chương 2 Naming - Assigning Names to Variables, Functions, Classes & More 16 bài · 1 giờ 6 phút
-
Module Introduction 1:01
-
Why Good Names Matter 3:23
-
Choosing Good Names 4:03
-
Casing Conventions & Programming Languages 3:07
-
Naming Variables & Properties - Theory 3:48
-
Naming Variables & Properties - Examples 4:44
-
Naming Functions & Methods - Theory 2:36
-
Naming Functions & Methods - Examples 3:10
-
Naming Classes - Theory 1:56
-
Naming Classes - Examples 2:34
-
Exceptions You Should Be Aware Of 6:24
-
Common Errors & Pitfalls 7:50
-
Demo Time! 10:29
-
Your Challenge - Problem 1:11
-
Your Challenge - Solution 10:01
-
Module Resources
Chương 3 Code Structure, Comments & Formatting 10 bài · 32 phút
-
Module Introduction 1:06
-
Bad Comments 3:52
-
Good Comments 3:50
-
What is "Code Formatting" Really About? 2:26
-
Vertical Formatting 8:03
-
Formatting: Language-specific Considerations 2:03
-
Horizontal Formatting 3:36
-
Your Challenge - Problem 1:01
-
Your Challenge - Solution 6:19
-
Module Resources
Chương 4 Functions & Methods 20 bài · 1 giờ 45 phút
-
Module Introduction 1:12
-
Analyzing Key Function Parts 1:38
-
Keep The Number Of Parameters Low! 6:38
-
Refactoring Function Parameters - Ideas & Concepts 3:43
-
When One Parameter Is Just Right 2:12
-
Two Parameters & When To Refactor 4:07
-
Dealing With Too Many Values 4:26
-
Functions With A Dynamic Number Of Parameters 2:41
-
Beware Of "Output Parameters" 4:19
-
Functions Should Be Small & Do One Thing! 9:51
-
Why "Levels of Abstraction" Matter 6:11
-
When Should You Split? 2:51
-
Demo & Challenge 13:09
-
Stay DRY - Don't Repeat Yourself 2:03
-
Splitting Functions To Stay DRY 5:41
-
Don't Overdo It - Avoid Useless Extractions 6:51
-
Understanding & Avoiding (Unexpected) Side Effects 12:01
-
Side Effects - A Challenge 9:21
-
Why Unit Tests Matter & Help A Lot! 6:15
-
Module Resources
Chương 5 Control Structures & Errors 17 bài · 1 giờ 10 phút
-
Module Introduction 2:52
-
Useful Concepts - An Overview 1:22
-
Introducing "Guards" 2:53
-
Guards In Action 6:33
-
Extracting Control Structures & Preferring Positive Phrasing 3:17
-
Extracting Control Structures Into Functions 4:03
-
Writing Clean Functions With Control Structures 7:32
-
Inverting Conditional Logic 8:07
-
Embrace Errors & Error Handling 6:57
-
Creating More Error Guards 4:27
-
Extracting Validation Code 4:10
-
Error Handling Is One Thing! 3:35
-
Using Factory Functions & Polymorphism 8:56
-
Working with Default Parameters 1:14
-
Avoid "Magic Numbers & Strings"
-
Module Summary 3:37
-
Module Resources
Chương 6 Objects, Classes & Data Containers / Structures 15 bài · 1 giờ 20 phút
-
Module Introduction 1:42
-
Important: This is NOT an OOP or "Patterns & Principles" Course! 2:14
-
Objects vs Data Containers / Data Structures 4:10
-
Why The Differentiation Matters 3:57
-
Classes & Polymorphism 12:54
-
Classes Should Be Small! 6:20
-
Understanding "Cohesion" 4:49
-
The "Law Of Demeter" And Why You Should "Tell, Not Ask" 11:40
-
The SOLID Principles 2:05
-
The Single-Responsibility-Principle (SRP) & Why It Matters 7:04
-
The Open-Closed Principle (OCP) & Why It Matters 5:43
-
The Liskov Substitution Principle 5:56
-
The Interface Segregation Principle 4:18
-
The Dependency Inversion Principle 7:00
-
Module Resources
Chương 7 Summary & Checklist 1 bài · 9 phút
-
Concepts Summary & Checklist 9:05
Chương 8 Course Roundup 4 bài · 7 phút
-
Staying Clean! 2:56
-
Possible Next Steps 2:43
-
Course Roundup 0:55
-
Bonus!
Requirment
-
Basic programming knowledge (no matter which language) is required
-
NO prior experience on the topic of clean code is required
-
You DON'T need to know a specific programming language or paradigm
Outcomes
-
Learn how to write code which is readable and understandable
-
Keep code alive by increasing maintainability with clean code
-
Learn about key principles, rules and concepts that allow you to write clean code
-
Learn with hands-on examples and "bad to good code" transformations
0 Student
5 Courses
0 review