Hello Rob,
However I'm more interested in different takes on your final comment, "..., you must know your audience...".
Yes, this is one of the most important lessons I've learned the last decade or so.
I do struggle with this one at work sometimes - I'm generally inclined to write the kind of code you present, because it's good code, because it's the right solution, and because to do otherwise would be condescending and patronising to my colleagues. However, I sometimes find myself criticised for writing overly complex code, and by extension for not being a team player.
Any thoughts?
The code I presented can only be thought of as good code if programmers who need to understand it also know about: * STL (beyond spelling std::list) * Boost.Iterator * Boost.Function * Boost.Bind When my peers think I write overly complex code they are always right. There are two probable reasons: 1) I write overly complex code. 2) I'm wielding tools (in the language, libraries, or in the domain model) that are currently beyond them. The great opportunity here is to teach my peers about the tools I'm using. Or, if I find that there are no such tools, realize that I've written overly complex code and simplify it. Bjorn Karlsson www.skeletonsoftware.net