How interpersonal relationships work…explained in programming

Just a quick blurp…I’m supposed to be slaving away right now!

Reading: PRACTICAL OBJECT-ORIENTED – DESIGN IN RUBY

In there they explain that:

Trip has now relinquished a great deal of responsibility to Mechanic. Trip knows that it wants each of its bicycles to be prepared, and it trusts the Mechanic to accomplish this task. Because the responsibility for knowing how has been ceded to Mechanic, Trip will always get the correct behavior regardless of future improvements to Mechanic.
When the conversation between Trip and Mechanic switched from a how to a
what, one side effect was that the size of the public interface in Mechanic was drastically reduced.

The author talks about how beginning programmers are very structurally oriented.  IE:

  • They know what each object/person knows
  • They know how each object/person does their tasks
  • They tell each object/person when to do their tasks

I think in the real world – we call this micro managing someone.  The only conditions in which this tends to work well is when someone doesn’t know how to do something.  Otherwise it’s sub optimal.  The author even talks about how objects need to trust each other to accomplish their tasks, instead of trying to control each other or micro manage every step.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s