Thursday, October 18, 2007

Southwest Fox - PreCon

I've been looking forward to Alan Stevens' session on TDD from months - and my anticipation was not for naught.

Alan had 4 hours to give us a really great session on TDD. I have tons of notes, but I don't want to give away all of Alan's session. Instead I thought I'd share some of the elements that hit me the most.

Alan spent a good hour giving us an abstract and philisophical introduction to TDD, what it could mean to us and how we develop.

One of the things Alan mentioned was that he wants to show us how to use TDD against existing code - which is something I thought we wouldn't be able to do at Geeks and Gurus. We've always talked about using TDD on the next big project, not applying it retroactively to something we're already working on. I missed about 10 minutes of the session in the middle. Customer phone call on a break took longer than expected) but I don't think he actually covered this in any detail. (I missed the part where he talked about something called FoxMock) At the very end of the session Alan put up a slide "What is Legacy Code?" His answer: Code without unit tests. He made the point that you could have written legacy code this morning. He made points about how refactoring old code is the opportunity to implement TDD and build seams in the application. "Get the class you are modifying under test." I still have a ways to go in figuring out how when and where we'll implement TDD, but I'm more convinced than ever that we need to start as soon as possible.

So, back to the key points. Alan explained that TDD (Test Driven Development) is not really about testing or development, but about example driven design. Later in the session he was able to illustrate this with simple examples.

Something that I've always had in my head was that Vagueness is the enemy of developers. He later made the statement "The hardest thing in software design is to know what to build" This rings so true to me. We're in the middle of one project where the spec is basically "we need reports" Uh, ok, we'll get right on that.

Alan talking about Fowler's concept of Avoiding Debt - "Go ahead and implement it now and we'll fix it later" is Design Debt. He stressed that we should "pay cash" and "pay as you go"

One of the great things he showed us was a diagram: The Great Pyramid of Agile from http://www.processwave.com/. This helped me crystalize an agile concept that I've had a hard time "seeing" in the real world. I now understand how to illustrate the concept of starting with the smallest deployable set of features and adding new features in future iterations.

TDD is a process. FoxUnit is a tool that is part of that process. Alan tweaked FoxUnit and VisionPace was kind enough to post this "unofficial" version for the conference.

Test Sequence: Setup, Exercise, Verify, Teardown

Alan then walked us through FoxUnit showing us the core elements of a test.

I'm running out of time - I'll post more later, but this was a really great session.

Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home