OK XPites, This week I've been teaching a group of programmers how to build EJBs using IBM's WebSphere. My problem was that this is EXACTLY a two week prototype -- one week on back-end EJB issues, and a second week (week after next) on UI issues with Swing and VisualAge for Java. When I was thinking about how to do this, I decided on the following idea: 1 Superquick design starting from user stories ending with a single UML InteractionDiagram that captures the object message flows. 1 Always DoTheSimplestThingThatCouldPossiblyWork 1 Encourage them to RefactorMercilessly 1 ContinuousTesting using JUnit [see JavaUnit] I pretty much taught things in that order. The first day we did design, emphasizing that we'll always DoTheSimplestThingThatCouldPossiblyWork. The second day I introduced them to JUnit and did a quick chalk-talk on the idea of class-based OO testing. I then set them to simultaneously building their TestCase''''''s and their classes. As problems evolved, I encouraged them to RefactorMercilessly, but to rely on the test suites to determine that they haven't broken anything at any point. One thing that I hadn't planned on, but that evolved, is PairProgramming. I originally wanted to give them the option of working on their own machines, but network problems forced us into PairProgramming on the second day, and they haven't wanted to change. So my questions are: (a) Is this a reasonable way to teach XP? (b) Should I have presented things in a different order? -- KyleBrown P.S. I haven't ''told'' them they're doing XP. I just presented it as "we've got tight deadlines, and this is about the only way we'll get it done." ---- Sounds perfect to me. A true XP fanatic would perhaps have used CRC rather than UML for the design, and in Smalltalk (if they knew the language) we might code on the first day. But in your environment, it sounds great! -- RonJeffries ---- I had been thinking about how to encourage pair programming in a class room setting. One idea I had was to give each person of a given pair different user stories to study. Each would have some common stories but also a few the other did not. Then each person must contribute and rely on the other to finish the problem on time. I agree with Ron, skip the UML. It hides complexity. CRC cards do not. Or you could incorporate a SpikeSolution and then throw it away. That too could be a valuable lesson. You could also consider having a suite of AcceptanceTest''''''s already created for the students to run against. -- DonWells ---- (My goodness, I can't believe that I'm saying this) The UML is not a problem. CRC is great, believe me, I've used it for years, but UML was fairly well understood by these developers, so it was easier to start there instead of defending CRC. In any case, it's not the notation that is important -- it's the ''process''. I use a CRC-like process, but do it on whiteboards and big sheets of paper that become "wallchart" CRC cards. In the end UML is just a notation to capture the design. Also, the problem that I was solving didn't involve a "canned" solution since we were basically doing an iteration of our project while learning XP and EJBs. In a real "classroom" setting I like the idea of having a prebuilt suite of AcceptanceTest''''''s, but it wasn't appropriate for our setting. -- KyleBrown P.S. Now that the week is over, I can say it went great. It was very nice to do our last integration in VisualAge (e.g. Envy) and then update the "AllTests" suite in JUnit to include all the tests. We pressed the "Run" button and voila! it all ran green. A nice note to end the week on. Kyle, I'm perfectly OK with using the UML, just remarking that a full-bore XP effort would likely use CRC. UML is very popular and has the advantage of producing a permanent artifact. When starting XP, developers may not be ready to trust their memory of a carding session. The diagram ''may'' serve as a better recall mechanism than a stack of [blank] CRC cards. I said it sounded perfect the way you did it, and I meant just that. -- RonJeffries No hard feelings at all, Ron. As I said, I could't believe I was actually defending UML :) Thanks for the vote of confidence in the way I taught XP. Does anyone else want to contribute their insights and/or experiences in teaching XP? Kent? Ward? -- KyleBrown We tried to teach XP on the first phase of the XpLeiden project. -- MartijnMeijering ---- See XpWorkshop ---- CategoryAdoptingXp