Recap of Access XP work session Saturday, July 17th, 2004
Written by Steve Jorgensen
Planning and tracking notes:
We've been a little clumsy at tracking and following the plan so far. In reviewing the cards from the prior week, we thought we had completed 2 stories, and part of a 3rd, but it turns out we had only done item 1 of 3 on the second story card. The cards were as follows:
I. Define a macro.
II. Define a macro call.
1. No parameters.
2. With parameters.
3. Context parameters.
III. List all macros and calls.
From Where
Understandable list.
Last week, we did I and II/1, but we somehow overlooked doing II/2-3. As for story III, we had finished tests to identify a macro definition, and to get the name from the definition.
During the week, Sam and Steve had a lot of customer-hat and developer-hat e-mail discussions about the metacode syntax specification and how we might proceed with the parser. It turns out we really didn't have the macro syntax specified well enough to do story II/2-3 yet at all, so we hashed that out, and hashed it out some more today for about the first hour. On the developer-hat side, we decided that, although the parser code was coming along slowly but nicely with our current approach of using custom VB code to do all of the parsing, with our syntax so much resembling XML, and with all the near-term (next few tests) and long-term additional details we expect, we'd be better off refactoring the code to have the MSXML library do most of our heavy lifting, and we should do that sooner rather than later.
So, it was hard to count completed stories from last week as an integer, but we called it (1 + 2 * 1/2) = 2. We adjusted our release plan for a velocity of 2 cards, and it still looked like a very respectable release. Also, we looked at the calendar, and there's one additional weekend available before the next PAUG meeting, so we could consider extending the release by one week, and still be plan to present what we have at the next PAUG meeting (uh, perhaps, we should tell our PAUG meeting coordinator that we're hoping to present something?)
Note that Steve was going to look into using a utility called TSI Soon by this week to help us get a slightly better version control process in place, but didn't get time to do that and to also work on the missing pieces of the metacode syntax specification. Hopefully by next week, he'll have time to see if TSI Soon will be useful to us to help with our version control process. The plan is that, since the TSI Soon add-in can, without closing Access, close one database, open another, and pass a variant argument to a procedure in the other database, we could set up another database that makes a copy of the one that invoked it, then reopens the original database by making another call to the TSI Soon add-in. Later, we can think about making our own add-in to do that more cleanly, but the TSI Soon method should work and be simple enough to implement.
Development Session:
We were going to start with refactoring the MSXML library into the code, but the test code from last week seemed messy enough that we decided to find a way to neaten that up first. We feel it is desirable to keep as much of the test material right in the test code as we can, but VB is not a great language for representing the medium-long text blocks we're feeding into the parser or validating against coming out of the parser, so we moved those items into an Access table. Ah yes, that is better.
Next, we started refactoring the MSXML library interface into the code. First, we had MSXML take over part of the work of parsing a macro body, then pretty much all of it except for the initial munging of the code for parsing by MSXML. Next, we refactored the code that identifies the start of a macro definition block and gets the name attribute so it now uses uses the MSXML DOM, and passes the element object to the code that extracts the body (instead of passing text), now moving the code munging step up to the calling procedure. The resulting code smells better and is significantly smaller.
Note that in the refactoring above, we followed proper TDD procedure, and ran the test suite after each small refactoring step, then fixed any broken tests before proceeding.
Finally, a bit after the lunch break, we had the MSXML calls factored in and were ready to start adding more tests. Now, our earlier refactoring was yielding clear dividends. It was really easy to add new test input and expected output data to the table, the tests were easier to read, and the XML library is handling the majority of our parsing tasks for us, so new tests are made to pass rapidly and without much hassle. We also feel we can fearlessly write somewhat fewer tests with this configuration than we would have otherwise, since we are not having to implement new parsing capabilities ourselves as we go, and can, for the most part, rely on the XML library to behave according to spec. (but not always - we found we had to set .preserveWhiteSpace = True to get the supposedly standard DOM behavior for handling leading white space in text content).
Wrap-up and looking forward:
That's about as far as we got by the end of the day. In story count terms, it's pretty pathetic looking, but both Sam and I felt very positive about what was accomplished. We finished items 2 and 3 from story II, and got most of the way done with Story III that had been in progress the previous week, but still did not finish it. That gives us an official velocity for the day of about 1 story, and an average so far of 1.5 stories per week. Still, we felt that much of today was spent doing essential and meaningful improvement of our process. We also felt that our sustainable velocity was higher at the end of the day than it was at the start, and both our internal code and our metacode language specification smells much better. Steve believes we can safely plan on a velocity of 2 stories for next week.
Due to the fact that we've had a velocity at or below 2 so far and ended up with one or more partially incomplete stories at the end of each session, I think we have to consider whether an adjustment needs to be made to our tracking system. We might have to add a point system, split some of the biggest stories, or something like that. We should discuss that in our planning meeting next week.