I got the Gang of Four book on design patterns a couple of years ago and it was way beyond me (Alex Martelli at Google doesn’t suggest it as an introduction, I’ve since learned). I still haven’t mastered it, but every now and then I do find a useful idea.
Let me introduce you to the object-oriented idea of iterators.

