The Importance of Clean Code

Speaker

Tetiana Platonova

Developer at

EthWorks

&

WarsawJS

volunteer

"The Importance of Clean Code" [EN]

2019-12-07

Agenda

  1. Why bother?
  2. Naming
  3. Functions
  4. Classes
  5. Comments
  6. TDD
  7. Team rules

Good, clean code is like a good book - it's easy to understand and a pleasure to read.

The Boy Scout Rule:

Leave the campground cleaner than you found it

Naming

Naming

Naming

Naming

Naming

Naming

Naming

Naming

Naming

Functions

Solution: Decompose!

Functions

Functions

Functions

Functions

Functions

            
                ❌
                console.log(e)
            
          
            
                ✅
                throw new Error(e)
            
          

Functions

Functions

DRY (Don't Repeat Yourself)

Classes

Comments

Comments

Comments

TDD

TDD

Team rules

Thank you!