Wednesday, November 26, 2008

Wrapping 3rd Party Code Is Clean Code Crafty

The Clean Code book by Robert C. Martin has great points about system boundaries. In chapter 8 titled Boundaries and in the section called Using Third-Party Code, the book shares why and how to wrap 3rd party code.

Points For Why To Wrap Third Party Code (page 115):
  1. The third party code can evolve
  2. Your wrapper's interface can be made to precisely suit your application's needs
Like the book says on page 115, "If you use a boundary interface like Map, keep it inside the class, or close family of classes, where it is used."

That's huge! I also like the "Sensors" class example which has a method that will give you a "Sensor" class. Sensors giving you a Sensor, implies a naming rule-of-thumb which I also like.

Saturday, November 1, 2008

Pair Programming - Pair Share Feedback

I discovered that the most satisfying pair programming experience is when the following cycle happens:
  1. Pair
  2. Share
  3. Feedback
Pair - You do the work. You Pair Program.

Share - I share or my partner shares knowledge. Beyond sharing while pairing, this can be additional followup information. Most recently, this was in the form of a follow up email from me with resources.

Feedback - Feedback on the knowledge and the pair programming experience itself is exchanged.

Pair, Share, Feedback. Yes!