This is a prospective session, not a definite session, and there are two reasons for that. First, I have a feeling that my treatment of the C++0x memory model may run longer than a single session, and if that’s the case, I’ll give just that talk and the one on perfect forwarding. There won’t be time for anything else.
Second, when I announced C&B 2011 in February, I pretty much promised new talks, and this talk isn’t new. (Technically, none of us promised new talks, we said it was a goal. We chose our wording carefully, because we wanted to retain the flexibility to, you know, weasel out of what appeared to be a guarantee :-|.) The material for this prospective talk is taken from my seminar, Better Software—No Matter What, and a very small part of it appeared in 97 Things Every Programmer Should Know. A somewhat larger (but still quite abbreviated) subset came out in the IEEE Software column I wrote in 2004. If you’ve read 97 Things or the IEEE Software column, you’ll be familiar with only some of many points I make in the talk. If you’ve seen the Better Software presentation, you’ll recognize the material (though perhaps not in its current form, because I update it on an ongoing basis).
If you feel that my giving this new-to-C&B-but-not-to-the-world talk would diminish your experience at C&B, let me know, and I’ll replace it with something truly new. (If you’d prefer to lodge your objection indirectly, feel free to write Lisa. She’ll forward your comment to me after stripping off identifying information.) I’d prefer to give the talk (if time allows), because I think the material in it is both relevant and important to practicing C++ developers.
With that said, the talk itself explains why I think that the single most important design guideline is to make interface easy to use correctly and hard to use incorrectly. I use “interfaces” in its general form, so the talk isn’t about user interfaces or command line interfaces or class or library interfaces, it’s about all those things. It addresses both syntactic elements (e.g., what do interface users have to type or click on, etc.) as well as semantic ones (e.g., the meanings of words, labels, messages, etc.), and it gives lots of examples of how things can go wrong. It further explains how to go right, offering a number of specific guidelines about how interfaces can be designed to make it easy for their users to do the right thing (i.e., achieve what they want to achieve) and hard for them to do the wrong thing (i.e., fail to achieve their goals). If you’ve ever wondered about the C++ Standard Library having an algorithm called
binary_search that isn’t guaranteed to run in logarithmic time, about Windows having you click on
Start if you want to stop your computer or MacOS having you put things in the trash as a way to eject them, about good and bad parameter passing conventions, or about ways to design powerful interfaces that limit the likelihood of user errors, this talk is for you.