Interesting interview with Ken Arnold (of JINI fame).
He opines “The best that people can reasonably hope for is to put forth an appropriate amount of effort and get a good design that is sufficient. Your design should do as little as it can to get the job done so you can add the right thing when you discover what that right thing is.”
Isn’t that a little too close to what the XP guys have been saying?
He goes on and says designing tools for programmers, including languages, APIs, and compilers, is a human factors problem.
Can’t disagree with that!
Any mistakes you can’t make impossible, you want to catch. In other words, first design such that improper things can’t even be written or expressed. They are impossible to do. Errors you can’t make impossible, you want to catch right away. So as soon as a user makes a mistake he or she is told.
Don’t give people a method that does something error-prone. Give them the method that allows them to do the subset that is not error-prone. Suppose you have a file object on which you can call open and close. You can only close an open file. You shouldn’t be able to call close on the file object, because it may not be open. The open method should return something on which you can invoke close.
Aha! Now he put in words what I’ve been thinking of, comforting reassurance.