Pluralsight - Clean Code: Writing Code for Humans course notes part 1  

Resources #

Code Complete 2
Clean Code
The Pragmatic Programmer

Conventions #

  1. Comparisons vs Snippets
  2. Verbalize Code. Literal reading code

Three Principles for Clean Code

1) Right tool for the job: Less logic code required

Learn multiple paradigms for each unique problem.
Don’t be proud of hackery.
Understand the boundaries for the purpose of each language and framework.

Difference between styling, semantic markup ,logic and data storage.
By staying native, code becomes cached and loaded once.
The syntax colour highlighting within an IDE.
Project structure modularisation with files making code reusable as in a framework.
Build tools return no compilation, minifaction and catification errors.

2) High signal to noise ratio : Understanding the intent straight away.

TED Rule.
Terse - Non-wordy
Expressive - Intent
Do one thing
Don’t repeat yourself.

Many of the same principles as Relational DB Normalization.
Copying and pasting code gives a shape pattern within the code, this creates maintenance problems and can easily be refactored to reduce the amount of lines required implementing the logic.

3) Self-documenting: No in-line comments

Clear and expressive that it’s so obvious.
Navigating the intent of the programmer
Layers of abstraction: The solution can be modified and made better from a numerous number of points within the code
The reading experience is formatted to be easy on the brain
The code notation is literal for reading
We are writers


Now read this

Cucumber BDD notes

Feature to be added -> Optional Text: -As a -I want to -So that Feature:Brush teeth As a human being, I want to brush my teeth So that they stay pain free Scenario: Expected outcome title Steps within scenario Given: Sets up initial... Continue →