Standard is Better than Better

Neal Ford wrote some interesting things about naming conventions: Eating Sacred Hamburger. And even though I agree with everything he says, I think he draws the wrong conclusions.

He first argues the relative merits of various naming conventions, preferring ruby_case to CamelCase, especially for very_long_and_drawn_out_method_names. It think he hits it right on the button, though I personally prefer lisp-case for very-long-and-drawn-out-method-names, since it’s easier to type.

He also argues against Hungarian notation, which I agree is a blight upon all that is good and green. And the IInterface notation is also a little silly, but…

It’s convention. We should follow the convention.

Did I just say that? Giving up progress, and readable code, just to do it in the same way it’s always been done?

Well, yes. Remember in C++, when you were using STL sometimes and MFC sometimes? They used different naming conventions entirely. And you could never remember what goes with what. Intellisense helps with that some, but it’s still awkward. And what about reading the code? While it may be a little clumsy to read long names in camel case, it’s far better to have the formatting match. The overall codebase is more beautiful as a result.

So, I say: bring on the IInterfaces! At the end of the day, I don’t care how we name things as long as we name them the same way. Or, to quote my boss: “standard is better than better.”

(Maybe they got rid of Hungarian notation not because it sucks (which it does), but because they couldn’t get everybody to agree on it. A convention is only useful if everybody does it. And right now, in C# at least, everybody does do it. It’s great for an old C++ hacker like me. So please, don’t break it!)

Technorati Tags: , ,


One thought on “Standard is Better than Better

  1. you could then interpret neal’s article as a recommendation to change the standard. then you’re both right. however, i didn’t notice that his article conveyed how exactly the ‘I’ prefix lowered his productivity, despite that naming interfaces that way might violate part of the *spirit* of interfaces. i didn’t reply directly to his article because it required all kinds of stupid logins and moderation, etc.

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s