Requirements, Design, Implementation, Verification, Maintenance

Spent a few cycles yes­ter­day think­ing about Lau­rent Bossavit’s provo­ca­tion, and while I’m hav­ing fun get­tin’ all com­plex­o­log­i­cal after so many years away from the Santa Fe Style, I’m increas­ingly con­fi­dent it’s not quite what he was ask­ing for.

After all, com­plex sys­tems mod­els offer no pre­dic­tive value, except in the sense that they pro­vide insights into mod­els’ intrin­sic con­se­quences. As with Genetic Pro­gram­ming vs Sta­tis­tics, agent-​​based com­plex sys­tems mod­els are use­ful only inso­far as they sur­prise and inspire fur­ther mod­els, not as tools inter­act­ing with the “real world”.

At any rate, I’m find­ing it a use­ful exercise.

Here’s where I am now, as of this writ­ing (link to old commit).

Per­son­ally I’m con­fi­dent that the toolkit of com­plex­o­log­i­cal mod­el­ing is emi­nently prac­ti­cal; Nk mod­els, Boolean net­works, agent-​​based sim­u­la­tion, all the rest is in my blood, so the design pat­terns are so obvi­ous to me that I can slap some­thing together in a few min­utes. But it’s inter­est­ing as I talk with folks (Lau­rent and Ron Jef­fries, among oth­ers) about this lit­tle sketch, how often my cor­re­spon­dent wants to drop my mod­el­ing toolkit back down to the famil­iar level of aggrega­tive sta­tis­tics, or stock-​​and-​​flow continuous-​​valued sys­tems models.

Sub­jec­tively, when folks ask for some­thing so intrin­si­cally focused on story-​​telling to be “sim­pli­fied down to cleaner math”, it fees a lot like when old-​​school pro­gram­mers ask to use Inte­ger val­ues for Boolean val­ues (“-1 is false!”), or when I see sim­ple structs of prim­i­tives used instead of full-​​fledged objects in an object-​​oriented lan­guage. Some­thing about habits and famil­iar­ity, surely, but also an utterly dif­fer­ent sense of ele­gance and pur­pose, of craft, creep­ing in.

(Which is inter­est­ing, and worth watch­ing over time. Some­thing very sim­i­lar comes up when I read this.)

At any rate, a Boolean Net­work feels like a nice, tun­able model of a com­plex world with hid­den inter­nal struc­ture. In addi­tion to tun­able inter­nal com­plex­ity, one can always add exter­nal­i­ties, noise, struc­tural dynam­ics, all sorts of things that model the way we treat error and uncer­tainty in the real world much more authen­ti­cally than merely adding some normally-​​distributed epsilon to a number.

But there’s an inter­est­ing mod­el­ing choice before me, now, and I’m think­ing aloud about it. As you’ve read, I’ve sketched a world with use­ful tun­able para­me­ters; I’ve sketched a com­par­i­son (“water­fall” vs “agile” as vari­a­tions in tim­ing and order of staged work). But one does want one’s sim­u­lated “Team” to be able to do that work in a rea­son­able way.

So what is “require­ments gath­er­ing”? Or design, or cod­ing, or test­ing? As hap­pens now and then when build­ing com­plex sys­tems mod­els, the ques­tion is not “What do peo­ple really do?”, but rather, What is the sim­plest con­vinc­ing mimic of what is implied by a story in which we say, ‘Five require­ments have been gath­ered’? Or, Six­teen designs have been con­sid­ered, or Eleven tests have been cre­ated and run?

I have some notions, as you can see in my notes at GitHub. But there’s also this feel­ing that peo­ple brought up in the clas­si­cal math­e­mat­i­cal mod­el­ing world (the one that per­fuses com­puter sci­ence as well) will prob­a­bly raise their eye­brows. One is brought up to think of vari­ables as prim­i­tives, and of inter­ac­tions not as algo­rithms but as equa­tions. One is trained by decades of expen­sive com­put­ing and resource lim­i­ta­tion to assume that aggre­ga­tion takes place prop­erly within a model, using stocks and flows and aggrega­tive mea­sures and sta­tis­tics, deriv­a­tives and aver­ages all over—and not to see each instance or run of a model as being contingent.

This is a kind of pre­ma­ture opti­miza­tion that I haven’t heard remarked before. But I think it’s close to the core of what makes “com­plex­ol­ogy” abhor­rent unto the jour­nal­ist. And what’s inter­est­ing is that it’s com­ing from nerds who have almost cer­tainly dab­bled a bit with these alien, thrilling, com­plex­o­log­i­cal mod­els: imple­mented a Game of Life, for example.

And yet I think most haven’t real­ized that con­tin­gency and sub­jec­tiv­ity are baked right in. Pro­tip: On aver­age, over long time scales, all Game of Life runs are empty.

Maybe nobody’s pointed that out before. I think they prob­a­bly ought to have done so. :)

9 thoughts on “Requirements, Design, Implementation, Verification, Maintenance

  1. Bill -

    The story telling aspect of this is the inter­est­ing part, because inevitably things get sim­pli­fied down when things are complex.

    The world I live in at the moment has fail­ures from time to time within a Sys­tem, and so there’s a set of nar­ra­tives that get con­structed about each of these. Inevitably the user per­spec­tive on the Sys­tem is some­what abstract, so you don’t want your story about what went wrong with the Sys­tem to be so full of sharp pointy edges that peo­ple lose con­fi­dence in its abstract beauty. Yet the devel­op­ers of the Sys­tem know all too well, or need to be reminded from time to time, that there are indeed sharp pointy edges and that you can’t always do every­thing in a way that looks like the obvi­ous way to do it.

    The per­pet­ual chal­lenge is to tell a story that is sim­pli­fied enough to make sense to the user, but not so over­sim­pli­fied that the sys­tem builder doesn’t rec­og­nize it.

    I’m sure that your cor­re­spon­dents sim­ply want you to tell them a story that doesn’t require that you invoke magic to explain it; or, if there really is magic going on deep inside, that it gets hid­den enough with sooth­ing words that sound like you are describ­ing some­thing non-​​magical (at least from the outside).

  2. This is inter­est­ing, and already serv­ing one of the pur­poses you’ve set for it: inspir­ing fur­ther mod­el­ing efforts.

    For instance I imme­di­ately started won­der­ing how one might trans­pose the two Agile prac­tices that are cur­rently top­most in my mind at the moment (for con­tin­gent rea­sons) into this model’s terms: Sim­ple Design, aka YAGNI, and sign­ing up for tasks.

    The lat­ter is inter­est­ing, inso­far as it relies on “the knowl­edge that one kind of agent has about other agents”, at least if you want to model the pre-​​Agile approach to project man­age­ment, where the PM is the one expected to par­cel out tasks to devel­op­ers. (In many of the places where I worked pre-​​Agile this was in fact one of the PM’s major pre­rog­a­tives, and to ques­tion it would have been polit­i­cally unthinkable.)

    As for YAGNI, the prop­er­ties of NK net­works are obvi­ously applic­a­ble directly — many local optima and short hill-​​climbs, directly lead­ing to the often-​​discussed prob­lem of “plan­ning ahead” in soft­ware design.

    I’m also kind of sur­prised at where you’ve placed the empha­sis in your mod­el­ing effort: The Mar­ket, a large aggre­gate of peo­ple exter­nal to the small aggre­gate of peo­ple who are actu­ally directly involved in writ­ing the soft­ware. I might have started with The Cus­tomer. Then again, per­haps we’d end up in the same place, since The Cus­tomer can often be mod­eled as an aggre­gate of con­flict­ing desires, not totally unlike an aggre­gate of many people.

    One of the dif­fer­ences of inter­est in Agile vs. “plan dri­ven” (for lack of a bet­ter term, but I’d rather use a phrase more con­struc­tive than “non-​​Agile”) is the dif­fer­ing focus on spe­cial­iza­tion and boundaries.

    In plan-​​driven work, more of the “require­ments” work con­sists of hav­ing Ana­lysts talk­ing to Cus­tomers, where Ana­lysts are agents whose toolkit does not include “Cod­ing”, but does include “Ques­tion­ing”. You could model “Ques­tion­ing” as an activ­ity that yields some amount of infor­ma­tion about The Mar­ket (or about The Customer’s under­stand­ing of The Mar­ket). Only when the Ques­tion­ing starts to con­verge on a sta­ble set of answers do these projects move on to the imple­men­ta­tion phase, which is taken over by Devel­op­ers who have Cod­ing in their toolkit but not Ques­tion­ing (or have it but have a high cost imposed on them for using it, etc.).

    In Agile work, both Ques­tion­ing and Cod­ing yield infor­ma­tion, Devel­op­ers are expected to have both in their toolkit, and to engage in both. Cod­ing addi­tion­ally yields infor­ma­tion about the “inter­nal” fit­ness land­scape of the prod­uct, *and* is a noisy gen­er­a­tor of that same inter­nal fit­ness land­scape. What kind of Devel­oper works on what kind of tech­ni­cal task is part of the sources of noise. A poten­tial down­side is that the Cus­tomer is now play­ing an active role through­out, with Cod­ing hav­ing an impact on how they respond to Questioning.

    To me, the kind of model you seem to be propos­ing are valu­able inso­far as they pro­vide a way to “mimic” the *dif­fer­ences* between these approaches. Agent-​​based seems like a poten­tial good fit because I can express poli­cies like YAGNI or incre­men­tal con­struc­tion, vs. spec­u­la­tive design or sequen­tial phases, in terms of algo­rithms, of explicit poli­cies (a.k.a. “process”).

    The down­side is that the model must, up-​​front, pro­vide a rich enough ontol­ogy that these algo­rithms will say some­thing mean­ing­ful, and that was the bar­rier I hit.

    I’m curi­ous to see where you’re going; I promise to jump in and start writ­ing code (“you had me at .rb”) as soon as I see a way to express the dis­tinc­tions I’m inter­ested in.

    I feel fairly com­fort­able with con­tin­gency — the idea that just set­ting the right poli­cies may not deter­min­is­ti­cally lead to the out­comes I expect, that things like but­ter­fly effects might come into play. I feel fairly com­fort­able with sub­jec­tiv­ity — the idea that the model by itself *proves noth­ing* about Agile one way or another, and that after see­ing how the mod­els turn out I still have to do all of the hard work of think­ing about my own sit­u­a­tion and tak­ing deci­sions I will be account­able for.

  3. Inter­est­ing thoughts, Lau­rent. In par­tic­u­lar, as I think about there being two “agents”, an Ana­lyst and a Pro­gram­mer, with the Ana­lyst doing the ques­tion­ing in one case, the Pro­gram­mer doing it in another … and HEY! how about if they sat together dur­ing the Questioning …

    … it seems to me that an impor­tant issue is how many of the Answers wind up in the Programmer’s head, because only the Pro­gram­mer builds the pro­gram, and it will have noth­ing in it that was not in the Programmer’s head.

    So if the Ana­lyst gets X% of the Answers when he works alone, and the Pro­gram­mer gets Y%, Y prob­a­bly < X, and then the Ana­lyst com­mu­ni­cates the Answers to the Pro­gram­mer, who then gets f(X) answers, where f is some func­tion with range 0 <= f <= 1, we can model and exper­i­ment with the notion of hand-​​off. And if we put the Pro­gram­mer in the room while the Ana­lyst Ques­tions, the Pro­gram­mer will hear both the Ques­tions and the Answers. She may get them bet­ter hav­ing heard them first hand, which we can model. And there’s more! She may even ask Ques­tions of her own, since she is now in a con­ver­sa­tion that has removed much of the dis­com­fort, and we can model her dif­fer­ent (and in some ways bet­ter for the imple­men­ta­tion) Ques­tions and her bet­ter appre­hen­sion of Answers she cares about.

    Per­haps that makes sense. I know it inter­ests me. :)

  4. Use­ful pushes. You’ve made me think a bit more about my old friend Scott’s work regard­ing diver­sity of “men­tal toolk­its” and problem-​​solving.

    I’ll spend a bit of time this after­noon and fill in the “tbd” parts of my sketchy pré­cis. In par­tic­u­lar, what “require­ments”, “design”, “imple­men­ta­tion”, “ver­i­fi­ca­tion” and “main­te­nance” might be.

    We’ll see if we can still come to an agree­ment about what’s of inter­est, since as you say Lau­rent, I was start­ing with the premise that we’re talk­ing about a dif­fer­ence between insti­tu­tions, and that all exter­nal­i­ties (the Mar­ket) are sim­ply received infor­ma­tion about some abstract process out­side. The com­par­i­son I’m head­ing towards comes out of a chat with Ron the other day, where he reminded me that of course “analy­sis”, “design”, “cod­ing”, “test­ing” and that other one are all present in both insti­tu­tional mod­els; just that the cri­te­ria and respon­si­bil­ity for mov­ing from one to another are different.

    As a preview-​​ish thing, what I was con­sid­er­ing was that a “unit” of “requirements/​analysis” might involve look­ing at the his­tor­i­cal data for one fea­ture in The Mar­ket, and build­ing a sta­tis­ti­cal regres­sion model, say a sim­ple ran­dom for­est or CART tree—something that would pre­dict the future of that fea­ture, but not in a use­ful for­mat (since our Team isn’t build­ing sta­tis­ti­cal mod­els, it’s build­ing Boolean Networks).

    Design” would involve trans­lat­ing the model (of one or a few fea­tures) into a Boolean net­work tem­plate; “imple­men­ta­tion” would be a time-​​consuming mat­ter of “sim­ply” fill­ing out the val­ues in the tables; “test­ing” would be com­par­ing the more recent Mar­ket behav­ior to the out­put of the code, and “main­te­nance” would red-​​flag fea­tures as “re-​​work” if the errors passed a cer­tain threshold.

    Now I can see a cou­ple of places where your inter­est in the local­iza­tion of skills (in “ana­lysts” or “coders”) might slot in there.

    My goal, though, is sim­ply to deliver a model that if you squint is able to per­form as a “water­fall” or an “agile” team, and which has plenty of places for errors, risks and such to be explored after a “per­fect” ver­sion is written.

  5. > of course “analy­sis”, “design”, “cod­ing”, “test­ing” and that other one are all present in both insti­tu­tional models

    I’m not totally sure there’s an “of course” about that — I tend to treat these activ­i­ties more as sense-​​making devices than as the One True way to carve the nature of soft­ware devel­op­ment at its joints. But that shouldn’t be a prob­lem for this con­ver­sa­tion. :)

  6. Lau­rent, point of order: an Nk model is dif­fer­ent from a Ran­dom Boolean Net­work. An Nk model is a fixed func­tion of N inputs mapped to a sin­gle “per­for­mance” or “fit­ness” mea­sure. A Boolean Net­work is a dynam­i­cal sys­tem, with no intrin­sic “fit­ness” attribute.

  7. Pingback: Five Blogs – 12 March 2012 « 5blogs

  8. What I’m hear­ing in your dis­cus­sions is a focus on the role of inter­nal com­mu­ni­ca­tion and learn­ing to the suc­cess of a project.

    I had orig­i­nally intended to model these func­tion­al­i­ties as essen­tially opti­mal to begin with, and per­mit per­fect trans­fer of infor­ma­tion between them in both project struc­tures (one-​​cycle, many-​​cycle). And then later add in some real­is­tic inef­fi­cien­cies, like bounded ratio­nal­ity, iner­tia in learn­ing or just-​​plain-​​errors.

    But it sounds as if you both really want the actions of Analy­sis (“requirements-​​gathering”) and Cod­ing (“imple­men­ta­tion”) to start off as the sub­ject of our sto­ry­telling, rather than being a mere con­trol para­me­ter as I’d con­sid­ered. Can do.