by Michael S. Kaplan, published on 2006/08/15 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2006/08/15/700676.aspx
Developers always think they are right.
Especially when they are not.
I mean, if you asked any random English-speaking person if they had an ordered list of characters whether they would expect all of the following letters comes before B:
They would say of course. Even if they don't use any of these letters themselves, they all seem kind of A-ish, if you know what I mean. They would be shocked if you told them that any of these letters came after B, let alone if you told them that all of them come way after Z.
But if you are a software developer, and you are expecting a binary comparison, or worse yet that "not found in nature" case-insensitive binary comparison, you not only might have different expectations, but you will be annoyed as all get-out that the default did not not match your expectations. And that it was slower than the comparison that you wanted. And that there is no global way to change all comparisons to act the way you want them to. And that you would actually have to (gasp!) call a different function/method, or perhaps use a different flag, to make things behave the way you want them to.
(Their heads might explode if they ever got wind of those weightless strings, or if you explained to them What is up with number sorting!)
And of course, once you (the developer) convince yourself that you are right here, you take it off the deep end -- there should be an OrdinalCulture, and the documentation should make it perfrectly clear that the perf hit here is like 2x or worse for the inefficient default. And that their scenario is actually more common.
I have to wonder if their mothers would agree with them. Assuming their moms are not also engineers. :-)
These developers can just fix their code, in my opinion. And next time they can just RTFM and do their homework next time
I think it is another reason that I am better as a Technical Lead than as a developer. Because I am foolish enough to think that the linguistic behavior is more intuitive for more people....
Now of course this is all a bit overstated. And for every CS geek who thinks that binary comparisons make more sense, there was a Geoff or a Bryan or a Ben who was a developer who was rolling on the floor laughing as the thread that inspired this post unfolded throughout the day. Which is actually proof that there are developers who understand the intuitive behavior. :-)
This post brought to you by ẵ (U+1eb5, a.k.a. LATIN SMALL LETTER A WITH BREVE AND TILDE)
(A letter that either comes before B or way way after z, depending on how socialized you are!)
# Jeroen Vos on 15 Aug 2006 5:29 AM:
# Michael S. Kaplan on 15 Aug 2006 6:33 AM:
# Andrew West on 15 Aug 2006 8:47 AM:
# Michael S. Kaplan on 15 Aug 2006 9:26 AM:
# RubenP on 15 Aug 2006 5:23 PM:
go to newer or older post, or back to index or month or day