- One of the advantages of value objects is that you can use
- I WAS ABLE TO FUNCTIONAL THINGS TODAY YEAH FAST TESTS
Arel is sometimes overkill. You can do this:
correct_answers .select("match_answers.*, match_questions.point_value") .joins("LEFT JOIN match_questions ON match_questions.id = match_answers.match_question_id") .map(&:point_value).reduce(:+)
- Do that if you need to get something from
match_answer belongs_to :match_questions.
- Prefer the simple over the complex. Ex: keyword arguments over positional arguments.
- First iteration, is it possible to split things into system?
- The thing when that we should use to connect systems and programs are data. Use maps or hashes up front.
- You have to separate simplicity and ease, and try to figure out where there are entanglements or complecting things that you introduced.
- Do not lean on your tools, tools will not do this for you. Not all things in a language are useful.
- We need to deal with complexity. We need to keep it to a minimum.
- Simplicity enables change.
https://www.youtube.com/watch?v=Lb6AFi36n3M Reading [rspec-expectations](http://rspec.info/documentation/3.5/rspec-expectations/) – do expect(actual).to contain_exactly(individual, items) when comparing array compositions (expect(actual).to match_array(expected_array)) The values in it in RSpec...