tags:

views:

74

answers:

3

I can remember Convert class in .net which is named not in accordance with the guide lines. Any more examples?

+2  A: 

In Java, java.lang.System.arraycopy - note the lowercase second c.

Also NullPointerException in Java is better as NullReferenceException in .NET.

AppDomain violates the convention of normally not using abbreviations.

Control.ID violates the explicit convention of Pascal-casing ID to "Id" and Camel-casing it to "id".

EDIT: Due to popular demand, a couple more... although they're more just badly named than convention-defying.

SortedList in .NET - that explains what the implementation is, but doesn't give the correct impression about what the API is - that of a dictionary.

Type.MakeGenericType - it makes a constructed type. Ditto MethodInfo.MakeGenericMethod.

Jon Skeet
good. skeet i think u can list many more, come on :)
suhair
+1 on the second. When I first learned java, I was told to forget about pointers. Then I had one of these popping up. So, Java does have pointers after all.
chris
A: 

java.util.Hashtable

If it's HashSet, and HashMap, then it should be HashTable.

Not a violation of the guidelines, but I've always hated: UndoableEdit

My mind seems to parse that as Un(doable) edit, meaning an edit that can't be done rather than the correct interpretation of UnDo - able Edit, meaning an edit that can be undone.

chris
The difference is that "Hashtable" is a closed-form compound word, whereas "Hashmap" and "Hashset" aren't. I know it's annoying though.
Jon Skeet
+1  A: 
  • IPEndPoint breaks the compound word capitalization guideline (which, oddly enough, specifically calls out endpoint as an example).
  • All the Interop references are verboten, because they are an abbreviation for Interoperability. Thankfully, they left them as Interop though.

I swear there's an attribute or something that's completely misspelled, but I can't recall it off the top of my head. But, there is the always amusing case of HTTP_REFERER.

Mark Brackett