Wednesday, July 15, 2009

Best class' description of all time

ConfigurationErrorsException class (.Net Framework) is described precisely this way: "The current value is not one of the EnableSessionState values". Very informative, to say the least. I think it's worth noting that this class is also not a Godzilla and not a Popsicle. Of course, we all make mistakes (I personally make dozens of them every day, and if it wasn't for TDD...), I'm just trying to stress the same old point: do not cipher your code, it's hard enough to read as it is. And misleading class' description can be nasty (although it's way worse to cipher names of classes).

No comments:

Post a Comment