[ Content | Sidebar ]

initial release of unit test framework

July 8th, 2006

I’ve got the unit test framework cleaned up a bit: its interface should be relatively stable now, there’s some amount of documentation, and doing ‘make install‘ should work. Still more stuff to do before I want to announce it more widely – at the very least, I should make a tar file available, but some rpm’s and a bit more cleanup would also be nice – but I’m happy with what’s there, and would recommend it to anybody needing to write unit tests for C++ code in a Unix environment.

holt on responsibility

July 8th, 2006

From the preface to the revised edition of How Children Fail, by John Holt:

After this book came out, people used to say to me, “When are you going to write abook about how teachers fail?” My answer was, “But that’s what this book is about.”

But if it is a book about a teacher who often failed, it is also about a teacher who was not satisfied to fail, not resigned to failure. It was my job and my chosen task to help children learn things, and if they did not learn what I taught them, it was my job and task to try other ways of teaching them until I found ways that worked.

For many years now I’ve been urging and begging teachers and student teachers to take this attitude toward their work. Most respond by saying, “Why are you blaming us for everything that goes wrong in schools? Why are you trying to make us feel all this guilt?”

But I’m not. I didn’t blame myself or feel guilt, just because my students were so often not learning what I was teaching, because I wasn’t doing what I had set out to do and couldn’t find out how to do it. But I did hold myself responsible.

“Blame” and “guilt” are crybaby words. Let’s get them out of our talk about education. Let’s use instead the word “responsible.” Let’s have schools and teachers begin to hold themselves responsible for the results of what they do.

I held myself responsible. If my students weren’t learning what I was teaching, it was my job to find out why. How Children Fail, as I said, was a partial record of my not very successful attempts to find out why.

random links: july 6, 2006

July 6th, 2006

the progressive

July 6th, 2006

One of the things I’ve been doing on vacation is going through my backlog of magazines. There are too many ways to make your suitcase heavier on a trip; might as well find ways to lighten it, by bringing discardable reading material along.

They only make some of their issues available online, so I can’t link to all of my recent favorites, but I thought these articles were pretty good.

who designs?

July 5th, 2006

I’m in the middle of reading A New Theory of Urban Design. Not one of Alexander’s best (though it’s interesting enough); it’s hurt by problem that, as he comments, part of the theory that he’s discussing “remains unpublished. It will appear in a later volume of this series, “The Nature of Order”. Which turned into four volumes, of course, but who’s complaining? At least he’s avoided the Grothendieck problem (hardly unique to Grothendieck, of course) of publicly sketching out grand plans of future volumes which then divide further and remain unfinished. (Or maybe he has sketched out many future volumes, and I’m just unaware of it.)

The book presents the following “Overriding Rule” of design:

Every increment of construction must be made in such a way as to heal the city. (p. 22)

This gets recasted as follows:

Every new act of construction has just one basic obligation: it must create a continuous structure of wholes around itself. (p. 22)

He then talks about how each piece of construction affects the field of centers of the work: each increment should simultaneously work to support some center larger than itself, while fitting in with the adjacent centers and being made up out of smaller centers. (The notion of “centers” gets explained in The Nature of Order.) Which is an interesting way to think about programming: can we program in such a way that every chunk of code that we write heals the code base, developing a harmonious interplay of centers?

As in all of his work, this design is done collaboratively and incrementally. Which are both ideals that are dear to XP’s heart. Except when they aren’t. You can talk about a program’s design in terms of either how it behaves towards the programmer or how it behaves towards the user. The former sort of design is done collaboratively and incrementally; the latter is done incrementally, but isn’t done collaboratively. Instead, XP says that there should be a Customer speaking with a single voice, either being a single person or being filtered through a single person.

Why is this? And do I think it’s a good idea? To start with the latter: my tentative answer is no. If I’ve drunk the collaborative kool-aid elsewhere, I don’t see why I shouldn’t drink it here; if a city can be designed collaboratively, then surely a piece of software can be as well?

But if I accept that, then why might XP propose otherwise? (Of course, I could just be wrong about XP.) My tentative answer is that is has to do with XP’s programmer-centric nature: it’s focused on having programmers deliver as much value as possible to others. Given that, it concentrates on the details of how to program (pair programming, refactoring, etc.) and how to make sure that the software that is being written has highest business value (the planning game). But it doesn’t address the question of how the stories are generated and selected – that’s the Customer’s job. Given that story generation/selection is out of scope of XP, it proposes the simplest thing that could possibly work as a programming/Customer interface, namely a single-voiced Customer, and leaves it at that.

I wonder what an effective process with collaborative design on the Customer side would look like? This may be one of the potential advantages of processes where the programmers are the ones actually designing the application – it brings more design minds to the table. (Not that programmers designing software doesn’t have its own flaws, to be sure.)

Of course, one potential problem with multiple designers is a lack of coherence: nobody likes design by committee. Alexander has been tackling this problem heads-on for decades: that’s what pattern languages are all about, after all. (Well, one of the things that they’re about.) There are some interesting additions on that subject here as well. The book discusses an experiment at imagining how a section of a city might develop incrementally, through a series of projects. Each project has a different owner, so collaborative design comes into play for the city as a whole. But each project has one person leading it, and must come with a vision:

Every project must first be experienced, and then expressed, as a vision which can be seen in the inner eye (literally). It must have this quality so strongly that it can also be communicated to others, and felt by others, as a vision. (p. 50)

So that’s the tightrope that Alexander is walking. He tries to get the good aspects of individual design by having each design step be guided by a clear vision. That vision can guide other people working on that project, so the project doesn’t lose coherence. Next, other people working on subsequent projects have to try to maintain the coherence of the preceding visions (and open up the possibility of following visions), working so as to always heal the city.

Works for me. (And works a lot better than Metaphor.) It’ll be interesting to try to carry it out in practice, though.

kaze ni naru

July 3rd, 2006

The Cat Returns isn’t one of my favorite movies. I’m happy for Miranda to watch it, and I won’t normally leave the room just because she has it on, but Studio Ghibli has produced much better stuff.

The theme song, however, I totally love. (Miranda and Liesl agree with this.) Very catchy in a rather understated way; and now I know what a ukelele sounds like. It’s in Japanese, of course, and, judging from one translation of the lyrics, I’d quite possibly not like it as much if it were in English.

I got a CD of Ayano Tsuji’s which contained this song. At first, I didn’t particularly like any of the other songs on the CD, but now they’re starting to grow on me. Maybe I’ll investigate further.

(Speaking of Studio Ghibli, I just noticed that Whisper on the Heart has just been released in the US; we’ll see if I like that movie any better.)

oberlin

July 1st, 2006

We just spent most of a week in Oberlin, visiting my parents. We got to see two of Miranda’s cousins for the first time in over two years; they are truly excellent. (It was nice to see my parents too, to be sure.)

Downtown Oberlin has changed somewhat since I lived there. More restaurants, which is a good thing – it only had one or two decent non-pizza places when I lived there, while there are now half a dozen or so places downtown where I’d be happy to eat. It seems to have gotten a bit more boutiquey, which I can live with; if they can sustain themselves (which apparently they can – no empty storefronts this time), more power to them. Alas, it’s about to get a good deal harder for general-purpose stores to survive – a Walmart is about to open up just south of town.

Two of the stores, in particular, apparently draw in out-of-town customers. One is called Bead Paradise; it also sells vintage clothing which seems rather decent (as far as I can tell from looking into the window and not being into that sort of stuff). And there’s an art gallery called Gingko Gallery, selling the work of six artists who have studios in the back of the store and several more that don’t; I did go in there, lured by some delightfully whimsical animals in the front window (apparently made out of twigs and seed pods and the like, though they also have very bright paint jobs on them). I ended up with two of those, a very amusing cube made out of angora wool with faces on five of the six sides, and a couple of sculptures that were absolutely gorgeous. Plus, they rescue cats, and had some completely adorable kittens in the back. (Some of whom hadn’t even opened their eyes, but a couple were old enough to be more playful.) It’s apparently been open in some form or another for nine years now; I hope it continues for another nine. Maybe I’ll put up pictures of some of the things we got there.

We spent much of the visit at Kendal at Oberlin, which is where my parents now live. Quite a lot of art there, too: this is what happens when you bring together retirees who either lived in a college town or would like to retire in a college town, and then move them into residences that, while quite nice, are presumably noticeably smaller than the houses that most of them previously lived in. So the result is that people’s art collections spread out into the hallways, the communal rooms, the guest rooms. (The one we stayed in had a couple of illuminated manuscripts, a couple of Japanese prints (which may or may not have been reproductions), a couple of prints of more recent vintage, this all in the size of a normal hotel room.)

A good visit.

beck on alexander

June 22nd, 2006

In regards to my last post: the bibliography to the XP book doesn’t seem to mention The Production of Houses, but it has this to say about The Timeless Way of Building:

Outlines Christopher Alexander’s view of architecture and construction. The relationship described between designers/builders and the users of buildings is much the same as the relationship between the programmers and the customer.

Time for me to go and reread that one, I think…

recasting the architect, iterative design, and onsite customers

June 21st, 2006

Some quotes from the chapter on “The Architect Builder” in Christopher Alexander’s The Production of Houses:

This requires, then, that decisions about design can be made, individually, house by house, and that they can even be made while construction is under way. (p. 69)

It requires a system of communication in which the building is not frozen, ahead of time, by drawings, but in which rough plans of the building are translated directly into building, step by step; and for this, the institutional powers of architect and builder – the power of design and the power of construction – must be wedded in a single process. (p. 70)

the kitchen be laid out exactly according to the wishes of the housewife (p. 70)

Further, it requires a form of communication between architect and builder which is simple, cheap, and direct, so that the immense expense of fifty different sets of drawings is not required to design fifty different houses. This direct communication becomes relatively impossible when architect and builder are separate, because the communication must be legally binding – exact – and is therefore immensely expensive to prepare. If architect and builder are one and the same person, the communication can be quick, schematic, because it is only a record for “in-house” use. And it therefore becomes cheap enough to do. (p. 71)

Third, in order for the woman to lay out her kitchen successfully, she must be able to enter the process at various times while the house is being built. It is, generally speaking, not possible to make subtle, exact choices about counter sizes, widths, position of stove, shelves, cabinets, in the abstract – that is, long before the building exists. However, once the shell of the building is there, and the kitchen exists, it is then possible to decide exactly where the details should be by simply standing in the real place and imagining them.

This requires that even at this late date during the process of construction itself, decisions about size, position of shelves, counters, etc., can still be made.

And this requires that the building is still actively open to design decisions, even after its shell is up, and that the builder, who is in the building on a day-to-day basis, has the right to make these decisions with the woman. If the architect is a separate person, again communicating through drawings, the process of choosing each of these kitchens on a direct, person-by-person basis would become impossibly complex and expensive. But if the architect and builder are one and the same, and together have control also over the spending of money, it is extremely simple. The same is true for all the other qualities a good house needs. (pp. 71-72)

I could go on, but I’ll stop here; just read the chapter yourself. You just have to do some obvious substitutions and you get large chunks of XP. Is this book cited in the bibliography of the XP book? I’ll have to check when I get into work, but I have to assume it was a direct influence.

I guess I already was aware that Christopher Alexander had these sorts of ideas, that he wasn’t an influence on software development solely through his invention of design patterns, but I’d never seen it spelled out so clearly before. Which raises the next question: Christopher Alexander and Kent Beck have both done influential work in both design patterns and architect/customer interactions; is this a coincidence? I tend to think the answer is “no”. If you take, say, Singleton on the one hand and the Planning Game on the other hand, it’s hard to see any direct link. But both of their thoughts were much more far-reaching: both of them worked not just with design patterns but with pattern languages, which meld individual design decisions into a richly textured, active, living structure. (Using an expansive notion of living.) And once you have that structure in place, you then have the freedom to make late-binding decisions, which in turn opens up the possibility of designer- (or builder-)customer interactions throughout the entire building process, and even past the end of the building process.

Great stuff. And he’s not at all afraid of the details: there’s theory in this book, to be sure, but it’s made concrete at every step with pictures, with descriptions of small steps, with discussions of experiments that worked, experiments that didn’t work.

Are there many agile construction firms out there? It seems to me like a huge need…

kabuki

June 21st, 2006

About a year ago, I was browsing a local comic book store, and decided to pick up the first volume of Kabuki. Pleasant enough – I’m as happy to read comic books about attractive women beating the crap out of people as the next person – but flawed in its own ways, too.

Still, I was curious enough to read the second volume. Which completely through me for a loop – it was stunningly gorgeous, successfully experimenting with a few different artistic styles, and the experimental narrative was more promising than that of the first volume. Clearly I had to read more.

The third volume didn’t do so much for me – back to the less interesting drawing and narrative style. But the fourth volume was quite good, and the fifth volume is on my personal short list of potential best comic books ever. (Hmm, what else is on the list? I’d have to think about it. Is anything else on the list right now?)

Everything comes together in that volume. The art is again stunning. (You can see some of the artist’s cover images on his web site; I like several of those quite a bit, but the interior art is much more richly layeed.) It’s very well integrated into the narrative of the story, and integrates text and picture in a more successfully interesting way than anything else I can recall reading. The plot is solid enough to carry the weight of the other features of the volume.

Why had I never heard of this series before? I guess I need to get out more…

unit test framework

June 18th, 2006

I’ve gotten permission from Sun to release a C++ unit test framework that we (largely I, but with significant contributions from others) wrote. Here’s its web page; there’s still a significant amount of work to before I want to announce it more widely, but the source code that’s there works just fine.

I’ll try to get a better version (with usable documentation) done over the next month or so. In particular, I’d like to get it out before Agile 2006. (Are any of my blog readers going to be there?) If anybody wants to contribute, I’d be very grateful.

precocious

June 18th, 2006

We went to a (quite nice) party yesterday. Hosted by friends of ours, lots of people around our age present, most of which were couples with kids.

I’m pretty sure that Miranda was the oldest kid there; in fact, she may have been two years older than any of the other kids. Which is pretty weird – I wasn’t the oldest adult there, and in fact I suspect I was younger than the median.

So it would seem that, in the social circles I travel in, having a kid a year after finishing grad school is somewhat unusual. I guess I’d started to realize this – most of my friends have kids now, but frequently that’s a recent development. I just hadn’t had the point driven home so forcefully before.

reading/writing xml in c++

June 14th, 2006

Anybody have a favorite C++ XML parser? We might need to add an XML/HTTP interface next to an existing CORBA interface soon at work, and I’m not too familiar with the options out there. It’s a very simple interface – a few simple short requests, a few simple, short responses plus one simple, long response. TinyXml seems like it should have all the functionality I need, so I’m leaning that way, but I don’t realy have an informed opinion on the matter.

amazon prime

June 12th, 2006

A month and a half ago, I was toying with the idea that maybe signing up for Amazon prime would actually save me money. I still don’t really believe that, but the general idea of not buying books until right before I’m going to actually read them seems sound to me. I’m going on a trip soon, and will want a car adapter for my iPod; that seemed as good an excuse as any to sign up for the service. It comes free for the first three months; we’ll see how I like it.

It’s kind of scary, actually: now, whenever I visit any page on Amazon, there’s this button on the page, and if I click on the button, the item will appear on my doorstep in a couple of days. I’m really not sure what to think about that – I’m much more in the habit of building up a little shopping cart full of stuff, thinking about it for a while. Which I can still do if I want to, but I don’t think I will want to.

While I was there, I ordered a CD. (Taverner’s Lament for Jerusalem, which I learned about from the Naxos podcast. I suspect that podcast is going to turn into a very effective way for them to advertise to me.) And I successfully resisted the urge to order two CD’s: when I finish that one, maybe I’ll order another. (Would Amazon make money if I ordered one CD a week with two-day shipping? Hmm.)

I almost resisted the urge to buy any books. But then I saw that I could pre-order the seventh volume of Hikaru No Go, and I couldn’t resist that, either. In general, I don’t approve of pre-orders, but I’m completely sure that I’ll want to read that book, and in fact will be happy to drop whatever other book I’m in the middle of reading for the thirty minutes or so that it will take me to read it.

Speaking of books, anybody know of any good TCL books? At work, we write our acceptance tests in TCL, and most of us are far from TCL experts; I certainly feel that my lack of TCL knowledge makes me inappropriately frightened of the larguage, and hurts my refactoring. I’m reading the Ruby book right now, but I should probably put some sort of TCL book next on my work reading list.

(Random coment: I just clicked on my current Amazon book recommendations, and they seem to have changed drastically – All Quiet on the Western Front is number two on the list, because I own The Communist Manifesto. Weird for a few reasons.)

go norway!

June 12th, 2006

I had hopes for France, but not much seems to be coming of that. But now Norway is stepping up to the plate, and is demanding action fast.

Aside from the DRM issues, I like that they’re complaining that Apple “reserves the right to change unilaterally consumers’ rights to access material already purchased.” Yes, that sounds like bad behavior to me. And “that iTunes has tried to impose English law on the contract” – hardly unreasonable for Norway to be nonplussed by that.

doctor fun, r.i.p.

June 12th, 2006

Doctor Fun has ended its run. The last remnant on my bookmarks page of the early days of the web…

authority

June 11th, 2006

These sound to me like desirable characteristics for open source decision makers.

summer 2005 pictures

June 11th, 2006

I finally got around to putting up pictures of us (well, mostly pictures of Miranda) from last summer.

dbcdb: links!

June 10th, 2006

My dbcdb pages now can have a list of external links attached to them. This is a feature that I’d been wanting to add for a while – until now, the links from within these blog entries probably served as more of an annoyance to my readers than anything else, since the information on those pages was unlikely to be of interest to you. (Except maybe the hidden Amazon link, about which more later.) But now they can potentially serve as a way to make my blog a bit richer – if I refer to, say, a book from within a blog post, then they provide an easy way to find other blog posts where I talk about that book in more detail. (At least once I go and add more links into my dbcdb database.)

The issue of how to handle related posts is, I think, not an uncommon problem for bloggers to run against; c.f. Tim Bray on a variant of the problem.  There are lots of solutions, each suited for different manifestations of the problem, but I like this idea of adding an extra layer of indirection by sticking a mediating web page (my dbcdb pages) in the middle.

Once I decided to take that approach, though, there were two different implementation strategies: I could either add links manually to the database every time I posted about a book/game/whatever, or I could let a search engine find all blog entries that refer to that book/game/whatever. I decided that the latter wasn’t completely satisfactory: not all posts that refer to a given book are created equal. For example, half of my dbcdb blog entries link to the page for The Arcades Project not because they have anything to say about that book but because I’m using that as a default example. Also, one main argument for search, namely that manual indexing isn’t scalable, doesn’t apply here: manual indexing should scale just fine in this case.

Having said that, search also has its value for this: you might (or might not!) be interested in all blog entries where I, say, make an offhand mention of a certain video game, one that I might not choose to put in the index. So my next story will be to add an automatic “search my blog for references to this” link to all entities. With luck, that will give me the best of both worlds. Also, while I’m adding links, I’ll get rid of the ISBN/ASIN fields and replace them with an explicit Amazon link.

Before I started doing this, I realized that, if I didn’t first get rid of MemoryCollection in favor of SqlCollection, I’d have to do a tiny bit more useless typing to implement this. Since I’d been planning to do that soon anyways, I figured this was the time; it turned out to be quite pleasant, using (the classes that implement) the CLI tool’s interface. Yay. And, in doing so, it increased my appreciation for dynamic typing; I might go on about that later, but if nothing else it emphasized that I really do need to spend some time soon playing around with a dynamically typed language.

lean sales

June 8th, 2006

One thing I wanted to learn when I started reading about lean: given that Toyota is supposed to be so great at everything, why is it that, when I last shopped for a car, fully intending to buy one of their models, the experience was so bad that it (or rather they, I tried two dealerships) drove me to one of their competitors? (Saturn, in this case.) They could have made money off of me if they’d just acted like decent people, instead of making it clear that all they cared about was ripping me off. Admittedly, I did get a certain pleasure from one of the salespeople putting a lit cigarette into his shirt pocket, but I didn’t see any sort of exciting “lean sales” practice, any leveraging of their apparent ability to nimbly respond to conditions, any recognition that inventory should be considered waste. It seemed pretty much the same as standard practice in this country, maybe a bit worse.

It would seem, however, that sales practice in Japan really is quite different than in the US. Kind of creepy, actually – apparently, once you’ve bought a car, that sales person will then contact you quite frequently, even stopping by your house (most Japanese car sales don’t/didn’t take place in dealerships), checking in on how things are going, sizing up your future car-buying plans, or when you’re not about to buy a car at least improving their feel for the moods of the populace, to help Toyota’s strategic planning.

I wouldn’t like that, either. I want to talk to a dealer when I’m interested in buying a car, and I’m happy to continue in a relationship with a dealer after that (e.g. bringing it to them for maintenance), as long as I don’t feel they’re actively working against me. But I want to be the one in control of the relationship, not them. Still, it does seem a less actively adversarial relationship than a traditional American car sales relationship, which is certainly a plus.

Apparently they even take responsibility for fixing their cars whether or not they remain under warranty, in order to keep customers loyal. If only Saturn had done the same thing, we’d probably stay with them indefinitely; alas, our older car had to have its engine replaced because of a design flaw that (in our case) didn’t manifest itself until after the warranty expired. So if having to spend several thousand of our dollars because of their design flaws is what we have to expect from Saturn in the future, then no more Saturn. Maybe Honda will prove a nice mix of reliable cars plus a non-asshole sales force? (To be clear, we’re not shopping for a car now, nor are we planning to any time soon.)

Despite my misgivings about it (which are apparently growing more common in Japan, too: at-home car sales are declining, or at least were at the time the book was written), I can see how Toyota’s Japanese sales philosophy fits into their lean mindset. Lean likes to generate and feed off of high-quality information, so get that from your customers, too. An ability to easily customize means that you can encourage your sales force to meet with customers to pick the options on the car that best suits their needs and moods instead of forcing the customer to take whatever’s on the lot. As I already said, no lot means no inventory, which lean loves. Maybe the less adversarial sales/customer relationship is similar to their less adversarial manager/worker relationship. (About which I’ll write later; both relationships are uncomfortably constricting from my point of view, too.) And an ability to produce high-quality cars means that they can affort to fix defects that escape into the wild.

It does seem to be an aspect of lean that hasn’t made it to this country, though; and while I obviously don’t think that the standard American car sales model has much to recommend it, this sales model seems rather off as well. In an environment where customers have increasing access to choice and high-quality information, then treating them well will probably pay off more and more; acting like a (nice) stalker, not so much.

Maybe Toyota’s already changed their practices in Japan in the intervening decade and a half; I should look into that. The section in Lean Software Development on contracts might give some clues, too – after all, those are customer relationships, just of a slightly different nature.