Clean Code
- Objectifs pédagogiques
- Sections du cours
- Avis
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
-
1Welcome to the Course!Leçon vidéo
-
2What is "Clean Code"?Leçon vidéo
-
3Clean Code - Key Pain Points & How To Write Clean CodeLeçon vidéo
-
4How Is This Course Structured?Leçon vidéo
-
5Course PrerequisitesLeçon vidéo
-
6Clean Code & Strongly Typed LanguagesLeçon vidéo
-
7About The Course Code ExamplesLeçon vidéo
-
8Join Our Learning Community!Leçon de texte
-
9Functional, OOP, Procedural: The Course Concepts Always Apply!Leçon vidéo
-
10Clean Code, Principles & Patterns & Clean ArchitectureLeçon vidéo
-
11Clean Code vs Quick CodeLeçon vidéo
-
12Module & Course ResourcesLeçon de texte
-
13Course SetupLeçon de texte
-
14Module IntroductionLeçon vidéo
-
15Why Good Names MatterLeçon vidéo
-
16Choosing Good NamesLeçon vidéo
-
17Casing Conventions & Programming LanguagesLeçon vidéo
-
18Naming Variables & Properties - TheoryLeçon vidéo
-
19Naming Variables & Properties - ExamplesLeçon vidéo
-
20Naming Functions & Methods - TheoryLeçon vidéo
-
21Naming Functions & Methods - ExamplesLeçon vidéo
-
22Naming Classes - TheoryLeçon vidéo
-
23Naming Classes - ExamplesLeçon vidéo
-
24Exceptions You Should Be Aware OfLeçon vidéo
-
25Common Errors & PitfallsLeçon vidéo
-
26Demo Time!Leçon vidéo
-
27Your Challenge - ProblemLeçon vidéo
-
28Your Challenge - SolutionLeçon vidéo
-
29Module ResourcesLeçon de texte
-
30Module IntroductionLeçon vidéo
-
31Bad CommentsLeçon vidéo
-
32Good CommentsLeçon vidéo
-
33What is "Code Formatting" Really About?Leçon vidéo
-
34Vertical FormattingLeçon vidéo
-
35Formatting: Language-specific ConsiderationsLeçon vidéo
-
36Horizontal FormattingLeçon vidéo
-
37Your Challenge - ProblemLeçon vidéo
-
38Your Challenge - SolutionLeçon vidéo
-
39Module ResourcesLeçon de texte
-
40Module IntroductionLeçon vidéo
-
41Analyzing Key Function PartsLeçon vidéo
-
42Keep The Number Of Parameters Low!Leçon vidéo
-
43Refactoring Function Parameters - Ideas & ConceptsLeçon vidéo
-
44When One Parameter Is Just RightLeçon vidéo
-
45Two Parameters & When To RefactorLeçon vidéo
-
46Dealing With Too Many ValuesLeçon vidéo
-
47Functions With A Dynamic Number Of ParametersLeçon vidéo
-
48Beware Of "Output Parameters"Leçon vidéo
-
49Functions Should Be Small & Do One Thing!Leçon vidéo
-
50Why "Levels of Abstraction" MatterLeçon vidéo
-
51When Should You Split?Leçon vidéo
-
52Demo & ChallengeLeçon vidéo
-
53Stay DRY - Don't Repeat YourselfLeçon vidéo
-
54Splitting Functions To Stay DRYLeçon vidéo
-
55Don't Overdo It - Avoid Useless ExtractionsLeçon vidéo
-
56Understanding & Avoiding (Unexpected) Side EffectsLeçon vidéo
-
57Side Effects - A ChallengeLeçon vidéo
-
58Why Unit Tests Matter & Help A Lot!Leçon vidéo
-
59Module ResourcesLeçon de texte
-
60Module IntroductionLeçon vidéo
-
61Useful Concepts - An OverviewLeçon vidéo
-
62Introducing "Guards"Leçon vidéo
-
63Guards In ActionLeçon vidéo
-
64Extracting Control Structures & Preferring Positive PhrasingLeçon vidéo
-
65Extracting Control Structures Into FunctionsLeçon vidéo
-
66Writing Clean Functions With Control StructuresLeçon vidéo
-
67Inverting Conditional LogicLeçon vidéo
-
68Embrace Errors & Error HandlingLeçon vidéo
-
69Creating More Error GuardsLeçon vidéo
-
70Extracting Validation CodeLeçon vidéo
-
71Error Handling Is One Thing!Leçon vidéo
-
72Using Factory Functions & PolymorphismLeçon vidéo
-
73Working with Default ParametersLeçon vidéo
-
74Avoid "Magic Numbers & Strings"Leçon de texte
-
75Module SummaryLeçon vidéo
-
76Module ResourcesLeçon de texte
-
77Module IntroductionLeçon vidéo
-
78Important: This is NOT an OOP or "Patterns & Principles" Course!Leçon vidéo
-
79Objects vs Data Containers / Data StructuresLeçon vidéo
-
80Why The Differentiation MattersLeçon vidéo
-
81Classes & PolymorphismLeçon vidéo
-
82Classes Should Be Small!Leçon vidéo
-
83Understanding "Cohesion"Leçon vidéo
-
84The "Law Of Demeter" And Why You Should "Tell, Not Ask"Leçon vidéo
-
85The SOLID PrinciplesLeçon vidéo
-
86The Single-Responsibility-Principle (SRP) & Why It MattersLeçon vidéo
-
87The Open-Closed Principle (OCP) & Why It MattersLeçon vidéo
-
88The Liskov Substitution PrincipleLeçon vidéo
-
89The Interface Segregation PrincipleLeçon vidéo
-
90The Dependency Inversion PrincipleLeçon vidéo
-
91Module ResourcesLeçon de texte