Hard-Coding Crazy?


(archived from my old blog from my pre-MS days)

The current application that I'm working on is pretty configuration-heavy.  There's even configuration to drive the configuration.  There's configuration that drives the UI that drives the configuration.

Even so, when the product owner recently said, "I think we need to move some of this out of configuration and just hard-code it."  Well... let's just say that I didn't agree.  I do now.

I recently added a whole lot of flexibility by providing a "plug-in" configuration chooser enabled by... you guessed it - more configuration.  We then deployed the application last week and my app worked nicely.

However, another application that consumes my code did not fair so well.  It failed each time it was called because of the additional configuration.  Yes, it was a "communication" gaff on my part, but it could have been avoided since we didn't really NEED extra configuration to achieve the plug-in capability.  I could have just hard coded something to the affect of - in MODE1 do X, and in MODE2 do Y.  That way we could have executed just fine in production without failure.

Ayende has similar feelings here.

Comments (0)

Skip to main content