<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5120829</id><updated>2011-06-08T06:41:13.647Z</updated><title type='text'>Extreme Programming in APL</title><subtitle type='html'>Exploring the application of XP practices to an APL project</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://aplxp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>30</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5120829.post-105752214124126937</id><published>2003-07-06T20:09:00.000Z</published><updated>2003-07-06T20:09:01.330Z</updated><title type='text'></title><content type='html'>Posted an article &lt;a href="http://www.5jt.com/archive/articles/beingunderstood.html"&gt;The Experience of Being Understood&lt;/a&gt;. Requirement specification looks a lot like language acquisition. Reflecting on what Wittgenstein had to say about language acquisition suggests an unusual development practice. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-105752214124126937?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/105752214124126937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/105752214124126937'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_07_06_archive.html#105752214124126937' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-105667814272799993</id><published>2003-06-27T01:42:00.000Z</published><updated>2003-06-27T02:03:04.066Z</updated><title type='text'></title><content type='html'>Tonight I want to say something about the effect that &lt;strong&gt;communicating through the code&lt;/strong&gt; is having on the project.&lt;br /&gt;&lt;br /&gt;When Sarah &amp; I started working together we quickly ran up against the limits of our abilities to reason verbally about the processes we are automating. There are very many variables and cases. The calculations she described were not complicated, but the conditions for applying them were. Very. I suspected that this reflected optimisation long ago to minimise calculation, after which it just got difficult to reason across the cases. An actuary would be better trained to abstract a general framework within which to reason, but Sarah isn't an actuary.&lt;br /&gt;&lt;br /&gt;So we tackled the case examples one by one, using control structures (IF, THEN, ELSE, &amp;amp;c.) in the code to relate the rules to the conditions for applying them. Case by case the control structures proliferated.&lt;br /&gt;&lt;br /&gt;At first I refactored the code only inside the control structure elements. Had I refactored the control structures as well I should have destroyed the framework that anchored the work we were doing together. Sarah &amp; I were already using the code as a visual representation of the conditions, to ensure we could &lt;em&gt;see&lt;/em&gt; while we talked.&lt;br /&gt;&lt;br /&gt;I came to see that I could refactor the control structures only where Sarah could follow the refactoring. Sometimes I have been able to teach her this. She sees how multiplying a number by a condition is the same as saying it's zero unless the condition holds. I would eventually be able to refactor to my heart's content only when we had finished and no longer needed to refer to it!&lt;br /&gt;&lt;br /&gt;But that severely limited the benefits we could get from refactoring. Pity, because they included finding simpler abstractions from among the detail.&lt;br /&gt;&lt;br /&gt;In retrospect it seems I did two things right at this point by luck. We both find the pair programming work as intensive as XP practitioners report it. So we break for a few minutes each hour to stretch. (At the moment, when we've achieved a milestone we've been aiming for, I pick and read aloud a poem from A.A Milne's &lt;cite&gt;When We Were Very Young&lt;/cite&gt;.) I also vary the rhythm a bit by spending a few minutes every now and again deconstructing some recent expression in immediate-execution mode. So besides the variables and functions she's named herself, Sarah also has some insight into what the primitives are doing. For example, I've showed her how a Boolean expansion maps a list of numbers into a longer list, and she has used her knowledge to spot and challenge a line where this was not done as we had agreed it should be. So the first thing I think I did right was to keep discussing and explaining the code as I wrote it.&lt;br /&gt;&lt;br /&gt;The second thing was to build upon this learning to support &lt;strong&gt;aggressive refactoring&lt;/strong&gt;. Sarah likes the XP prescription for &amp;ldquo;merciless refactoring&amp;rdquo;, and enjoys seeing simplicity emerge from complexity.&lt;br /&gt;&lt;br /&gt;When early in the project we coded the rules for calculating Market Value Reductions, we wandered in a depressingly long sequence of nested control structures. When we came recently to the rules for calculating annuities and policy fees, we reached for an array structure that would allow us to represent all the cases. This entailed analysing and recreating rules embedded in an Excel workbook, rules that Sarah doesn't know &amp;mdash; she just uses the workbook.&lt;br /&gt;&lt;br /&gt;We started by refactoring the Excel spreadsheets in the workbook, displaying and naming new intermediate results until we could see what varies from case to case and what is the same. This allows us to rewrite the rules in APL. &lt;br /&gt;&lt;br /&gt;In my last post I compared the ephemeral views Excel's auditing tools provide of the information flow with the stable view from the APL code. Even after refactoring, the visual metaphor of the spreadsheet limits how much can be displayed on a monitor. Sarah made the same comparison today and said &lt;strong&gt;she finds the APL code &lt;em&gt;considerably&lt;/em&gt; easier to follow than the Excel workbook&lt;/strong&gt;. &lt;br /&gt;&lt;br /&gt;I've posted a &lt;a href="http://aplxp.blogspot.com/pension.zip"&gt;small Dyalog APL workspace&lt;/a&gt; with a working copy of the function we've been editing today. I think many programmers will find it remarkable that a non-programmer should prefer this description to an Excel workbook.&lt;br /&gt;&lt;br /&gt;When I began this post about communicating through the code I intended to write separately about the effects on &lt;strong&gt;communication quality&lt;/strong&gt; and on the &lt;strong&gt;code quality&lt;/strong&gt;. But it turns out that they are closely entangled. Weak communication produced loose code which was hard to refactor. Tight communication produced dense code and lots of refactoring opportunities. &lt;br /&gt;&lt;br /&gt;In fact Sarah is now contemplating using the insights she's gained from our work to review and refactor the manual processes we're automating.&lt;br /&gt;&lt;br /&gt;Next post: thinking about &lt;strong&gt;requirements specification as a Wittgensteinian language-game&lt;/strong&gt; suggests some interesting practices.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-105667814272799993?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/105667814272799993'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/105667814272799993'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_06_22_archive.html#105667814272799993' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-105649397567983115</id><published>2003-06-24T22:32:00.000Z</published><updated>2003-06-24T22:58:37.640Z</updated><title type='text'></title><content type='html'>&lt;strong&gt;Pair programming with the customer&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Earlier I described how I was cutting code as part of my communication with the trainers. They tell me what the system is to do, I code that and we verify the results. In this application domain, my description in APL of what's wanted takes similar time to the trainer describing it in English. So it's like a translation exercise, translating English to APL.&lt;br /&gt;&lt;br /&gt;At first I described this as "pair programming with the customer". Then after reflection, I said it wasn't. The aim of &lt;i&gt;pair programming&lt;/i&gt; is to raise &lt;b&gt;code quality&lt;/b&gt;. The aim of what the trainers and I are doing is to raise &lt;b&gt;communication quality&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;We've been doing this for 2 months now and it's time to look at the results. I started working with 2 or 3 trainers, for the last month with Sarah alone. &lt;br /&gt;&lt;br /&gt;Tonight, some &lt;em&gt;key practices&lt;/em&gt; and &lt;em&gt;communicating through the code&lt;/em&gt; with the customer, an unexpected result. Tomorrow, some unexpected effects on &lt;em&gt;communication&lt;/em&gt; and &lt;em&gt;code quality&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Programming practices&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;When the code produces wrong answers Sarah and I step through it with the interpreter, examining the intermediate results. So I write the code to produce the same intermediate results that the manual procedures do. &lt;br /&gt;&lt;br /&gt;I don't want any other intermediate results, so ideally the only variable names in the code are names for Sarah's intermediate results.&lt;br /&gt;&lt;br /&gt;Ideally, to avoid creating any other variables, I use a single line to represent how one intermediate variable is calculated. I tend to write long lines. &lt;br /&gt;&lt;br /&gt;I also create anonymous D-fns 'in line' to avoid creating other variables, even to avoid referring to the same variable twice in one line. (Leading me, I think towards the verb trains in &lt;a href="http://www.jsoftware.com"&gt;J&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;I want to support &lt;strong&gt;skim-reading the code&lt;/strong&gt;. In skimming code, I need to see only &lt;em&gt;the flow of information&lt;/em&gt; between variables. In skimming, dense chains of symbols between the curly braces around a D-fn register simply as &lt;em&gt;do something here&lt;/em&gt;. &lt;br /&gt;&lt;br /&gt;I also use D-fns merely to highlight the flow of information. For example, where a new value is calculated from a few other variables, I often compose the line as one or a few D-fns so that in skimming the code it is clear that the new value is derived as some function of certain others. &lt;br /&gt;&lt;br /&gt;I cannot overemphasise the value of being able to read the code at two levels.&lt;br /&gt;&lt;br /&gt;This is similar to the use of Excel's Auditing tools, which allow you to display the precedents or dependents of cells in a spreadsheet. The tools draw arrows over the spreadsheet to show &lt;em&gt;where&lt;/em&gt; one number is used or obtained. (You have to read the cell formulas to see exactly &lt;em&gt;how&lt;/em&gt;. This corresponds to reading the contents of my D-fns.) But it does not take many arrows to make a big mess, so you need to turn Excel's Auditing on and off for cell after cell to trace the flow of information. In contrast, everything in the APL code is available to a visual scan. The code can be skimmed to follow the flow of information, or the eye can stop to review the detail encapsulated in a D-fn.&lt;br /&gt;&lt;br /&gt;A related practice is to name quite small fragments of code, either a D-fn or a derived function, and comment it, so that later it can be read in context by its semantics rather than its mechanics. For example, in code we were writing today, in two places we needed to convert 3-lists into 4-lists by duplicating the first element. That was the mechanics. The semantics was 'replicate the NPR to produce a Reduced'. So we declared a function &lt;br /&gt;&lt;br /&gt;&lt;p class="APL"&gt;rnr „ 2 1 1°/¨ © replicate NPR as Reduced&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;and used &lt;font class="APL"&gt;rnr&lt;/font&gt; in lines where the reader needs only its semantics, not its mechanics. Unsurprisingly, this semantics for the derived function works only in the context of a single function, so &lt;font class="APL"&gt;rnr&lt;/font&gt; got defined in and localised to that one function.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Communicating through the code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I discuss the code with Sarah as if she were a novice programmer. I review the information flow, pointing to the variable and function names (which she chose) and saying in English what the primitive functions are doing. Occasionally I deconstruct a primitive expression in immediate-execution mode to illustrate or confirm a point, sometimes just to share a particularly elegant or powerful expression. Much of this is in the spirit of play: playing with a complex and fascinating toy.&lt;br /&gt;&lt;br /&gt;Today Sarah challenged a line of code. Correctly. In a few related lines, I'd been using Boolean expansions to map calculated results into parts of a collection of arrays. Suddenly Sarah leaned forward and pointed at one of them. "Shouldn't they be for all the columns?" She was right, and had been able to see that the code didn't do it.&lt;br /&gt;&lt;br /&gt;So Sarah skim-reads the code and through it we communicate about the rules we're automating.&lt;br /&gt;&lt;br /&gt;This is fascinating. I had similar experiences in the 1970s with customers who actually &lt;em&gt;were&lt;/em&gt; novice APL programmers. But Sarah doesn't write &lt;em&gt;any&lt;/em&gt; APL. &lt;br /&gt;&lt;br /&gt;It reminds me of my ability to read Italian. In limited contexts I'm a competent reader and hearer of Italian. Drawing on menu Italian and word roots shared with English, French and Latin I've acquired a vocabulary that meets my needs on holiday and allows me to skim-read newspaper articles.&lt;br /&gt;&lt;br /&gt;It also reminds me of the &lt;em&gt;language games&lt;/em&gt; Wittgenstein imagined in &lt;cite&gt;Philosophical Investigations&lt;/cite&gt;. Sarah &amp; I play a language game. It doesn't involve her speaking or writing any APL; it's not the same language game that &lt;em&gt;programming&lt;/em&gt; or &lt;em&gt;learning programming&lt;/em&gt; is. What are the uses of code fragments in this language game? &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.e7l3.com/colang.html" title="Dr Kenneth E. Iverson. Click for Eberhard Lutz's page on collection-oriented languages"&gt;&lt;img align="right" hspace="10" src="http://www.e7l3.com/images/iverson.jpg" vspace="5"&gt;&lt;/a&gt;Similarly, we couldn't play the game with just any APL code. Certain properties of my code are essential to this working. I suspect that the way it supports skimming is crucial, also the use of Sarah's nomenclature in recognisable spellings. &lt;br /&gt;&lt;br /&gt;It would be interesting and useful to identify what those properties are and consider how they can be replicated in other languages.&lt;br /&gt;&lt;br /&gt;I would like to pay tribute here to what Ken Iverson taught me in 1977 about teaching APL; his emphasis on exploration, hypothesis testing, Socratic dialogue and working in pairs.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-105649397567983115?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/105649397567983115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/105649397567983115'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_06_22_archive.html#105649397567983115' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-95336598</id><published>2003-06-05T18:10:00.000Z</published><updated>2003-06-05T18:13:20.000Z</updated><title type='text'></title><content type='html'>Back from Italy and &lt;a href="http://www.xp2003.org"&gt;XP 2003&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;How do you automate in three months a procedure it takes 6 months to train a new clerk to do?&lt;br /&gt;&lt;br /&gt;No matter how smart you think you are, you've got an analysis challenge. &lt;br /&gt;&lt;br /&gt;A pitfall to avoid is &lt;b&gt;refactoring the manual procedures&lt;/b&gt;. These have been optimised to to minimise human work. In this project's case, some of the complexity comes from shortcuts taken to minimise &lt;i&gt;calculation&lt;/i&gt;. With the machine, we would prefer to optimise to minimise the &lt;i&gt;number of rules&lt;/i&gt;. Calculation is mostly free.&lt;br /&gt;&lt;br /&gt;So spending time in analysis to reduce the number of rules to follow -- refactoring the original process -- is tempting. But it takes time we don't have. So Plan A is always to code it exactly as the clerks do it. &lt;br /&gt;&lt;br /&gt;I can still refactor the code without consulting the trainers. I've already done some of this. The very concise APL source code allows patterns to show up at a high level. Since we now have a useful library of test cases, I can refactor these and test. In fact, doing this allowed me to catch what I believe were misunderstandings on my part, which had not been caught by the application test. &lt;br /&gt;&lt;br /&gt;But refactoring this way has a drawback. The first version of the application code follows the trainer's instructions precisely. So it's easy to resolve any discrepancies between our results: we use the interpreter to step through the calculation, examining the results as we go.&lt;br /&gt;&lt;br /&gt;I can't overemphasise how useful this has been. The communication process has been dramatically shortened. Effectively I'm now &lt;b&gt;pair programming with the customer&lt;/b&gt;, who is reading the APL code off the screen, seeing her instructions reflected in control structures. (So APL is 'unreadable'? Match that, Java programmers!)&lt;br /&gt;&lt;br /&gt;Refactoring the original process to simplify the rules is a whole new ball game. Slavishly following the existing rules, no matter how baroque they might be, has a clear advantage. You know that it will turn out, that you will produce the same result after some predictable amount of work. In refactoring the procedures, you don't have the same assurance. It's &lt;em&gt;almost&lt;/em&gt; the same as redesigning the procedures, except you've got a test suite to get you home. Given that the trainers understand the reality represented by their procedures, it will probably all work out in reasonable time. &lt;br /&gt;&lt;br /&gt;These reflections prompted by several days effort spent now on redesigning a table in which intermediate results are presented to the users. Using our system to display this provoked the users to suggest a more orderly presentation than the one they use themselves. We're still working out the consequences.&lt;br /&gt;&lt;br /&gt;I felt a twinge of unease when I heard we were doing it. The lesson learned: on a sprint project like this, refactoring the users' processes can be a significant cost.&lt;br /&gt;&lt;br /&gt;That said, we &lt;em&gt;are&lt;/em&gt; getting it straight and it looks like the calculation rules will come out significantly simpler, with good consequences for later work.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-95336598?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/95336598'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/95336598'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_06_01_archive.html#95336598' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-94275402</id><published>2003-05-13T17:12:00.000Z</published><updated>2003-05-13T17:25:15.000Z</updated><title type='text'></title><content type='html'>&lt;br /&gt;The winner of the Life-70 Interface Sweepstake, Roger Bunker, has asked that the winnings be donated to the 'Cancer Research' Society. Perhaps we should have a photo of Roger on the site too !!!!!!!!!  Alot of  IT interaction today, which gave me an insight as to how much work goes on behind the scenes, when an interface is being put in place.       &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-94275402?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/94275402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/94275402'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_05_11_archive.html#94275402' title=''/><author><name>Sarah</name><uri>http://www.blogger.com/profile/09136043445292710087</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-94075487</id><published>2003-05-09T21:49:00.000Z</published><updated>2003-05-09T21:50:30.000Z</updated><title type='text'></title><content type='html'>&lt;img align="right" border="1" hspace="5" src="http://aplxp.blogspot.com/images/kevin.jpg" title="Kevin, photographed by Sarah" vspace="5"&gt; Kevin wanted his picture on this site! Here you go, Big Guy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-94075487?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/94075487'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/94075487'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_05_04_archive.html#94075487' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93741007</id><published>2003-05-04T10:30:00.000Z</published><updated>2003-05-04T10:30:12.660Z</updated><title type='text'></title><content type='html'>&lt;a href="http://www.bayarea.com/mld/mercurynews/news/5676110.htm"&gt;Ted Codd&lt;/a&gt; died.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93741007?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93741007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93741007'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_05_04_archive.html#93741007' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93663424</id><published>2003-05-02T17:58:00.000Z</published><updated>2003-05-02T17:58:30.913Z</updated><title type='text'></title><content type='html'>We've mopped up most of the rules for the iteration's output documents and have coded the easy ones. We're way ahead of of our estimated progress, so it's time for our business user to &lt;b&gt;add stories&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Since we came so far by dropping out complicated low-volume quotes, we could drop them back in again. Instead, as we've recommended, we're to push on to the next types of quotes.&lt;br /&gt;&lt;br /&gt;This will reveal sooner more of the data we need for the mainframe link.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93663424?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93663424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93663424'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93663424' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93610054</id><published>2003-05-01T19:04:00.000Z</published><updated>2003-05-09T21:51:50.000Z</updated><title type='text'></title><content type='html'>&lt;img align="left" border="1" hspace="5" src="http://aplxp.blogspot.com/images/sarah.jpg" title="Sarah, the Law on business rules" vspace="5"&gt;Sidelined analysis of annuity calculations while we find out how much of this we already have coded in other SVQ applications.&lt;br /&gt;&lt;br /&gt;Joe started coding up output documents with Sarah and me. We hadn't expected to get here so quickly, so Sarah will take tomorrow morning to assemble a complete set of the output and mark up the variable segments. After an afternoon coding up documents with me, Joe should be able to work up the rest over a couple of days without leaving Hampshire. The limits on &lt;b&gt;co-location&lt;/b&gt;: we generally work faster together, but the travel is a burden worth avoiding when we can.&lt;br /&gt;&lt;br /&gt;I hear IT wants &lt;b&gt;fully documented requirements&lt;/b&gt; for the mainframe link before any build work starts. How to reconcile this with our process? Perhaps we can exploit the 'best seams first' strategy. Since we've tackled the the most valuable processes first, we can specify with some confidence what we need for the first phase and come to some 'best efforts' agreement for a second phase, with perhaps a third phase later to mop up spills.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93610054?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93610054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93610054'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93610054' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93583298</id><published>2003-05-01T07:38:00.000Z</published><updated>2003-05-01T07:38:51.026Z</updated><title type='text'></title><content type='html'>Back on business rules with Joe sitting in. He started off yesterday by coding non-trivial expressions so I could keep working with Sarah. Yesterday it became clear that his application knowledge is much better than mine, so we switched places.&lt;br /&gt;&lt;br /&gt;I'm seeing that with his application knowledge he's able to elicit processing rules with confidence that he and Sarah have understood each other. That's more efficient and less rigorous than my working through test cases until Sarah can't think of any variations we haven't covered. Let's see how we've done when we've got some test cases on file for the new rules.&lt;br /&gt;&lt;br /&gt;Set aside coding some of the more complicated rules. Unsurprisingly, they are used infrequently. They also require information we can't grab from the mainframe, thus need GUI objects to get from user. Chose to defer spending project budget on these: we can always come back later.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93583298?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93583298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93583298'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93583298' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93516388</id><published>2003-04-30T06:25:00.000Z</published><updated>2003-04-30T06:36:54.000Z</updated><title type='text'></title><content type='html'>&lt;table border="0" cellpadding="5"&gt;&lt;trow&gt;&lt;td valign="top"&gt;&lt;img src="http://aplxp.blogspot.com/images/sweep.jpg"&gt;&lt;/td&gt;&lt;td valign="top"&gt;Roger wins the &lt;b&gt;mainframe interface sweepstake&lt;/b&gt;! His was the &lt;i&gt;most optimistic date &lt;/i&gt;(30 April) and closest to the date work started (29 April). He gets to pick the charity the stakes get donated to. &lt;/td&gt;&lt;/trow&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93516388?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93516388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93516388'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93516388' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93483778</id><published>2003-04-29T19:43:00.000Z</published><updated>2003-04-29T19:43:12.406Z</updated><title type='text'></title><content type='html'>Met our mainframe interface programmer today, and we got aligned on a lightweight approach. Once we'd relaxed a bit, she saw that she could meet our request for a 'spike' interface simply by finding an existing link. We have that now and can work out how to use it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pair-programming with the client&lt;/b&gt; again. That same fear of "this is never going to come together". But it did before, and we're already halfway through the biz rules for this iteration.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93483778?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93483778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93483778'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93483778' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93450635</id><published>2003-04-29T06:37:00.000Z</published><updated>2003-04-29T06:37:22.090Z</updated><title type='text'></title><content type='html'>Planning meeting yesterday for our second iteration. Results largely as expected: more business rules, more documents. Plus driving a 'spike' for the mainframe interface to demonstrate that we can link all the way through. &lt;br /&gt;&lt;br /&gt;We have our nominated mainframe programmer! And at the main customer site! We'll have our first conversation today.&lt;br /&gt;&lt;br /&gt;Feedback from the users from our 'releases' is useful and keep us on track; but nothing like as useful as feedback from a production system. How soon after getting a mainframe link running can we get something into production?&lt;br /&gt;&lt;br /&gt;Back yesterday afternoon to reviewing test cases with Sarah, one of the trainers. Good to be back in close communication again. &lt;br /&gt;&lt;br /&gt;I notice the reported &lt;b&gt;XP effect&lt;/b&gt;. Work is faster and more intense in close communication. Last week worked again one day at Joe's home in the Hampshire countryside, then the following 2 days co-ordinating by phone and email: hardder to maintain the intensity and momentum without &lt;b&gt;co-location&lt;/b&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93450635?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93450635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93450635'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93450635' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-93450297</id><published>2003-04-29T06:27:00.000Z</published><updated>2003-04-29T06:27:24.363Z</updated><title type='text'></title><content type='html'>What we did last week. Back after the Easter break, but without our On-Site Customers -- school holidays still going.&lt;br /&gt;&lt;br /&gt;Our mainframe link project has shown up, and I look like winning the sweepstake we set up for the date work starts! (One for the optimists.)&lt;br /&gt;&lt;br /&gt;Joe and I were able to use the time to rework the exchange of data between the mainframe link I've faked and the SVQ editor. &lt;br /&gt;&lt;br /&gt;Refactoring has left the code organisation looking less like the worksheets. I regret this and am vaguely uneasy about it, but the logic for it seems compelling, driven by what values the users might edit. Might have a 'refactoring insight' about this later.&lt;br /&gt;&lt;br /&gt;Still having to fight for YAGNI. The habit of coding what 'we're going to need later' is still strong. It's not our money to spend like this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-93450297?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93450297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/93450297'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_27_archive.html#93450297' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-92090617</id><published>2003-04-06T14:55:00.000Z</published><updated>2003-04-06T14:55:13.140Z</updated><title type='text'></title><content type='html'>Friday we delivered Release 2.&lt;br /&gt;&lt;br /&gt;We'd estimated that we would complete stories equivalent to 6 ideal days. We didn't get it all done: we omitted complete editing of the 'policy' information as the implications of editing derived data turned out more complicated than we'd seen. So we completed 4 days work, plus some.&lt;br /&gt;&lt;br /&gt;What's working/not working? &lt;b&gt;Code quality &lt;/b&gt;for the OO code I've written for handling policy information is proving robust, and easy to work with. I'm identifying errors and making changes fast; once I know what behaviour I want, I can produce it quickly.&lt;br /&gt;&lt;br /&gt;That's less true for the SVQ system we're adapting. When I pair with Joe, the SVQ code looks clunky to me, with data and derivatives held in globals. But I don't 'have the theory of the system' to use Naur's expression.&lt;br /&gt;&lt;br /&gt;Impressed reading Peter Naur's &lt;a href="http://www.naur.com/comp/c1-4.html"&gt;article on programming as theory building&lt;/a&gt;. I doubt the philosophical references are as relevant as the author thinks, but the central notion of a 'theory of the system' is persuasive, and so too, the assertion that code quality is measured by consistency with that theory as well as by the external behaviour of the system that it produces. Programmers operating without the theory of a system will degrade the code quality.&lt;br /&gt;&lt;br /&gt;Paul has more of this theory than Joe; we need his advice on how best to do what we gotta do.&lt;br /&gt;&lt;br /&gt;Still, we now have a library of policies standing in for the mainframe link. (The users and we are running a sweepstake on the date that a mainframe programmer starts work on the link.) We can calculate derived data from them and produce the relevant documents. Rough edges everywhere, but an outstanding achievement for a month's work.&lt;br /&gt;&lt;br /&gt;Business expert users are disappearing over the Easter holiday. Me too, I'm driving my mother around Ireland. We'll pick up again after Easter.&lt;br /&gt;&lt;br /&gt;Happy trails.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-92090617?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/92090617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/92090617'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_04_06_archive.html#92090617' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-91510293</id><published>2003-03-27T23:46:00.000Z</published><updated>2003-03-27T23:50:00.000Z</updated><title type='text'></title><content type='html'>Delivered first release on Tuesday, as promised. Just enough system to (1) verify that we'd gone 'end to end' and (2) to give the users a starting point to steer us from.&lt;br /&gt;&lt;br /&gt;Wednesday we played the Planning Game for the first time. For several reasons it suited us to make the next iteration short: it ends Friday week! I encouraged everybodyto think short-term, not Final Solution. &lt;br /&gt;&lt;br /&gt;We had 2 x 6 = 12 calendar days. &lt;cite&gt;Planning Extreme Programming&lt;/cite&gt; suggests an initial estimate of 1:3 for ideal:calendar time. But Joe &amp; I are a small team, so we may get 1:2. Our estimates for the user stories were 6 days, so we accepted all of them. Which then prompted a few "Oh, and another thing..." so I dealt out blank cards to everyone to make notes for next time.&lt;br /&gt;&lt;br /&gt;So far, only Kevin, the most senior person on the business side, is writing stories. But everyone's contributing, and there's an exhilarating sense of partnership.&lt;br /&gt;&lt;br /&gt;The biggest dampener of spirits is the uncertainty about whether we will get a mainframe programmer to help us build an interface. Fortunately we've got screenscraping as a tested fallback.&lt;br /&gt;&lt;br /&gt;From one of the stories two trainers took on the task of identifying the 'minimum set' of data to be recorded, so that we can drive completely from a keyboard until we can get a mainframe interface. Today they reported that so many data are needed that there would be no operational advantage in doing it. It would take as long as the present methods, but be less familiar.&lt;br /&gt;&lt;br /&gt;Fortunately, I've got time in hand from coding up the output documents -- pair programming with one of the trainers. So I will hand bake more test cases into the library and we will run THOSE through. So no production use before the mainframe link, but we can test. &lt;br /&gt;&lt;br /&gt;Time I implemented the automated testing for the output documents. No -- I keep catching myself -- that's a story for the next planning session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-91510293?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91510293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91510293'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_23_archive.html#91510293' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-91505465</id><published>2003-03-27T22:10:00.000Z</published><updated>2003-03-27T22:10:52.170Z</updated><title type='text'></title><content type='html'>Nothing like a 'green fields' XP project: Friday Joe and I integrated my work with the SVQ system. We had hoped we might be done by lunchtime, installed by teatime. &lt;br /&gt;&lt;br /&gt;Nah. We'd got close by midnight, when I called a halt. After 12 hours we had entered the 'negative productivity zone'. An hour in this zone costs more than an hour later fixing the mistakes we make. Joe slept over and we nailed it on Saturday morning. &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-91505465?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91505465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91505465'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_23_archive.html#91505465' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-91114888</id><published>2003-03-21T09:46:00.000Z</published><updated>2003-03-21T09:46:20.483Z</updated><title type='text'></title><content type='html'>Too busy to report project status? &lt;em&gt;That's&lt;/em&gt; an old chestnut!&lt;br /&gt;&lt;br /&gt;Joe &amp; I focused on assembling pieces for Release 1. Not quite a &lt;em&gt;ziffer&lt;/em&gt; (Zero Feature Release) but just enough to let our users steer the next iteration. &lt;br /&gt;&lt;br /&gt;To put it another way: rather than exploration or analysis or even collecting user stories, given that we're adapting a previous system (SVQUOTE, hereinafter SVQ), we're presenting a version of SVQ with a fraction of the required logic and output installed. Next week, when we plan the next iteration, the users can tell us how much effort to spend on changing the existing SVQ features, and how much to spend on new capabilities.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-91114888?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91114888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91114888'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_16_archive.html#91114888' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-91054312</id><published>2003-03-20T12:23:00.000Z</published><updated>2003-04-30T06:45:22.000Z</updated><title type='text'></title><content type='html'>&lt;img align="right" hspace="5" src="http://aplxp.blogspot.com/images/Joe.jpg" title="Joe, looking appalled" vspace="5"&gt;Joe joined us yesterday with experience from the SVQUOTE system. That means he can figure out how to adapt the system to handle this project, while I focus on the specifics for this project. He manages the bone and muscle, and I, the squishy innards.&lt;br /&gt;&lt;br /&gt;He was a bit appalled at all the new things to digest: object-oriented code organisation, data and code nested into namespaces passed as arguments and file components, but is now bearing down on adapting the shell's GUI data editors.&lt;br /&gt;&lt;br /&gt;The XP practice of &lt;strong&gt;adapting scope to a fixed timetable&lt;/strong&gt; is serving us well, and keeping us focused on what can be achieved in the next few days. The training I had as a Course Supervisor at &lt;a href="http://www.landmarkeducation.com"&gt;Landmark Education&lt;/a&gt; is making a big difference too.&lt;br /&gt;&lt;br /&gt;I've also had an insight that sharpens the sometimes blurry distinction between &lt;a href="http://c2.com/cgi/wiki?UnitTest"&gt;&lt;strong&gt;unit tests&lt;/strong&gt;&lt;/a&gt; and &lt;a href="http://c2.com/cgi/wiki?AcceptanceTest"&gt;&lt;strong&gt;acceptance tests&lt;/strong&gt;&lt;/a&gt;. If I don't understand why an acceptance test fails, the customer can help me. But if it's a unit test, she can't.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-91054312?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91054312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/91054312'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_16_archive.html#91054312' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90882930</id><published>2003-03-17T23:07:00.000Z</published><updated>2003-03-17T23:07:52.983Z</updated><title type='text'></title><content type='html'>So I cheated. XP deprecates working overtime, but I spent some hours on Sunday working on the Diktat class. This was my first attempt to practise &lt;strong&gt;Test-First Design&lt;/strong&gt;, and the results were encouraging.&lt;br /&gt;&lt;br /&gt;At first, it was hard to think of the tests. But I got the hang of it after a while. The Dyalog Explorer is really coming into its own as I define a test case in a name space &lt;tt&gt;c&lt;/tt&gt;, edit its &lt;tt&gt;comment&lt;/tt&gt; and &lt;tt&gt;lx&lt;/tt&gt; (test expression) values and edit or define any other fns or values it needs. Then &lt;tt&gt;Tests.RunTest c&lt;/tt&gt; gives me a pass or fail.&lt;br /&gt;&lt;br /&gt;XP talks about establishing a development rhythm: write a test, run it to see it fail, write code, see it pass or fail, revise code until it passes test, write another test... &lt;br /&gt;&lt;br /&gt;The beauty of this rhythm is how focused it keeps me. For the &lt;tt&gt;Compare&lt;/tt&gt; method of the &lt;tt&gt;Diktat&lt;/tt&gt; class I wrote three tests: compare a &lt;i&gt;diktat&lt;/i&gt; with itself, with a variant where the text fragments match but the dictionary values don't, and a variant where neither match. (I can think of other tests, but they seem unnecessary.) Defining the tests first had me focus on coding &lt;em&gt;just to pass those tests&lt;/em&gt; without thinking about other issues. That shortened coding time. When the method passed all three tests, I reviewed the code for refactoring opportunities and I was done.&lt;br /&gt;&lt;br /&gt;Reading Wake on &lt;cite&gt;Extreme Programming Explored&lt;/cite&gt;, full of practical illustrations. Sadly, all the illustrations are in (tedious, verbose) Java, but it's still possible to follow the narrative. Leaves me strongly impressed with how much faster I can follow the same paths in APL; just so much less to write or refactor.&lt;br /&gt;&lt;br /&gt;Miki's hanging on Monday for her first exhibition (see &lt;a href="http://www.mikiy.com"&gt;www.mikiy.com&lt;/a&gt;) and for technical support called me back from sunny Surrey and the walk I had planned for after the meeting of the &lt;a href="http://www.vector.org.uk"&gt;&lt;cite&gt;Vector&lt;/cite&gt;&lt;/a&gt; working group. But we did take a break in the new spring weather and played frisbee on Hampstead Heath.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90882930?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90882930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90882930'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_16_archive.html#90882930' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90733745</id><published>2003-03-14T22:31:00.000Z</published><updated>2003-03-14T22:31:12.293Z</updated><title type='text'></title><content type='html'>Back to clients today after working solo yesterday. Classes for printing are shaping up though slower going than I had estimated. I occasionally imagine myself &lt;strong&gt;pair-programming&lt;/strong&gt; the new &lt;tt&gt;Diktat&lt;/tt&gt; classes. In my imagination we seem to be working faster, but then in my imagination I was working faster than this solo.&lt;br /&gt;&lt;br /&gt;While I was away the trainers devised new test cases. With the refactored code, setting up the tests is slightly easier, and reconciling differences with the model answers is quite a bit easier.&lt;br /&gt;&lt;br /&gt;Joe joins me next week for 2-3 days to see if we can work out how to share development. It's a slight but manageable risk to having Release 1 ready for 25 March. (We deferred by one day so I can attend a wedding out of town.)&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90733745?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90733745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90733745'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_09_archive.html#90733745' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90611157</id><published>2003-03-12T22:10:00.000Z</published><updated>2003-03-12T22:10:01.450Z</updated><title type='text'></title><content type='html'>A day spent &lt;strong&gt;refactoring&lt;/strong&gt;. Expected to spend 2 hours on it this morning, spent the whole day. &lt;br /&gt;&lt;br /&gt;First renamed some extracted data fields to fix mistakes in my understanding of which mainframe screens they come from. That broke most of the 32 cases in the test suite, so I edited it to reflect the new names, and wrote simple tools for that as I worked. That did take about 2 hours before we were passing the tests again.&lt;br /&gt;&lt;br /&gt;The APL calculation functions started off closely following the clerks' checklists. As I've developed them, the structure of a Policy class started to clarify in my mind. That got clear enough today that I rewrote the code around a class structure, then revised the test suite to correspond. I also took out a number of algorithmic redundancies seen in passing. By 4.30 all the tests were passing again.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Conclusion:&lt;/em&gt; while I had a different agenda in mind, the refactoring was better done today. I'm now in good shape for tackling the output documents tomorrow. And I would &lt;em&gt;never&lt;/em&gt; have been able to complete such radical refactoring in a single day without the &lt;strong&gt;automated tests&lt;/strong&gt;. Never, ever.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90611157?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90611157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90611157'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_09_archive.html#90611157' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90534684</id><published>2003-03-11T18:32:00.000Z</published><updated>2003-03-12T21:52:05.000Z</updated><title type='text'></title><content type='html'>&lt;strong&gt;Pair programming with the customer.&lt;/strong&gt; The clerks training me are reading over my shoulder now, checking rules on screen. The code to them is like a foreign language in which they recognise some words and phrases. I have laid out the high-level code to resemble their own procedure checklists, with similar comments and headings. So they can find their place and look for familiar terms. And I've been careful to use their terms as I build up my vocabulary of APL functions.&lt;br /&gt;&lt;br /&gt;Today Kim returned from a conference with other trainers to find out whether we had included a rule they had been discussing. Do we, she asked, check whether the valuation date is earlier than the third policy anniversary before the original retirement date? She scanned the screen, found her place and saw&lt;br /&gt;&lt;br /&gt;&lt;font class="apl"&gt;valdate&amp;gt;2 yrsBefore pol.StartDate aoob4 origNRD&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;They can't write code, but I've been translating it into English, pointing at the words, and they follow the thread. It's like my Italian. I've never studied Italian, but I can recognise enough to say what a newspaper article is about. &lt;br /&gt;&lt;br /&gt;I'm ruining them for traditional software development.&lt;br /&gt;&lt;br /&gt;Got hold of an output document and its embedded macros today. Tomorrow I'll build the text library, the scribe to produce an RTF document from a diktat, and convert the Word macros into a script. Yee ha.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90534684?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90534684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90534684'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_09_archive.html#90534684' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90489968</id><published>2003-03-11T01:02:00.000Z</published><updated>2003-03-11T01:02:41.560Z</updated><title type='text'></title><content type='html'>Another day away from the customers: doesn't feel right any more. Visited Paul to discuss the data fields to be retrieved from the mainframe. Do we know what they are yet? Yes and no. Yes, because the clerks have reviewed the mainframe screens with me and highlighted the fields they copy. No, because that process missed some fields, which we found when they taught me some of the procedures and I coded them. I haven't coded all the procedures &lt;em&gt;ergo&lt;/em&gt; we don't know what all the fields are yet. So I upgraded the testing rig to index the data fields from the test suite.&lt;br /&gt;&lt;br /&gt;Also created a Policy class and started converting existing functions into its methods, revising test cases to match.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://c2.com/cgi/wiki?SimonGarland"&gt;Simon Garland&lt;/a&gt; suggests having the mainframe data exported as a Web Service, eerily echoing the BCS-OOPS &lt;a href="http://www.bcs-oops.org.uk/webserviceseveningseries.html"&gt;evening seminar series&lt;/a&gt; Peter, Paul and I've been attending. &lt;br /&gt;&lt;br /&gt;Tomorrow (today by the time I post this) the users and I will finish the procedures for Release 1 and review the output documents and the rules used for writing them.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90489968?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90489968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90489968'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_09_archive.html#90489968' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90325005</id><published>2003-03-07T22:26:00.000Z</published><updated>2003-03-07T22:40:29.000Z</updated><title type='text'></title><content type='html'>Celebrated winning the project commission: dinner for three at &lt;a href="http://www.rules.co.uk"&gt;Rules&lt;/a&gt;, London's oldest restaurant. Classic English food perfectly done. We warmed up with Stilton &amp; celeriac soup, fried whitebait and walnut &amp; Stilton tart, moved onto venison and duck and finished with heart-stopping puddings. Thankfully a decent walk back to the car, so heads could clear.&lt;br /&gt;&lt;br /&gt;Yesterday a &lt;strong&gt;planning session&lt;/strong&gt;. We can cannibalise the shell of a similar system, which gives us system infrastructure. We'll use the RTF printing layer I wrote last year, which makes it easy to produce editable, well-formatted documents. Today I'll complete analysis of the processing rules for the first of the 8 groups of procedures, which means we'll have tested code for them. Paul will adapt the other system's GUI to provide review and editing of the data sucked from the mainframe. All that's missing is the live link to the mainframe. We announced that we would have Release 1 in place, without the mainframe link, but with everything else working for Group 1 procedures, on 24 March.&lt;br /&gt;&lt;br /&gt;Managing change and &lt;strong&gt;embracing change&lt;/strong&gt;: visited one of the customer's managers to follow up on our request for an internal programmer to help us link to the mainframe. His informal request didn't make it past the change-management processes that protect the IT resources. A formal request will be considered by the Change Board, which meets once a month. That's great we said, we just want you to know we're delivering Release 1 in just over two weeks -- without the mainframe link. Perhaps that provides a useful context for the request?&lt;br /&gt;&lt;br /&gt;Chief output is letters and documents. How to &lt;strong&gt;automate acceptance testing&lt;/strong&gt;? We could compare RTF code streams, but this is too fine-grained. Trivial changes in appearance would break the tests. We invented a new data structure, the &lt;em&gt;diktat&lt;/em&gt; to represent output document contents. A diktat consists of a list of APL expressions, a dictionary (list of name-value pairs) and a list of text-table references. A text-table reference is either a pointer to a text fragment in a library of such fragments, or a table definition in the same library. A text fragment is just a character string with escape characters used to embed the names of values to be mapped from the dictionary. A table definition is, I think, just the name of an array from the dictionary. Executing the APL expressions in sequence (so maybe the list is a fn) gets you an RTF document object. But before you do that, ie ignoring the formatting expressions, you can compare the dictionary and text-table refs with another diktat to see if, at this granularity, the document contents match.&lt;br /&gt;&lt;br /&gt;Notice we can edit text fragments in the library without breaking tests. Also that we can tinker with presentation without breaking tests! This a breakthrough for us.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90325005?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90325005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90325005'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_02_archive.html#90325005' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90205688</id><published>2003-03-06T00:30:00.000Z</published><updated>2003-03-06T00:30:29.780Z</updated><title type='text'></title><content type='html'>The client has divided into 8 groups the processes we are automating. We have nearly finished the acceptance test cases for the first group. This is a cracking pace: I'm not sure we have been allocated a project code yet; I don't yet have a desk or a machine on the client's network, nor even a pass to the building.&lt;br /&gt;&lt;br /&gt;I'm hoping that by the time I've coded the procedures in the second group I'll have enough confidence in the identification of mainframe data used to have someone start work on the interface.&lt;br /&gt;&lt;br /&gt;Switched today to my second trainer. I'm now being trained on the procedures by 2 clerks, alternating so I can work a longer day than they do. Although they are training me in different procedures, there is enough overlap that I encounter with one rules that I have coded from the training of the other. Today we hit that for the first non-trivial time.&lt;br /&gt;&lt;br /&gt;Revised the calculation of Single Premium penalties so that it now returns a pair of results where before it had returned one. That got today's new case to work, but when I ran the test suite we got a scatter of red lights where earlier test cases broke. Revised the programs to use the result pair and we got green lights. Took maybe 10 minutes, during which the clerk went back to signing paperwork. &lt;br /&gt;&lt;br /&gt;I'd been concerned about evolving the code like this, having to return to fix earlier cases. In principle, the problem could grow geometrically with the test suite; in practice probably much less. &lt;br /&gt;&lt;br /&gt;In all we had two such breaks today. The earlier one was while I coded the split -- another ten minute break. Otherwise the coding takes about as long as it would take me to make a note in English of what to do, and we just have a pause in the conversation.&lt;br /&gt;&lt;br /&gt;The point -- in terms of XP distinctions -- is not that it takes less time to code. The point is that it takes so little time that it can be done in conversation with the user. It's &lt;em&gt;all&lt;/em&gt; about facilitating communication. So a conversation which otherwise would produce paper notes, followed by a gap for coding, then follow-up questions, followed by reviews and acceptance tests and analysis of where my code varies from whatthey think they told me to do -- all that gets collapsed into a single conversation. Not just less time, but more freedom and far fewer errors. Or so I say.&lt;br /&gt;&lt;br /&gt;I've looked up the &lt;a href="http://www.xpdeveloper.com/xpdwiki/Wiki.jsp?page=FrontPage"&gt;London XP community website&lt;/a&gt; and will go to their Extreme Tuesday Club in two weeks. Will I be the only non-Java programmer there?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90205688?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90205688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90205688'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_02_archive.html#90205688' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90166022</id><published>2003-03-05T08:44:00.000Z</published><updated>2003-03-05T08:53:58.000Z</updated><title type='text'></title><content type='html'>&lt;a href="http://dapl.blogspot.com"&gt;Paul Mansour&lt;/a&gt; has linked to this still experimental blog. I guess we're not in Kansas any more, Toto.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90166022?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90166022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90166022'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_02_archive.html#90166022' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90165877</id><published>2003-03-05T08:38:00.000Z</published><updated>2003-03-05T08:38:48.030Z</updated><title type='text'></title><content type='html'>Writing code that shadows the structure of the clerks' checklists and procedures makes it easy to match what I'm doing with what they're doing. And the code cries out for refactoring! But right now isomorphism with the paper procedures is too valuable, so refactoring will wait until the procedure code has stabilised.&lt;br /&gt;&lt;br /&gt;Some paper procedures refer to other procedures, so there is a degree of modularity already. &lt;br /&gt;&lt;br /&gt;But many of the questions recur from procedure to procedure, and refer almost entirely to facts about a policy, so should become methods of a Policy class. AgeAt is an obvious one.&lt;br /&gt;&lt;br /&gt;The test rig is a delight. &lt;font class="apl"&gt;RunSuite&lt;/font&gt; a mere handful of code lines; &lt;font class="apl"&gt;ShowSuite&lt;/font&gt; a couple of 1-line D fns. The clerks can read the displayed test cases without help. &lt;br /&gt;&lt;br /&gt;In following the application code, Kim is starting to recognise and remark on primitive APL expressions, and wonders whether she could use J to support her daughter's school math. She and Sarah are intrigued by how I generate and handle collections of data in immediate-execution mode. No wonder actuaries were among the first to adopt APL.&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90165877?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90165877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90165877'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_02_archive.html#90165877' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90073918</id><published>2003-03-03T22:40:00.000Z</published><updated>2003-03-06T00:36:16.000Z</updated><title type='text'></title><content type='html'>This is exciting. Had difficulty analysing the pension valuation procedures. The clerks can perform them, but get confused trying to talk or reason about them. The documentation they use themselves turns out to be full of ambiguities resolved in practice by conversation with or among the senior clerks. Given the flakiness of their own documentation, what hope of communicating via any formal specification?&lt;br /&gt;&lt;br /&gt;XP urges me to resolve the problem verbally. But I can't get enough certainty about a procedure to go and code it with any confidence that it will do what a clerk does. Nor can I break their procedures up into chunks small enough to tackle, because reasoning about the &lt;em&gt;structure&lt;/em&gt; of the procedures drives them nuts. They can &lt;em&gt;show&lt;/em&gt; me what they do, but they can't discuss it much!&lt;br /&gt;&lt;br /&gt;Solution. I've used Dyalog namespaces to encode a hierarchical structure for policy data, in which the nodes are named after mainframe screens and the leaves after field labels. We should be able to fill structures like this either by screen scraping (yecch) or some inquiry process. &lt;br /&gt;&lt;br /&gt;I've built a tiny but effective test rig -- the simplest thing that could possibly work. A case is represented by a namespace containing (at least) a variable &lt;FONT class="apl"&gt;lx&lt;/FONT&gt;. A &lt;FONT class="apl"&gt;RunTest&lt;/FONT&gt; fn executes the string in &lt;FONT class="apl"&gt;lx&lt;/FONT&gt; and reports passed, failed or broken. Name references in &lt;FONT class="apl"&gt;lx&lt;/FONT&gt; get resolved first in the case namespace, so into the case as variables go any values needed by the test expression. A tiny recursive D fn suffices to display the contents of the case. An APL component file holds all the cases (a test suite) and a simple fn &lt;FONT class="apl"&gt;RunSuite&lt;/FONT&gt; returns a string of &lt;FONT class="apl"&gt;1&lt;/FONT&gt;s, &lt;FONT class="apl"&gt;0&lt;/FONT&gt;s and &lt;FONT class="apl"&gt;¯1&lt;/FONT&gt;s corresponding to passed, failed or broke. &lt;br /&gt;&lt;br /&gt;So far I've accumulated a score or so test cases, all readable by the clerks, where we can see the test data and the asserted result. &lt;br /&gt;&lt;br /&gt;Here's how I now work. Forget analyse, design, code. This is code, test, refactor. Sitting with the user, I record the test case in immediate-execution mode. Then the clerk tells me what she does, and I code the rules as she tells them to me. She generally spends more time stating the rule than I spend coding it. For example: &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Go to IIMG screen 17, find all the records where field PH is zero and sum all the positive values of AMOUNT.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="apl"&gt;pol.IIMGS17.((PH=0)+.×0˜AMOUNT)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;or:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Decide whether policy payments stopped at any time. Do any of the AMOUNTs in phase 0 total the sum of all earlier AMOUNTs in phase 0?&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="apl"&gt;0Ÿ.=+\pol.IIMGS17.(AMOUNT/þPH=0)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Because the code is terse, I can write code instead of notes and just resume the conversation. The clerk can't read the APL expressions, but can see the field labels and screen names. She can see the control structures (often deeply nested) and my variables, which I take pains to name in her vocabulary. (Terseness, functional programming style and D fns allow me to avoid storing any values she doesn't relate to.) As we reach and execute code, I translate to English.&lt;br /&gt;&lt;br /&gt;So we code up her rules. When we're done, we run the test case, which either passes, fails or breaks. If it breaks I can fix it without stopping our session. If the test fails, we can run the code a line at a time, tracing the rules and examining values. When the test passes, we append it to the test suite and rerun all the tests to see if our code changes broke anything.&lt;br /&gt;&lt;br /&gt;We follow this path for one kind of policy, then return and modify the rules to accommodate the next. We never need to discuss the rules as framed for all cases, only follow specific cases and ensure we don't break earlier test cases.&lt;br /&gt;&lt;br /&gt;No analysis phase. No specification document. Just a client-developer conversation which finishes with accepted code. This is like breathing pure oxygen. I think I'm going to get a nose bleed.&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90073918?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90073918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90073918'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_02_archive.html#90073918' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry><entry><id>tag:blogger.com,1999:blog-5120829.post-90025595</id><published>2003-03-03T02:17:00.000Z</published><updated>2003-03-05T08:43:18.000Z</updated><title type='text'></title><content type='html'>In January this year I was with Adrian &amp; Gill Smith, working on &lt;a href="http://www.vector.org.uk"&gt;&lt;i&gt;Vector&lt;/i&gt;&lt;/a&gt;, the British APL Association's journal. Adrian &amp; Gill live in a small village in North Yorkshire, handy for tramping snow-covered moors. The kitchen is the place to work, with laptops in comfortable range of the solid-fuel Aga stove. There I saw shoved into a pile of papers a copy of Kent Beck's &lt;i&gt;Extreme Programming Explained: Embrace Change&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;Ray Cannon had been drip-feeding me pearls of wisdom about Extreme Programming (XP) for a year. "Extreme Programmers test each line as soon as they've written it," he would announce. Madness, I'd think. "Extreme Programmers program in pairs." Right. I wondered whether there &lt;i&gt;was &lt;/i&gt;such a thing as XP, or whether Ray was simply making this stuff up.&lt;br /&gt;&lt;br /&gt;Now here was a book. Ray was definitely not making this stuff up. In any case: testing each line of code as you wrote it. Who would make up stuff like that? It turned out Ray hadn't read Beck's book, the original source book on XP. He'd read &lt;i&gt;another &lt;/i&gt;book, one that compared XP with other processes, but didn't say a lot about what XP is. Ray had inferred what he thought he knew about about XP from the comparisons. Some of the time, he was right.&lt;br /&gt;&lt;br /&gt;Did it matter? Apparently it did. The days I'd spent with Gill &amp; Adrian, Scott Adams had been lampooning XP in the his &lt;a href="http://www.dilbert.com"&gt;&lt;i&gt;Dilbert&lt;/i&gt;&lt;/a&gt; comic strip. If &lt;i&gt;Dilbert&lt;/i&gt; was making fun of it, it must be getting around. While waiting for the morning porridge to emerge from the Aga, I dug in.&lt;br /&gt;&lt;br /&gt;In Zen Buddhism there is a tradition of public question-and-answer sessions with a master. The monks ask questions to provoke the master to make present something of the &lt;i&gt;dharma&lt;/i&gt;. A good question also makes the questioner look pretty good, but if you don't have a really confronting, original question, there are some proven standards to ask. One is "Why did Bodhidharma come from the West?"; that is: what is the point of all this? Another is, "What, in Zen, is worth keeping?"&lt;br /&gt;&lt;br /&gt;A version of this had been puzzling me for some time, and Adrian and I had been chewing it over. Decades back, APL had looked like the future of computing. Now fashion had moved on. What, I wondered, in APL is worth keeping? Put another way, what is it I love so much about making software this way that I'm fighting for it rather than investing in learning C++ or Java?&lt;br /&gt;&lt;br /&gt;One answer is the aesthetic satisfaction of extreme elegance. APL solutions can pare a problem down to its bones, and then solve it with a simple rearrangement and a fast rattle. Pure solution, no marbling. Verbose languages don't even come close.&lt;br /&gt;&lt;br /&gt;Another is a fast, informal style of development. I'd moved away from this in the 1980s, caught up in the certainties promised by Software Engineering. Like many others, I had instead the experience of working on projects that produced more diagrams and specification documents than usable code. In retrospect I can read my own history as having been discouraged into quitting software development for over a decade. How are the flighty maulen.&lt;br /&gt;&lt;br /&gt;Beck's book was a breath of fresh air. Or, in Adrian's kitchen, an icy draught. In his view, producing systems quickly with small teams and minimal process, as we'd done in the early days, was &lt;i&gt;right&lt;/i&gt;. But he brought to it rigorous practices I'd never seen before, such as Test-First Design and Pair Programming. He and others were reporting the kind of astonishing results successful APL projects had been famous for, and doing it with verbose languages like Java. It seemed as if APL's lightweight development had been reincarnated. That which was worth preserving had emerged once more, or at least part of it had.&lt;br /&gt;&lt;br /&gt;With the good people at &lt;a href="http://www.optima-systems.co.uk/"&gt;Optima Systems&lt;/a&gt;, I'd been positioning APL as a vehicle for tactical systems solutions. This should have been a productive line to take. The customer is a major UK life office. Its recent mergers have left it with hundreds of systems and interfaces, while a rapidly changing regulatory environment and plunging stock market have intensified the pressure for results. &lt;br /&gt;&lt;br /&gt;In January this year, we got the break for which we had been lobbying. Last week we got approval for what is to be an exemplary piece of software development. We are working with one of the customer's operating divisions. We have to get a useful system into production within 3 months, and it has to repay in this calendar year, out of savings from budgeted operational costs, all its development and first-year maintenance costs. Our kinda game.&lt;br /&gt;&lt;br /&gt;It doesn't meet all the selection criteria for using XP. We're a 2-man team, and our software process isn't "broken". But I can see the potential in practices like Test-First Design for lifting our already impressive game. &lt;br /&gt;&lt;br /&gt;We're off.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5120829-90025595?l=aplxp.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90025595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5120829/posts/default/90025595'/><link rel='alternate' type='text/html' href='http://aplxp.blogspot.com/2003_03_02_archive.html#90025595' title=''/><author><name>Stephen Taylor</name><uri>http://www.blogger.com/profile/08224834547576093432</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://www.5jt.com/images/stephen180x230.jpg'/></author></entry></feed>
