Sergio and the sigil

Beginning Continuous Improvement, A Case Study

Posted by Sergio on 2008-06-27

by: Glenn Goodrich

This post is the winner of The Great Devlicio.us Giveaway.

The story you are about to read is true. The names and identities of the innocent have been changed to protect them and my job. No animals were harmed in the writing of this story.

Roughly three to five years ago I was an intermediate ASP.NET Webforms developer. I had produced several applications for various clients that were in different stages of test/production/maintenance /graveyard. Some of these applications were loved by my clients, others were tolerated, and still others were abhorred. The aspects all of these applications did have in common were a high level of difficulty to maintain and an almost violent resistance to change. Most of my clients tend to generate requirements in a management bubble so during the first round of testing, (if it existed) or the first weeks stumbling through production deployment, the user feedback was very large. Of course, the client always desired make changes accommodating this feedback, which is often where my real troubles began.

There had to be a better way. So, I started combing the web, hoping to find people that solved issues like mine. Googling phrases like “extensibility”, “webforms pain”, and “easy asp.net deployment”. If memory serves, the first fish on the line was Rails. I did the Rails “Hello World” and was amazed at how fast you could get going, how easy you could add views, and how much of my nerd life I had wasted. Realizing that my clients were not quite ready for Rails (“Ruby on what??? Where’s the msi?”) I started looking for MVC in .NET. This, as you’ve probably guessed, landed me at the Castle Project. Monorail was just what I needed. I could shoehorn it past my clients’ open source/never-heard-of-that worries, because it was .NET. But this was just the beginning.

The Castle Project also had the Windsor Inversion of Control (IoC) container, which led me to things like “separation of concerns”, “single responsibility”, and the “open-closed principle”. It really started me down the path of Test Driven Development (TDD) which was probably the single biggest positive change to my coding practices. It was a little bumpy at first, but once I saw that I could get all my code working before I even had a web site application AND I could really test it, I was hooked.

I started reading the Castle Forums as well as Hammet’s blog and Ayende’s blog. Figuring they weren’t the only really smart people out there, I started reading tons of blogs (CodeBetter, Martin Fowler’s Bliki, etc.) which showed me the endless world of better design practices. I started reading books that weren’t from Microsoft Press (nothing against them, but there are a lot of good books out there) including Head First Design Patterns, which was another huge A-HA! moment for my development career. I now read blogs everyday and have at least two books going at any moment in time. I read about Continuous Integration and CI Factory, as well as NHibernate and other OR/M frameworks. This was my first steps into Continuous Improvement.

So, where is this going? Is there a success story in our future? Before you object to the relevance of my opening statement, we have finally arrived at my success. We were handed a very large client from a business partner, partially because that partner could not satisfy the needs of the client. The client (who I will call BigCo) wanted a web-based application to put in front of their customer-facing employees to, basically, figure out if BigCo could provide any services to new clients. There were various factors that affected BigCo’s ability to provide services to a given customer, and the application would have to perform the logic that determined each of these factors. For this article, we will call the application ProviderApp. ProviderApp had to do the following:

Collect information about the customer. Find out where the customer lived. See if BigCo had the ability to provide services to that location. If the location was good, show the employee which of BigCo’s services were available. Persist the results of this interaction.

So, BigCo wanted a prototype. Tapping into my new approach and knowledge, I started writing tests for my (persistent ignorant!) domain model. Customer, Address, ProviderResult, and other classes were the result. All clean and responsible only for themselves and fully tested. I used separation of concerns to partition out the factors into services, being sure to use interfaces. These services were also open for extension, but closed for modification. In fact, for testing, I actually wrote test-only providers, removing the need to invoke some needed external services that would be used in production. I had all the logic for the factors written and tested, all the domain model designed and tested before I had even created a web application. Also, thanks to CI, I knew when the build was broken immediately, so bugs didn’t have a chance to get stale, causing me to have to hunt for hours or days because I didn’t know when the bug was introduced. By the time I got around to the user interface (the web application) it was simply a matter of writing my views and consuming my services. Oh, and the act of writing pure HTML views was a breath of fresh air.

I finished the prototype a couple of days early, so we had to time to actually perform real user tests, which I don’t think I had ever seen before. The bugs found here were relatively small but made a big difference in our demonstration of the prototype. On demo day, BigCo was very happy with the prototype. They were not wowed, they were not dazzled. Their reaction is not the success story. The success story comes from the fact that I was relaxed on demo day, confident the software was solid. I had no anxiety about getting off the beaten path, which was new for me. In fact, I let the BigCo folks drive the application at the end of the meeting and told them to show it to whomever they liked later. There is no way I would have been confident enough in my previous life to let a client demo my “prototype” code.

At the end of the meeting, the BigCo people asked me how long it would take to “make this real”, which is when my success story really sunk in. I realized, right there in front of them, that the application was done. My answer was a matter of days, as I did have to write new providers for a couple of the services, since they were using different back-ends then the prototype, but that was it. They also asked about some changes, a question that would have usually caused my ulcer to start. Each of their requests was a trivial change, taking me a few minutes to incorporate.

I remember walking out of that meeting realizing I had taken a huge step in my career. We are still doing a lot of work with BigCo, and they are a happy client. I no longer fear change, and am still continuously improving.

Well, I didn’t mention DDD, because I haven’t gotten to it yet (it’s on the list, which seems to get longer all the time) but I hope you’ll consider my contribution. Either way, I had a lot of fun writing this.

Giveaway result

Posted by Sergio on 2008-06-26

We've just finished tallying up our votes for the Great Devlicio.us Giveaway and we are pleased to announce that the winner is Glenn Goodrich. We had enough entries to make the contest worthwhile and we decided to give prizes for every story. Everyone got one of the books in the original list and the 2nd place also got Visual Studio Team System. You see? I told you that you should tell us your story.

Some people asked if there will be a contest where they could submit horror stories instead of success stories. Well, I'm considering running a contest for that, but I'm afraid the prize will be limited to a bag of Doritos.

Glenn runs a very nice blog and his story, which will be posted here tomorrow, shows that the quest for a better way to develop applications or, in broader terms, the constant pursuit of improvement should be in our DNA.

I'll quote from his story:

... Head First Design Patterns, which was another huge A-HA! moment for my development career. I now read blogs everyday and have at least two books going at any moment in time. I read about Continuous Integration and CI Factory, as well as NHibernate and other OR/M frameworks. This was my first steps into Continuous Improvement.
...I was relaxed on demo day, confident the software was solid. I had no anxiety about getting off the beaten path, which was new for me.

Congratulations to Glenn, we are very happy that the prizes are being given to such deserving hands. You make us proud, Glenn.

Be sure to check back tomorrow with the full story.

Chicago ALT.NET Meeting on June 11th

Posted by Sergio on 2008-06-03

The Chicago ALT.NET crowd will be meeting on June 11th. This time we have a new location with the space graciously offered by ThoughtWorks. You can register and get more information about the event at the link below.

If you haven't been to one of our meetings yet, you should know that this is not your average user group meeting. The talks are not formal presentations and there's a lot of participation from the attendance. Bring your questions and, most importantly, your opinions.

After the talk, you're welcome to stick around and socialize at a nearby restaurant. Food and drinks make for great fuel for more tech and non-tech talk.

Resharper versus CodeRush

6:00 pm
Pizza and networking time

6:30 pm
Join us and watch while Ryan Rinaldi and Adam Tybor demonstrate how those invaluable addins can boost your productivity and help you write better code in Visual Studio.

After the demo let's open the floor for discussions on a topic to be determined in typical Open Spaces style

Chicago ALT.NET - May 08 meeting summary

Posted by Sergio on 2008-05-15

Last night we had the monthly meeting of the Chicago ALT.NET group. After a few social/networking and group planning events, this was our first content-bearing event.

We had the pleasure of having Dan Sniderman come and talk about his experience with TFS and how we can build a Continuous Integration process with it. Dan talked about the different components and options in TFS and it was a very useful presentation, especially for me, because I'm going through the process of making CI a fundamental part of my client's workflow.

The discussion was not limited to TFS as it was constantly put in perspective against the other non-MS CI offerings. Knowing what TFS can do in comparison to the existing alternatives like SVN, TeamCity, CruiseControl.net, trac, JIRA, etc will enable me to assist the client choosing the most appropriate option for their team and infrastructure.

I'm very happy with the level of the discussions and knowledge sharing that we got in that meeting. It was not your average user group lecture. I think that is the direction we want our group to follow, not limiting our scope to MS branded products and eventually looking outside of the .Net boundaries as well.

Topics for our future meetings are up for voting, but it looks like we will soon be talking about NHibernate, IoC containers, distributed architectures, TDD, ORMs, rich JavaScript client libraries, etc.

If you want to learn more about the group and attend future meetings, check out our mailing list and our calendar (iCal).

ALT.NET Conference Recap

Posted by Sergio on 2008-04-21
ALT.NET Conference, take two. When I signed for this conference for the second time I didn't honestly think it was going to be as good as the first one. Boy was I wrong. I got the feeling that the attendees came incredibly prepared. Prepared to stand up and voice their opinions instead of simply watching. Prepared to listen diverging point of views. Prepared to take part in spontaneous conversations, in the conference rooms, in the corridors, in the shared rides, in the hotel lobby, in the restaurants, in the frigging airport waiting to board the plane. And, most of all, prepared to be surprised. I was surprised at so many different levels. Who would have thought that a discussion around JavaScript would spark so much interest? I was certain that the participants that came straight out of the MVP Summit would be all geeked out, but no. I was surprised to see a few MVPs that chose to fly in only for the ALT.NET event and not the summit. I was also surprised to see that some of the greatest talks happened not during the conference hours, but late in the night after a few drinks. Maybe if I start drinking I will become one of the smart guys? From the sessions that I stopped by, several discussions and questions came back with me for further processing.
  • Microsoft v 1.0 vs Stable OSS
    • Is that decision based only on risk assessment?
    • MS is clearly happy with OSS built with .Net. Brad Abrams and ScottGu were there to assure that.
    • Are we lacking a corporation (not-MS) to back OSS, like Canonical, Red Hat, mySQL AB, etc?
    • Too many questions, no clear conclusion


  • Functional Programming: Great talk. As you may or may not know, I am interested in this type of stuff. Just to reiterate, I think FP has its place and we are just seeing the beginning of it in the .Net universe.

  • ASP.NET MVC update: Among all the surprises in the conference, this was the most intriguing one. I went in as a MVC believer and got out happier with webforms. Weird. Some of the upcoming changes in webforms will address important annoyances, like the id munging and routing for urls.

  • Innovation: I arrived late at this discussion and was kind of shocked to hear Scott Hanselman question (or even suggest) that we already have enough implementation of OSS alternatives for many things and maybe there's nothing left to be innovated there, maybe we should just move on instead of creating another mock framework or another blog engine. I think this is kind of absurd. A great part of the innovation is powered by lower level innovations. My example: we didn't seem to need Moq, but now that we have lambdas in .Net, Moq could innovate in that area. As long as the CLR and the language teams keep feeding us new tools, we will keep using the tools in new and creative ways. Anyway, the central point of the discussion was supposed to be if there's innovation in .Net or if we are only porting existing projects from other languages.

  • JavaScript tools and patterns
    • JSUnit - this is slow. too slow.
    • Do we need a JS-specific test runner?
    • We felt that we lack some guidance and some patterns
    • Watch for a new community around these premises