Archive for February, 2007

in praise of simplicity

Saturday, February 24th, 2007

In her keynote at PyCon a few minutes ago, Adele Goldberg just mentioned Mitch Resnick’s book Turtles, Termites and Traffic Jams. I wrote a review of the book for the Complexity journal in 1994 or 1995:

There is an important trade-off between realism and understanding in the construction of models of complex systems. At one extreme, a model may be so realistic that it allows no increase in understanding of the modeled system. At the other, the model may be precisely understood but be so divorced from reality that this understanding cannot be related back to the original system. The construction of a model requires that difficult choices be made about what aspects of a system should and should not be modeled, and about how abstractions, simplifications and generalizations are to be justified and implemented. Any unchecked tendency to include more than is absolutely necessary can soon result in a model that, at least aesthetically, feels somehow bloated. It is easy to underestimate the difficulty involved in these decisions, and in the requirements of good judgement and taste in the construction of models.

It was with great pleasure then that I read Mitchel Resnick’s “Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds” (1994, MIT Press). Resnick’s StarLogo system achieves a balance between simplicity and realism that it would be difficult to improve on. This is an accomplishment in itself, but Resnick takes us much further. His StarLogo is not a single model, but a platform for exploring a wide range of decentralized systems. The StarLogo system deals so effectively with the trade-off between realism and understanding, that at times one tends to forget it is an issue.

The most provocative situation in modeling, and a sure sign that a model has dealt with the trade-off well, occurs when an apparently simple model produces unexpected results. At these times, the potential for increased understanding is at its greatest. The probability of explaining the surprising results is high, because the model is apparently simple. The decentralized systems constructed and described by Resnick repeatedly produce surprises of this kind. The delightful simplicity of StarLogo makes it possible to understand what is happening, and why our expectations were incorrect. These systems, few and far between, offer the highest returns for the effort we must invest to understand and use them.

In five short chapters, Resnick guides us through thinking about centralized and decentralized mindsets, the StarLogo system, and reflections on psychology and education. The “Explorations” chapter describes simulations (or, as Resnick prefers, stimulations) of Slime Molds, Artificial Ants, Traffic Jams, Termites, Turtles, Frogs, Forest Fires, Geometry and Recursive Trees. Resnick guides us through the thinking behind the construction of these simulations, presents alternative ideas for their construction, and argues well for decentralized views of these systems. Resnick offers the reader challenges, surprises, insights, and simple heuristic guidelines that he developed as a result of these explorations. It is remarkable that Resnick includes the entire StarLogo programs for these systems in the text of the book. The code, only once slightly over two pages in length, is clear, instructive, and incredibly simple.

Resnick’s book is a little treasure. Though much of the book is presented in the context of high-school education, any temptation to discount it on this account should be resisted. Resnick has something to teach us all. If it has a failing, it is the modesty of its presentation and claims, which may retard its recognition in “higher” academic circles. Virtually every aspect of this book should be instructive to researchers involved in agent-based modeling and simulation, especially to those in biology and artificial life. To the many scientists interested in agent-based computational modeling who are, however, not computationally inclined, read this book. It is an example of someone getting a set of deceptively difficult problems absolutely right. There are many ways in which to appreciate “Turtles, Termites, and Traffic Jams.” It is an important book.

no coffee before 10am at PyCon!

Saturday, February 24th, 2007

I’m at PyCon in Dallas, at the Dallas/Addison Marriott Quorum. There are 580 attendees. Morning talks start at 9 and people are milling around downstairs from 8 or so. Of course they’re looking for coffee. But unlike every other conference I’ve been to over the past 20 years, there is no coffee. But the hotel does have a small store with a Starbucks outlet in it. There’s a line of people paying $3 per head for coffee. The conference has tons of coffee after 10am, but Starbucks has the early traffic by the balls.

I smell something, and sadly it’s not a fresh-brewed roast.

calculus of secrets

Tuesday, February 20th, 2007

OK, this has nothing to do with calculus, but I wanted a short title. Better would have been On the monotonically decreasing incentive to keep secrets, etc.

If you have a secret and you tell someone, it makes no sense to tell them they can’t tell anyone else.

Let’s say there are 2 kinds of secrets you might be tempted to pass along: a) those that are more important to the receiver than they are to you (e.g., you just found out that X is sleeping with your friend Y’s partner and you’re considering telling Y), and b) those that are less important to the receiver than they are to you.

Clearly it doesn’t make much sense to tell the receiver in class (a) that they can’t tell anyone. They probably have less incentive to be telling people than you do, they’re closer to the source than you are, and perhaps the information is “theirs” more than it is “yours”. Things like that.

But it doesn’t make sense to tell the receiver in class (b) that they can’t tell anyone either. That’s because it’s unreasonable to expect them to keep something secret that you’re not keeping secret when it’s even less important to them than it is to you. Even if you swear them to secrecy, as you may have been sworn to secrecy, you can’t rationally expect them to keep the secret.

Most secrets fall into class (b).

The rational and responsible conclusion is that either you decide that the buck stops with you and you don’t pass it on, OR you decide to pass it on, in the full knowledge that you are actively spreading the secret, and in fact lowering the barrier to it spreading more widely. At the very least, have the intellectual honesty not to preface the secret telling with “you can’t tell anyone about this…”

UI consistency

Tuesday, February 20th, 2007

I often wonder if I’m super sensitive to issues in user interface, or if everyone notices the same things that I do.

For example, when I find things that are inconsistent in user interfaces it really bugs me. I’m sitting in front of a beautiful Apple cinema display attached to a laptop, all made by a company that clearly cares a lot about user interface. BUT, when I want to maximize something that’s iconized, I have to remember the command to do it on an application-by-application basis. Yes, I could reach for the mouse, but I don’t want to reach for the mouse.

If I want to get my iTunes window up, I can Apple-TAB to get to iTunes, and then to get the window up from the dock I have to Apple-Option-1. If I’m tabbing over to Terminal, I have to use Apple-1. If it’s iCal, there is no key combination to maximize the window. Duh.

Nokia care about user interface too. Yet on my cheap 6070 model, no doubt with a stock version of Series 60, when I go to delete things from the messaging area, the buttons I have to press depend on the type of thing I’m deleting. If it’s a text message, I click Left (Options), Select (Delete is the first option), and then Left (Yes, I want to delete). It’s the same for the Sent Items. It I try to delete a template, I have to click Left, Down, Select, Left. If it’s a sent email message, I have to click Left, Select, Select. There are various other items in there, and I bet they have differing delete sequences too.

Those would be such simple things to make more consistent, you would think. I find stuff like that in user interfaces all the time, and I always wonder why these companies with huge budgets don’t have someone who can see these things take a look at their products for what seem like glaring inconsistencies.

dental mental

Saturday, February 17th, 2007

I’m getting a tooth crowned. I had no idea how involved the process is. I’ve been to the dentist 3 times and she tells me it’s going to be 3 or 4 more visits before it’s done.

I think I first became aware of the tricks dentists use when I was 17 and having my wisdom teeth out. My dentist was a master at the art of gentle persuasive suggestion. “Now you may experience a slight pulling sensation” he’d say smoothly; ahead of a maneuver that felt like my teeth were fastened to a departing tugboat while he held my head firmly in place.

The introduction of the needle is the most basic dentist trick, like the magician pulling a rabbit from a hat, or a juggler eating an apple. You’ve just got to be able to do it, and you have to do it in every show as you warm up the audience. There’s the delayed low sweep of the arm bringing the needle. The needle hand hugs the terrain like a plane coming in under the radar. The needle, out of sight during the whole journey, is upon you before you know it. Ah, but you knew it was coming, didn’t you?

There’s little variety here, and not that much scope anyway. Perhaps a little distracting chatter, a more relaxed and slightly sideways approach (body concealing the delivery arm) as the dentist engages you, watching to see if your eyes are straining wildly to see it. You know the needle is coming, but you know you’d better not look at it, else the dentist will think you’re terrified and start with more tricks.

The tricks are designed for the masses, and so many are quite obvious if you’re thinking about things even a little. But dentists are smart people too, and they’ve been doing this for a long time. So they probably have tricks you don’t notice. I wonder how much of a 5-year course in dentistry is concerned with patient psychology and stress management. Apart from using well-practiced techniques, you have a situation in which one person is trying to pull the wool over another’s eyes, literally right under their nose, and that’s of course full of opportunity for improvised patient management. Add to this the patient probably wanting to believe and wanting to stay calm, and you’ve got very fertile ground.

It’s not easy to engage dentists on the subject because your mouth is typically numb and full of instruments. By the time the show is over, you’re being whisked out to pay and you don’t feel much like talking anyway. I have occasionally managed to get some sense out of dentists about all this. I told the guy that removed my wisdom teeth that he was a master. He just smiled. I had some time the other day before my current dentist started in on me. I told her how all the little techniques had always amused me, especially the introduction of the needle. She said that she can’t help the reassuring stream of comments, like telling me to relax, not to worry, that we’re nearly done, etc.

That’s what I think about at the dentist. It helps keep my mind off the needle.

will they never learn?

Saturday, February 17th, 2007

I find it amazing that huge corporations are unable to see that attempts to copy protect things always fail. Here’s another one gone wrong. Undoubtedly, millions were spent on getting this protection in place, and it’s picked apart by one guy in a mere 8 days.

There are so many examples of this. I guess it can’t be that “they” don’t know their schemes will be broken. Perhaps they assume that, but also know that just a small percentage of customers will avail themselves of the means to use the crack. If so, it’s certainly better to use some form of protection, but why not face facts and put less effort into making it obscure. After all, what’s the difference between an elaborate scheme that’s cracked in 8 days and a trivial one that’s cracked in an hour?

conspiracy of sleepers

Wednesday, February 14th, 2007

I don’t seem to need to sleep as much as some. I’m perfectly happy with 4 hours a night, can probably go indefinitely on 6 hours a night, and anything more is just cream. That’s not to say I don’t like sleep. I love it. I’ll happily stay in bed for 12 hours if I feel like it. I think I’ve been like this my whole life – my parents told me that when I was a kid they’d just leave me in bed awake when they went to sleep. My son is perhaps also like this, he never wants to go to sleep – though he’s often determined to sleep in.

When I’ve slept 4 hours, I don’t feel impaired in any way. I’m happy to then get up and work 16 hours – certainly not as efficiently as some people, but that’s just me, it’s not because I’m tired.

So I always wonder about sleep advocates who insist that all humans need 8 hours of sleep a night, or else. It feels like a conspiracy of people who really do need that much sleep, trying to stop those of us who can work much longer hours from getting ahead.

After all, have you ever heard that you really need to sleep 8 hours from someone who only needs 4 hours a night?

I didn’t think so.

go right

Wednesday, February 14th, 2007

Large passenger planes have two aisles. When leaving the plane, the right hand side always moves much faster than the left.

I think this happens because the door is on the front at the left and at the moment when the two lines meet the people coming from the right side have some momentum up, they’re going straight ahead, and they don’t need to turn a corner and merge to get off. The people from the left side have to inject themselves into this stream. Everyone is tired and maybe the people from the right are less inclined to politely let someone in from the left.

Whatever it is, the effect is pronounced. On some flights the right side will drain completely while there are still dozens of people left on the left. I’ve watched this many times. I’ve asked a couple of stewards, and they agreed but hadn’t noticed or didn’t know why.

Random thought for the week.