On Long Identifier Names

Link. October 13, 2006. Comments [1]. Posted in: .NET | Development

I'm all for using descriptive names to identifiers (classes, methods, properties, and so on), however, I also try to keep them to a reasonable length. Too long names are harder to remember, easier to misspell (even with intellisense) and annoying all around.

Sometimes, however, you can't avoid ending up with the long ones. I defined today an interface called IMsmqSubscriptionPersistenceService. 35 characters. That's almost half of the standard 80 column line. And, of course, I needed an implementation: the SqlMsmqSubscriptionPersistenceService class. That's 2 extra characters. Oh well!



Thursday, October 12, 2006 8:58:56 PM (SA Pacific Standard Time, UTC-05:00)
Just try doing the same with generics.
IDictionary<Employee, IList<Salary>> salariesByEmployees;
That is 57 characters, and we haven't even started doing something yes=t
Comments are closed.

Syndicate

About

Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...

tomasrestrepo @ twitter My Flickr photostream My saved links on delicious My Technorati Profile

email: tomas@winterdom.com
msn: tomasr@passport.com

View my profile on LinkedIn

MVP logo

Ads


Categories

Statistics

Total Posts: 1041
This Year: 111
This Month: 1
This Week: 0
Comments: 818

Archive

Other

Copyright © 2002-2008, Tomas Restrepo.

Powered by: newtelligence dasBlog 2.2.8279.16125

Sign In