14-01-2022

162 words 1 minute
  • Helped Hoom'n with methods in chapter 8

  • How could I have made that better? disliked the "I'm rspec with my todos-array and input string"

  • I should have explained that rspec.rb is another, seperate and distinct, ruby programme

  • How is Teacher teaching, and what can I learn from their teaching style?

p'ing a class

  • will return it's memory address, and it's state (variables within initialize method)

Cohesion

  • the degree to which the elements inside the module belong together

Class naming

  • try to be clear and appropriate

state

  • use initialize, which is called on instantiation of the class

Naming is hard - a la Ursula K le Guine

advice - people are confused by how rspec is interacting with their programme - kind of like

advice - you have chosen the right language - Ruby is similiar to Smalltalk and to Lisp

Ruby class convetion

  • 1 file per class
  • filenamed after that class
  • lowercase name
  • 'human.rb', 'dog.rb', etc

programme car.rb

  • class engine.rb
  • class steering-wheel.rb
  • class user-interface.rb