Mô tả

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 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

Bạn sẽ học được gì

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

Yêu cầu

  • 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

Nội dung khoá học

8 sections

Getting Started

13 lectures
Welcome to the Course!
02:27
What is "Clean Code"?
05:57
Clean Code - Key Pain Points & How To Write Clean Code
03:31
How Is This Course Structured?
01:22
Course Prerequisites
03:16
Clean Code & Strongly Typed Languages
02:31
About The Course Code Examples
02:04
Join Our Learning Community!
00:25
Functional, OOP, Procedural: The Course Concepts Always Apply!
01:29
Clean Code, Principles & Patterns & Clean Architecture
03:17
Clean Code vs Quick Code
05:01
Module & Course Resources
00:21
Course Setup
00:32

Naming - Assigning Names to Variables, Functions, Classes & More

16 lectures
Module Introduction
01:01
Why Good Names Matter
03:23
Choosing Good Names
04:03
Casing Conventions & Programming Languages
03:07
Naming Variables & Properties - Theory
03:48
Naming Variables & Properties - Examples
04:44
Naming Functions & Methods - Theory
02:36
Naming Functions & Methods - Examples
03:10
Naming Classes - Theory
01:56
Naming Classes - Examples
02:34
Exceptions You Should Be Aware Of
06:24
Common Errors & Pitfalls
07:50
Demo Time!
10:29
Your Challenge - Problem
01:11
Your Challenge - Solution
10:01
Module Resources
00:03

Code Structure, Comments & Formatting

10 lectures
Module Introduction
01:06
Bad Comments
03:52
Good Comments
03:50
What is "Code Formatting" Really About?
02:26
Vertical Formatting
08:03
Formatting: Language-specific Considerations
02:03
Horizontal Formatting
03:36
Your Challenge - Problem
01:01
Your Challenge - Solution
06:19
Module Resources
00:03

Functions & Methods

20 lectures
Module Introduction
01:12
Analyzing Key Function Parts
01:38
Keep The Number Of Parameters Low!
06:38
Refactoring Function Parameters - Ideas & Concepts
03:43
When One Parameter Is Just Right
02:12
Two Parameters & When To Refactor
04:07
Dealing With Too Many Values
04:26
Functions With A Dynamic Number Of Parameters
02:41
Beware Of "Output Parameters"
04:19
Functions Should Be Small & Do One Thing!
09:51
Why "Levels of Abstraction" Matter
06:11
When Should You Split?
02:51
Demo & Challenge
13:09
Stay DRY - Don't Repeat Yourself
02:03
Splitting Functions To Stay DRY
05:41
Don't Overdo It - Avoid Useless Extractions
06:51
Understanding & Avoiding (Unexpected) Side Effects
12:01
Side Effects - A Challenge
09:21
Why Unit Tests Matter & Help A Lot!
06:15
Module Resources
00:03

Control Structures & Errors

17 lectures
Module Introduction
02:52
Useful Concepts - An Overview
01:22
Introducing "Guards"
02:53
Guards In Action
06:33
Extracting Control Structures & Preferring Positive Phrasing
03:17
Extracting Control Structures Into Functions
04:03
Writing Clean Functions With Control Structures
07:32
Inverting Conditional Logic
08:07
Embrace Errors & Error Handling
06:57
Creating More Error Guards
04:27
Extracting Validation Code
04:10
Error Handling Is One Thing!
03:35
Using Factory Functions & Polymorphism
08:56
Working with Default Parameters
01:14
Avoid "Magic Numbers & Strings"
00:34
Module Summary
03:37
Module Resources
00:03

Objects, Classes & Data Containers / Structures

15 lectures
Module Introduction
01:42
Important: This is NOT an OOP or "Patterns & Principles" Course!
02:14
Objects vs Data Containers / Data Structures
04:10
Why The Differentiation Matters
03:57
Classes & Polymorphism
12:54
Classes Should Be Small!
06:20
Understanding "Cohesion"
04:49
The "Law Of Demeter" And Why You Should "Tell, Not Ask"
11:40
The SOLID Principles
02:05
The Single-Responsibility-Principle (SRP) & Why It Matters
07:04
The Open-Closed Principle (OCP) & Why It Matters
05:43
The Liskov Substitution Principle
05:56
The Interface Segregation Principle
04:18
The Dependency Inversion Principle
07:00
Module Resources
00:03

Summary & Checklist

1 lectures
Concepts Summary & Checklist
09:05

Course Roundup

4 lectures
Staying Clean!
02:56
Possible Next Steps
02:43
Course Roundup
00:55
Bonus!
00:06

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.