Kyle Baley - The Coding Hillbilly

Sponsors

The Lounge

Wicked Cool Jobs

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
On Brownfield applications, or "How to ring in the new year on a positive note"

Caution: This post has very little technical content but may contain traces of inspiration and could induce vomiting. Do not read if you have heart problems or a healthy streak of cynicism. As you can imagine, hillbillies are optimists by nature.

Happy New Year to all! And this being Day One of Ought-Eight, I thought I'd take some time to reflect back on the past year and consider my goals for the next...

...ok, now that I've done that, let's move on to something interesting.

The Igloo Coder, Donald Belcham, writes on Brownfield applications. It's a term that has been applied to land reclamation and is likely a term you haven't heard before, at least as applied to software development. But I bet you already know what it means. And it ties in nicely to my initial posts here at CodeBetter, most of which have focused on what is pretty much the textbook definition of the term.

As luck would have it, I've also started work on another Brownfield application. It was last developed upon in January 2007 and is filled with the most heinous practices imaginable. Another hand-rolled data layer with a series of classes exposing static methods returning DataSets in some cases, domain objects in another. Again, all logic in the forms. No tests to be found. No patterns applied anywhere. No CI process. In fact, it's not even in a source control repository. It had one developer who clearly had no clue what he was doing.

And if that seems uncharacteristically harsh, that's because the developer was me.

I'll save you re-reading the last paragraph and remind you that it was last worked on in January 2007, less than one year ago. That's right, kiddies, the hillbilly has risked destroying the gargantuan backlog of credibility he has built up by admitting he was once a young, inexperienced coder who had lost his way. And it wasn't that long ago.

OK, I'm saying that a little tongue-in-cheek which I'm feeling more and more compelled to point out now that people who don't know me read this thing. The part I'm jesting about is where I make it sound like I'm on the one true path and everyone else is lost. And that I'm no longer inexperienced. Let me throw out a blanket statement that that will never be true and move on.

To shift focus back to the part that isn't going to solicit a bunch of comments that I'm elitist, the point is that for all the talk I do on patterns and NHibernate and IoC and all the other...ummm...alt.net tools and techniques, it was a *very* short time ago that I practiced precious few of these techniques and used even fewer of the associated tools, if any.

The app I'm lambasting here uses the *original* Enterprise Library data access block. The one with the static SQLHelper class. And I actively chose to use it over the new one. In November 2006. It was my decision to use stored procedures for all aspects of data access because I simply didn't know NHibernate existed. It's very likely, given the circumstances around this particular app, I would have looked at it and decided I didn't have time to learn it, but the fact remains it was not even an option in my mind at the time.

Now here I am about a year later and, like many developers, I shake my head at my naivete. But here's the cool part. At the time, I was doing things so much differently than I was the year before that and loving the way the new techniques made things easier. This year, the same thing applies. I now know the magic behind an IoC container and can use it to make my code that much more testable. I can take out my data access layer completely and replace it (for the most part) with some config files. And TDD, for all my initial misunderstandings, has made software development more fun than it has been in years.

In short, software development remains today just as fun as it did a year ago.

And I have no reason to doubt I'll be thinking the same thing next year when I look back at this application once more. Like Alec Baldwin says in Glengarry Glen Ross: Always Be Closing.

Kyle the Resolute


Posted Tue, Jan 1 2008 9:01 PM by Kyle Baley
Filed under: ,

[Advertisement]

Comments

On Brownfield applications, or "How to ring in the new year on a… wrote On Brownfield applications, or "How to ring in the new year on a…
on Tue, Jan 1 2008 10:21 PM

Pingback from  On Brownfield applications, or "How to ring in the new year on a…

On Brownfield applications, or "How to ring in the new year on a … wrote On Brownfield applications, or "How to ring in the new year on a …
on Tue, Jan 1 2008 10:22 PM

Pingback from  On Brownfield applications, or "How to ring in the new year on a …

Alex McMahon wrote re: On Brownfield applications, or "How to ring in the new year on a positive note"
on Wed, Jan 2 2008 6:43 AM

Reading this post I thought you were describing me!

I've recently been thinking that if the code I wrote a year ago was as terrible as it now seems, then the code I write now will probably seem awful a year on. Kinda makes me want to down tools until I am a 'proper' developer :)  

I think the real test is looking back another year; is the code you wrote last year 'better' than that written 2 years ago (continue to recurse if required). I would like to think that I am on a continual climb in terms of code quality, but in all honesty I think it has occasionally dipped. What I CAN be sure about is that my level of understanding and knowledge is steadily climbing.

On Brownfield applications, or "How to ring in the new year on a wrote On Brownfield applications, or "How to ring in the new year on a
on Wed, Jan 2 2008 11:09 AM

Pingback from  On Brownfield applications, or "How to ring in the new year on a

John Chapman wrote re: On Brownfield applications, or "How to ring in the new year on a positive note"
on Thu, Jan 3 2008 8:14 AM

Kyle,

Awesome post.  The thing is that I bet the vast majority of .NET applications work this way.  I know the application I work on did before I introduced NHibernate to the project.  The general approach people took was exactly what you described.  People are too busy, don't have time to learn about something they already know will be junk.  But I think your post proves that their is opportunities for enlightenment in a lot of these people.  I think that's why we need to keep working hard as a community to ensure that information is available to people to make better choices and hopefully build better software.

John Chapman

Kyle Baley wrote re: On Brownfield applications, or "How to ring in the new year on a positive note"
on Thu, Jan 3 2008 8:20 AM

Yes, there is definitely that aspect of it: to work toward helping people make better choices. But the other side of it is that there will almost always be a better way to do things and you yourself should keep striving to find that way, whenever possible and whenever practical.

http://nhibernate.codebetter.com/blogs/kyle.baley/archive/2008/01/01/on-brownfield-applications-or-quot-how-to-ring-in-the-new-year-on-a-positive-note-quot.aspx wrote http://nhibernate.codebetter.com/blogs/kyle.baley/archive/2008/01/01/on-brownfield-applications-or-quot-how-to-ring-in-the-new-year-on-a-positive-note-quot.aspx
on Thu, Mar 20 2008 1:54 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us