CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

I'm an IRecividist

I apologize in advance for the poor taste displayed by this post, but it was a rough day.

Harry Pierson's post on Sacred Code Cows made me feel a little a bit guilty.  I've completely shaken off the bonds of Hungarian Notation, except for the silly ISomething convention for interfaces that is so prevalent in the .Net world.  I can't abide CSomething, and I certainly can't stand the old m_strSomething nonsense from VB6 coding.  We tried to stop using the "I" prefix on a .Net project a couple years ago, but it just confused people who expected the interfaces to start with an "I."

The "I" prefix has been much harder to eliminate, but the slavish adherence to an outdated idea about coding conventions got me in some trouble.  At the Austin Code Camp last month I did a talk on Code Smells.  Of course I had to do the obligatory refactoring from a repeated switch statement to a strategy pattern.  I appropriated and adapted a sample of this refactoring based on the famous "Coconut-laden swallow" bit from Monty Python and the Holy Grail.  So as everybody who's seen the movie (it's an absolute necessity for understanding the culture of the typical software development shop) knows, the European swallows have different payload and wing speed capabilities than African swallows.  In my Code Camp sample I refactored a pair of switch statements on the type code of swallow to a series of strategy classes that all implemented a common interface.  Of course, you can probably guess what I called the interface for types of swallow. 

And yes, I had a Ron Burgundy moment.



Comments

Lasse said:

Thanks, Jeremy. You made my day with this one :)
# April 27, 2006 2:38 PM

ISerializable - Roy Osherove's Blog said:

Jeremy dislikes Interface names that being with 'I' ("ISerializable"..). Len Holgate disagrees with him,...
# June 14, 2006 3:15 PM

ISerializable - Roy Osherove's Blog said:

Jeremy dislikes Interface names that being with 'I' ("ISerializable"..). Len Holgate disagrees with him,...
# June 14, 2006 3:16 PM

Jeremy D. Miller -- The Shade Tree Developer said:

The sessions are all online now for DevTeach 2007 in Montreal this spring. I'm giving talks on: The Laws

# January 25, 2007 9:16 PM

Whoa, Nellie.NET! said:

In the last few posts, I explored very simple concepts from the point of view of DDD and BDD/TDD. In

# April 1, 2007 11:15 PM

Whoa, Nellie.NET! said:

I've been waiting for Bill McCafferty's updates to his NHibernate Best Practices article. The article

# April 3, 2007 10:20 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP