DRY, Shy and Tell the Other Guy

It has been a little while since I’ve pulled out this article by the pragmatic programmers (Andy Hunt and Dave Thomas), Keep it DRY, Shy, and Tell the Other Guy.

I’m going to use this in the first week of teaching CS 1 students classes (in C++) for the first time. To me, the critical point is the “tell the other guy” part. The way they present it is the more useful of the OO metaphors. It isn’t calling a function on a object to achieve some goal. It is sending a message to some object, with apathy towards the details of how it is done.

I think this is the key to breaking from procedural programming and moving successfully towards object-oriented programming.