Clean Code - Write Your Code Like An Author Writes A Story
**> [!INFO]-
topic: ๐งน Clean Code
links: SOLID Clean code in React
source: https://www.udemy.com/course/writing-clean-code/learn/lecture/23111090#overview
tags: #permanent-noteย #published
Last Modified:
=dateformat(this.file.mtime, "MMM. dd, yyyy - HH:mm")
Clean code is important to reduce the cognitive load to understand that code.
As a developer, you spend much time reading and understanding code. Because of this, it is essential to write code, that is easy to understand and not code that just works. Consider yourself an author, writing a story.
Your code should be readable, meaningful and precise, to reduce the cognitive load required by the reader to understand it. To achieve this, you should try to follow best practices and patterns, so that others can recognize these standards.
The common pain points for clean code are:
- naming
- variables
- functions
- classes
- structure & code formatting
- bad comments
- functions
- length
- parameters
- deep nesting in conditionals
- missing error handling
- classes & data structures
- missing distinction
- bloated clases