Wednesday, August 15, 2012

Less - The Path to Better Design

At the end of part one of @sandimetz's video Less - The Path to Better Design I think she misses an opportunity to bring in Single level of Abstraction.


Although Sandi focuses only on the function that prepares the bicycles, what we have at the highest level of her application is a todo list:

  1. plan trip
  2. prepare for trip
  3. go on trip


and preparing for trip may include more than just preparing the bicycles so, preparing for the trip is another level of abstraction or another todo list:

  1. send invitations
  2. prepare bikes
  3. prepare meals


It is interesting that the same message can be used twice, once to prepare the bikes and once to prepare the meals:

  1. mechanic.prepare_trip(self)
  2. chef.prepare_trip(self)


Sandi's presentation offers examples that are more usable and more concrete than any other I've seen.