August
13

A hallway talk at the Alt.NET Israel Unconference got me thinking about coding standards in general, and naming conventions in particular.

I’ve seen dozens of holy wars regarding the subject of naming conventions - when a project starts, when a new team member comes along, when the team leader is replaced etc.

I used to think that a project should have a single naming convention, and everyone should follow it. Now, I’m not so sure any more. I mean, what is really so important about naming conventions? What makes a project with a unified naming convention better than a project without one?

Unity

The first argument for naming conventions is always unity. You want all your data members to look the same.

But, think of it, what is really that important about unity? What business value do you get from it? Does it cut down development time? Does it improve performance?

IMO, if one developer wants his field to be called “_identifier”, another wants “m_identifier” and the other wants “nIdentifier”, just let them! No one ever died from Hungarian notation or a “m_” prefix, I believe.

Readability

For those who still believe in Hungarian notation (or any of its siblings), readability seems to be a great argument for naming conventions.

However, Hungarian notation might have been a good argument a decade ago. Today, all IDE’s provide great intellisense, and one could determine the type of a member in a second by hovering on it.

Scope

Determining the scope of a variable (method or class) is important, but can also be easily discovered by intellisense.

Focus on What’s Important

I’m not trying to say you shouldn’t have a naming convention in your project. I’m just trying to say, don’t let it bother you so much.

Set up a naming convention at the beginning of the project, have your team members agree on it, but don’t hunt down any exception and have it fixed.

Write a unit test or get a cup of coffee instead.

Do you think naming conventions are important? Where would you draw the line?

kick it on DotNetKicks.com

5
August
7

I’ll be heading out to the first Alt.NET conference in Israel in an hour or so, I’m really excited about the Alt.NET movement forming up in Israel.

I hope to learn some stuff I just never get around to, such as:

  • Domain Driven Design,
  • Behavior Driven Development,
  • Domain Specific Languages.

I don’t think I’ll be able to share any knowledge, since I’m positive that I will be stunned by the high-level knowledge of the people there.

So I’m off to stare and drool. See you there!

0