Writing Code for Humans course notes part 2 - Naming

Naming matters #

Classes #

“Is the class doing too much?

  1. It should be a noun
  2. It should be specific
  3. It should have a single responsibility
  4. Does having an instance of that class name make sense?

Methods #

"What does this logic attempt to accomplish?”

Just have them own a self explanatory description

Rubber Ducking #

That eureka moment by talking to yourself.


Rhetorical questions out loud provoke the subconscious.

 
1
Kudos
 
1
Kudos

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 →