Patterns & Practices Summit – Day 3: Development

The overarching theme today was how to use Agile methodologies to build better software.  Keith Pleas posted my and David’s blog URLs on screen with the request that anyone else blogging here this week let him know.  If you are here in Redmond and have been blogging about the conference, please leave me a comment with your blog address, I’d love to read your thoughts.

Keynote: The Future of Patterns & Practices – Rick Maguire
Rick discussed where the PnP team is going over FY ’07. 

 FY 07 – H1 FY 07 – H2
User ExperienceMobile Client Software Factory Client Architecture Guide
 Web Client Software Factory v1 SC Software Factory v2 (fy08)
   Web Client Software Factory v2
Web Services & integrationServices Software Factory v1 (asmx) Services Software Factory for Orcas – FIAT (FY08)
 Services Software Factory v2 (WCF) .NET 3.0 Architecture Guide
Engineering PracticesDesign for Operations Enterprise Library TNG
   Guidance Explorer
MSFMSF Updates MSF Updates
 MSF Orcas (FY08 Deliverable)  


 Session 1: The Agile Talk on Agility – Peter Provost & Michael Puleio
All I can say is “BRILLIANT!”  Peter and Michael broke the session out into 10 minute iterations in which they first asked the audience for a list of topics to discuss.  We dealt with scope creep in the backlog, when an Agile process will and will not work, managing distributed teams, and architecture.  This discussion validated our internal processes and was entertaining and informative to boot.  Here’s my notes on each interation:

Iteration 1

  • Estimation
    • Yesterday’s Weather
    • Estimation rules:
      • Collaborative approach
      • Teams talk it through to gain consensus
      • “Poker cards” method
      • Collaborative estimating model
      • Person doing estimating is person doing the work.
  • When will agile not work
    • When you have a very well know problem space with well defined limits
    • When the team hasn’t bought into the process (working together, deliver small chunks of functionality)
    • Philosophy – “The best time to make a decision is not always way in advance, nor is it very late” The right time is the last responsible moment, not before, not later.


Iteration 2

  • How do you design and Architecture in an Agile Project?
    • Do it a little bit at a time
      • TDD, Refactoring
      • Clean up design as you go
      • Skeleton architectures
      • “Metaphor”
        • create a high-level architecture before any code is written
        • Shadow Architecture, Skeleton Architecture
        • but know how deep to go
          • use simple flow charts and package diagrams
          • do not use activity diagrams
  • Managing Distributed teams
    • Bring the entire team together as frequently as possible
      • Does not mean constantly
      • Remote sharing
      • IM
    • Do more upfront design
    • Last responsible moment for a distributed team is just before they start coding.
    • Make separate, complete, small teams (dev, test, coordination) at each location.


Iteration 3

  • Scope creep that causes a problem with existing architecture
    • Management
      • Lots of unit test
      • Lost of acceptance tests
      • Heavy QA presence (2 QA to 1 Dev)
    • Make sure backlog is stack-ranked by the customer so you are always building the feature that is most-important to the customer right-now.
  • Risk Mitigation and Design
    • “Last Responsible Moment to Decide”
    • Risk determines stack rank


Session 2: Continuous Integration – Wayne Allen
Wayne gave an overview of CI processes from Stage 0 (no CI process), through Stage 1 (daily build and smoketest), to Stage 2 (standard CI process).  We have a mature Stage 2 CI process in-house and this presentation seemed to be a validation of our internal processes.  Because my organization is ahead of the CI curve as compared to many of the other organizations represented in the room, I would have like to see more detail in areas like Dealing with Internal Project Dependencies.  I did like that he brought up automated testing of installers.  I’m going to have to add that to my team’s backlog.


Session 3: Presenting the Model – Brad Wilson
Brad presented a discussion of the Model-View-Presenter pattern and it’s applicability to testing UIs.  While you can’t specifically test the UI elements, such as buttons or text boxes with this pattern, you can get just “under the glass” to test all of the non-visible aspects of the UI.  The big benefit of MVP is that you can test heretofore “untestable” code if it was tightly coupled to the presentation (controls) code.  This is a very powerful pattern when coupled with a “test-based” (not strictly TDD) development methodology.


Session 4: Agile Testing Guidance – Alan Ridlehoover
Another great session.  Alan discussed ways to increase the quality of the software you ship using agile methods, such as TDD and Continuous Integration.  The main gist of the discussion is that agility is not simple, but the benefits are significant.  Here’s some notes:

Writing tests during development gives you regression tests for free

  • Disciplined about writing tests
  • Never add or modify functionality without a failing test
  • Without a failing test, there is no requirement for new code.
  • Without test, specification falls out of sync with the code.

Incremental design and refactoring

  • Prunes out old dead code
  • Start with a simple solution one requirement at a time
    • They reduce maintenance costs
    • Incremental design produces values with minimum investment

Never redesign while a test is failing

  • Tests offer you a safety net for your modifications
  • Design changes should not be externally visible
  • Failing tests may mask design problems

Integrate frequently

  • Small changes integrate more easily than large ones
  • Forces developers to run tests frequently
  • Integrated code is more valuable to the organization

Integrate locally before check-in

  • Code in the repository must always be deployable
  • Insures that code runs on multiple workstations
  • Build server is community property
  • The build server is not your personal test rig
  • Someone else may have just broken the build

Failing build freezes all development until fixed

  • If the CI build is broken then you are adding code to an foundation that is not solid.


Session 5: Patterns for Distributed Systems: Core WCF Patterns – Ted Neward
Ted gave a rousing discussion.  He started with calisthenics for audience, some shoulder rolls and a threat of jumping-jacks create a sense of attentiveness within the audience.  After he finished off with us, he got down to discussing the how we can find “Best Practices” for a product that is so new.  His response was to look at other development arenas that have similar tools, but have had more time to mature, like J2EE.  One of the reference books Ted used in his talk was Core J2EE Patterns.


Session 6: Micro-Pairing – Peter Provost & Brad Wilson
Peter and Brad started off with a small slide deck that described their version of pair-programming.  They moved into a demonstration of the process for the next 30 minutes.  As one was writing a test or making it pass, the other was having a discussion with the audience.  This was a very informative and amusing session.  The basis of their pairing process is to “Pass the keyboard at every TDD Step”.   Here’s the notes:

What is it?

  • 2 developers at 1 computer
  • Driver
  • Observer
  • Test Driven Design

Do it together

  • Pass the keyboard at every TDD step

Successful pair development produces better design

  • real-time code review

The least knowledgeable person is responsible for implementing the feature

  • Knowledge transfer
  • Problem domain learning
  • Levels team knowledge
  • Probably has lower velocity
  • Grows junior people

Grow junior people, fire problem children

Negotiate over your disagreements

  • Design is steered by decisions made in the test

Writing a test that immediately passes is called “documenting existing behavior”

Good Reference

So as you can see, another great day of content here in Redmond.  My tour of the Patterns & Practices workspace has been postponed until tomorrow, so I’ll have those pics for you then.