Category Archives: Agile/Iterative Development

I Mock You (And I Don’t Even Know It)

I attended an Agile Iowa meeting for the first time June 15th (when I first started writing up this post…), and walked away with a head full of ideas and aspirations. But I had come with a purpose first and foremost. I was there to get some insight from other professionals on how to improve quality on my current project.

Toward the end, we talked extensively about various uses of TDD, all of which I had heard of, but only some of which I had used in development. But the idea of using mock objects really made an impact on me.

Which brings me to NMock, an interesting tool for incorporating mock objects into your unit and acceptance testing. So far, I’ve only had the chance to test out the introductory tutorial, and my impressions of it are mixed. A google search returns sites with different types of examples, some of which referring to objects I couldn’t find in the assembly for .NET 2.0. But the documentation on the download site looks pretty useful, once I have more time to read through it.

In the coming weeks, I hope to find more time to play around with it, and have more to say on the subject. Stay tuned…

Adding Abstraction to Your Designs

One principle I have seen when it comes to Agile Development practices is to design the simplest thing necessary to completing the objective. Now, I take this with a grain of salt because I could easily create a straightforward application that is highly coupled, non-cohesive and overall difficult to maintain in a real-world environment of ever-changing requirements.

So, given that I will at least put in the effort to use good OO design while still doing the simplest thing to reach my objective, I feel that there are times when adding a little abstraction to your designs is a simple task that can benefit you greatly down the road.

As a rule of thumb, I almost always stick at least one controller class in my business tier to mediate between my business objects and my user interface layer (or persistence layer, for that matter), regardless of the size of the application. There are several benefits to doing this:

  • It is a better place to keep business rules than in your UI, especially if the business rule applies to several screens. This helps in lowering coupling between objects.
  • It lowers the overall responsibility of your business classes, keeping them highly-cohesive.
  • If When your business rules change, there will be fewer places that you’ll need to make your changes (ideally, only one spot: a method in your controller class).

To paraphrase one of my old college professors: It is better to have too many (software) classes than too few.

Lunch Meeting

I met with Tim Gifford today for lunch, and had a really good discussion on using agility in the workplace. It was nice to talk to somebody else who has had some experience with TDD and paired-programming and it was reassuring to know that people are benefiting from these techniques.

I guess, in my case, my failure using agile techniques was a matter of inexperience. That, and the fact that I was working by myself on a project, which is difficult in an agile environment, since a big focus is on collaboration — with stakeholders and developers alike.

Tim made a good point about the importance of multi-developer project teams: Part of the responsibility of a developer in a team is to make sure other developers are not “rushing to the finish line” of development. That is, making sure that others properly test their changes or new code before sending it off.

He also gave me some good tips on how to start changing my work environment in small, progressive steps. For example, start with unit testing. By building automated tests throughout development, it is easier to prove that your application is handling the business rules correctly. In addition, you can work with the client to develop these tests for real-work cases and use this as part of testing toward the end of the project, allowing the test users to focus on other aspects of testing.

Waterfall Conference ’06 – See You There!

Is anybody else registered for the Waterfall ’06 Conference in early April? It sounds like it’s going to be the venue for developers looking to get in on the latest trend. And Tyra Banks is booked as a speaker too!

Ok, this was the funniest frickin’ thing I’ve read in a while now. If you’re not in software development, you will miss the joke completely. And, for that, I apologize. Actually, I don’t. You’re just not cool. Get over it.