Clean Code

Clean Code

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 6.5 Hours | 2.45 GB

Learn how to write readable, understandable and therefore maintainable code – step by step, in an example-driven way

As a developer, you should be able to write code which works – of course!

Unfortunately, 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 which 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 you’ll learn

  • 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
Table of Contents

Getting Started
1 Welcome to the Course!
2 What is Clean Code
3 Clean Code – Key Pain Points & How To Write Clean Code
4 How Is This Course Structured
5 Course Prerequisites
6 Clean Code & Strongly Typed Languages
7 About The Course Code Examples
8 Functional, OOP, Procedural The Course Concepts Always Apply!
9 Clean Code, Principles & Patterns & Clean Architecture
10 Clean Code vs Quick Code
11 Module & Course Resources

Naming – Assigning Names to Variables, Functions, Classes & More
12 Module Introduction
13 Why Good Names Matter
14 Choosing Good Names
15 Casing Conventions & Programming Languages
16 Naming Variables & Properties – Theory
17 Naming Variables & Properties – Examples
18 Naming Functions & Methods – Theory
19 Naming Functions & Methods – Examples
20 Naming Classes – Theory
21 Naming Classes – Examples
22 Exceptions You Should Be Aware Of
23 Common Errors & Pitfalls
24 Demo Time!
25 Your Challenge – Problem
26 Your Challenge – Solution
27 Module Resources

Code Structure, Comments & Formatting
28 Module Introduction
29 Bad Comments
30 Good Comments
31 What is Code Formatting Really About
32 Vertical Formatting
33 Formatting Language-specific Considerations
34 Horizontal Formatting
35 Your Challenge – Problem
36 Your Challenge – Solution
37 Module Resources

Functions & Methods
38 Module Introduction
39 Analyzing Key Function Parts
40 Keep The Number Of Parameters Low!
41 Refactoring Function Parameters – Ideas & Concepts
42 When One Parameter Is Just Right
43 Two Parameters & When To Refactor
44 Dealing With Too Many Values
45 Functions With A Dynamic Number Of Parameters
46 Beware Of Output Parameters
47 Functions Should Be Small & Do One Thing!
48 Why Levels of Abstraction Matter
49 When Should You Split
50 Demo & Challenge
51 Stay DRY – Don’t Repeat Yourself
52 Splitting Functions To Stay DRY
53 Don’t Overdo It – Avoid Useless Extractions
54 Understanding & Avoiding (Unexpected) Side Effects
55 Side Effects – A Challenge
56 Why Unit Tests Matter & Help A Lot!
57 Module Resources

Control Structures & Errors
58 Module Introduction
59 Useful Concepts – An Overview
60 Introducing Guards
61 Guards In Action
62 Extracting Control Structures & Preferring Positive Phrasing
63 Extracting Control Structures Into Functions
64 Writing Clean Functions With Control Structures
65 Inverting Conditional Logic
66 Embrace Errors & Error Handling
67 Creating More Error Guards
68 Extracting Validation Code
69 Error Handling Is One Thing!
70 Using Factory Functions & Polymorphism
71 Working with Default Parameters
72 Avoid Magic Numbers
73 Module Summary
74 Module Resources

Objects, Classes & Data Containers Structures
75 Module Introduction
76 Important This is NOT an OOP or Patterns & Principles Course!
77 Objects vs Data Containers Data Structures
78 Why The Differentiation Matters
79 Classes & Polymorphism
80 Classes Should Be Small!
81 Understanding Cohesion
82 The Law Of Demeter And Why You Should Tell, Not Ask
83 The SOLID Principles
84 The Single-Responsibility-Principle (SRP) & Why It Matters
85 The Open-Closed Principle (OCP) & Why It Matters
86 The Liskov Substitution Principle
87 The Interface Segregation Principle
88 The Dependency Inversion Principle
89 Module Resources

Summary & Checklist
90 Concepts Summary & Checklist

Course Roundup
91 Stying Clean
92 Possible Next Steps
93 Thanks & Goodbye!
94 Bonus!