2008-01-09 20:19:23 GMT


[[Category:Blog entries by date|08.01.09]]
[[Category:Year, 2008]]
[[Category:Agile software development]]
[[Category:Use cases]]

====Blog: Jan 9, 2008 ====

XP pretty much banned use cases, replacing them with the similar sounding "user stories", and as a result agile zealots have been happy to dump use cases in the trash (along with their project managers, estimates, plans, and architectures). Scrum did similar, using the "product backlog" instead of user stories. Yet as I go around projects, I keep running across suffering organizations, organizations that suffer from three particular problems that cause them real pain:

# User stories and backlog items don't give the designers a ''context'' to work from – when is the user doing this, and what is the context of their operation, what is their larger goal at this moment?
# User stories and backlog items don't give the project team any sense of "completeness" – what I keep finding is that the development team bids/estimates the projects at (e.g.) 270 story points, and then as soon as they start working, that number keeps increasing, seemingly without bound. The developers are depressed and the sponsors are equally depressed by this. How big is this project, really?
# User stories and backlog items don't provide a mechanism for ''looking ahead'' at the upcoming work – I keep hearing, "We asked our customer (product owner) a question and she/he took 2 weeks to get us an answer. We must have the wrong customer (product owner)." No, they don't have the wrong customer (product owner), they have a broken process – it is quite normal for certain types of questions to take a long time, as the various departments and user groups work out what is the correct, balanced answer for the whole lot of them.

Use cases are, indeed, heavier and more difficult than either user stories or backlog items, but they bring value for that extra weight. As not-Einstein said (the attribution to Einstein has been debunked, it seems): "Make things as simple as possible, but no simpler." In particular, use cases fix those three problems.

I've been testing this out for the last 3 years – I walk in and ask, "On your agile project(s), do you by any chance suffer from any of these three things?" ... and then list the three ... Much stronger than even I expect, there ''hasn't been a single organization I asked these of that hasn't said, "Oh, Yes, and How!" ''

In other words, naïve use of user stories and backlog items is causing very real, very expensive damage to companies. Expensive is bad.

The most recent was an executive who was telling about having "delivered" a Scrum project, but it was discovered at acceptance time that there were a whole series of recipients of the system...

I don't remember how I got thinking about this, but for the past week or so I've been trying to think of a major screwup in mathematics. Specifically, I want a statement S such that:

  1. A purported (but erroneous) proof of S was published in the mathematical literature, so that
  2. S was generally accepted as true for a significant period of time, say at least two years, but
  3. S is actually false
I cannot think of an example.

There are many examples of statements that were believed without proof that turned out to be false, such as any number of decidability and completeness (non-)theorems. If it turns out that P=NP, this will be one of those type, but as yet there is no generally accepted proof to the contrary, so it is not an example. Similarly, if would be quite surprising to learn that the Goldbach conjecture was false, but at present mathematicians do not generally believe that it has been proved to be true, so the Goldbach conjecture is not an example of this type, and is unlikely ever to be.

There are a lot of results that could have gone one way or another, such as the three-dimensional kissing number problem. In this case some people believing they could go one way and some the other, and then they found that it was one way, but no proof to the contrary was ever widely accepted.

Then we have results like the independence of the parallel postulate, where people thought for a long time that it should be implied by the rest of Euclidean geometry, and tried to prove it, but couldn't, and eventually it was determined to be independent. But again, there was no generally accepted proof that it was implied by the other postulates. So mathematics got the right answer in this case: the mathematicians tried to prove a false statement, and failed, and then eventually figured it out.

Alfred Kempe is famous for producing an erroneous proof of the four-color map theorem, which was accepted for eleven years before the error was detected. But the four-color map theorem is true. I want an example of a false statement that was believed for years because of an erroneous proof.

If there isn't one, that is an astonishing declaration of success for all of mathematics and for its deductive methods. 2300 years without one major screwup!

It seems too good to be true. Is it?

Glossary for non-mathematicians

  • The "decidability and completeness" results I allude to include the fact that the only systems of mathematical axioms strong enough to prove all true statements of arithmetic, are those that are so strong that they also prove all the false statements of arithmetic. A number of results of this type were big surprises in the early part of the 20th century.

  • If "P=NP" were true, then it would be possible to efficiently find solutions to any problem whose solutions could be efficiently checked for correctness. For example, it...

2008-01-09 18:37:00 GMT

A software manager is brought into a doomed project. It is hopelessly behind, the requirements have changed so often they are now kept on a white board instead of in a document, and the office is wallpapered with Dilbert cartoons. She’s replacing the previous manager, who has resigned.

When she gets to her new office, her predecessor is clearing out her desk. “I’ll only be a minute. By the way, I left you something” says the old manager before leaving. After the predecessor leaves, the new manager has a look around, and discovers two envelopes in the top drawer of the desk. The first envelope is labeled “Open when in trouble.” The second is labeled “Open when in even more trouble.”

Well, she researches anti-patterns in software project management, has a look around, talks to everyone, identifies the key players, and goes to management with a clear explanation of what the problems are, what’s realistic to achieve, and what needs to be done. To her surprise, management seems to go along with things and tells her to make whatever changes she needs. She institutes daily builds, stand up meetings, rapid iterations, and starts tracking velocity. Two months later, at the quarterly review, she presents her progress. The team is producing at 200% of the previous rate, morale is up, and they’re going to get 80% of the previous functionality done with less than 90 days of slip off the impossible schedule.

There is silence, then management tells her that this is unacceptable. Sure, they agreed she could institute change. That’s her job. However they did not approve any compromise in scope or delivery date. This is a competitive business, and there are thousands of qualified managers looking for a job who can come in and get things done. Does she want to admit she can’t do her job?

We have assigned a product manager to discuss IBM WebSphere Portal integration with your technical lead. And the VP of Marketing needs to talk to you. We have made a commitment to all-singing, all-dancing web services and he needs a forty-minute presentation explaining how your project will be implemented with web services throughout. You look pale. Is there a problem?

She goes back to her office in a quandary, then remembers the first envelope. Wordlessly, she opens it, and inside there is a three by five card inscribed: Blame Me.

She goes back to management a day later with a powerpoint emphasizing how the project was way off track, how the architecture was fubar, how morale was poor, and how requirements were incorrectly documented. She doesn’t blame the previous manager directly, but she does identify various management techniques and “best...

One of my favorite TATWTESBTISBAs -- Truths About The World That Everyone Should Be Taught In School But Aren't -- is that the real world is a wildly unpredictable place, and that most interesting or important things that happen aren't...

2008-01-09 05:00:00 GMT

And sometimes I use it to retaliate against the guy upstairs with the loud girlfriend and the elliptical dish.

Here are some statistics on method names in Java 1.5 (method signatures, method names). By analyzing code of reasonably high quality like the JDK, we can derive rules of thumb for good, standardized function names. Useful for any language.

Number of methods in JDK 1.5:

Most common method names:
   1304 toString            
1219 run
663 equals
496 hashCode
440 actionPerformed
439 getName
383 contains
352 accept
320 remove
285 reset
280 get
278 getCharacterEncoding
277 paint
261 read
258 add
256 write
224 main
216 close
213 clone
204 getValue
199 getType
193 next
191 createUI
189 size
175 clear
168 getPreferredSize
167 print
159 init
152 newEncoder
152 newDecoder
150 propertyChange
145 update
140 historicalName
134 getMinimumSize
130 debug
120 translate
119 setValue
116 set
116 put
110 getEncoderIndex2
110 append
107 isEmpty
107 getInstance
104 initialize
103 getMaximumSize
102 getBorderInsets
102 error
102 dispose
101 writeObject

Most common 1-word prefixes:
  19984 get       
5449 set
3555 is
1604 to
1534 create
1441 visit
1180 add
776 remove
707 write
642 update
532 mouse
501 hash
500 check
477 new
471 has
468 print
449 action
412 read
374 install
357 parse
330 paint
302 uninstall
294 handle
260 put
258 init
252 process
223 next
223 find
220 end
217 load
217 build
202 can ...

2008-01-08 23:07:29 GMT

What is user space? User space is the location in the filesystem where users put their personal files-- their "stuff". Here's the user space folder structure in the Windows XP operating system:

\Documents and Settings\User\
   \Application Data
   \Local Settings
   \My Documents
      \My Music
      \My Pictures
   \My Recent Documents
   \Start Menu

And here's the user space folder structure in the Windows Vista operating system:

   \Saved Games

This new Vista user space folder structure may seem oddly familiar to people using operating systems based on Unix. It gives new life to the famous quote "Those who do not understand Unix are condemned to reinvent it, poorly". Regardless, I'm glad we no longer have to deal with a scarily long default user path -- with aggravating embedded spaces, even-- to our personal stuff. If a user is keeping notes in a text file, we can reasonably expect to find those notes at the following path:

\Documents and Settings\User\My Documents\notes.txt

Now that we've established what and where user space is, I have a message for all the programmers reading this-- including myself. Keep your dirty, filthy paws out of my personal user space!

Take a look in your Documents folder right now. Go ahead. Look. Do you see any files or folders in there that you personally did not create? If so, you've been victimized. Applications should never create or modify anything in your documents folder without your permission. And yet, sadly, it happens all the time. Applications, and more specifically, the programmers who wrote those applications, think it's perfectly A-OK to carpet bomb your personal user space with their junk.

Well, it isn't.

As Omar Shahine originally pointed out almost two years ago, we should be mad as hell, and we shouldn't take it any more. If applications need to store shared files, that's what the \AppData and \Application Data folders are for. In OS X, which inherits a lot of filesystem conventions from BSD Unix, Apple has a great set of guidance appropriately titled Don't Pollute User...

Adventures in fast food at the Onion A.V. Club: Editor's note: Periodically, The A.V. Club enters its gleaming, sterile laboratories to taste-test new and bizarre foodstuffs it finds on the open market... Recently, The A.V. Club considered taste-testing the KFC...

Optimising your notation to not confuse people in the first 10 minutes of seeing it but to hinder readability ever after is a really bad mistake.
—David MacIver, via In Defence of (0/:l)(_+_) in Scala
Or as Jef Raskin put it:

The impression that the phrase “this interface feature is intuitive” leaves is that the interface works the way the user does, that normal human “intuition” suffices to use it, that neither training nor rational thought is necessary, and that it will feel “natural.” We are said to “intuit” a concept when we seem to suddenly understand it without any apparent effort or previous exposure to the idea.

It is clear that a user interface feature is “intuitive” insofar as it resembles or is identical to something the user has already learned. In short, “intuitive” in this context is an almost exact synonym of “familiar.”

The term “intuitive” is associated with approval when applied to an interface, but this association and the magazines’ rating systems raise the issue of the tension between improvement and familiarity. As an interface designer I am often asked to design a “better” interface to some product. Usually one can be designed such that, in terms of learning time, eventual speed of operation (productivity), decreased error rates, and ease of implementation it is superior to competing or the client’s own products. Even where my proposals are seen as significant improvements, they are often rejected nonetheless on the grounds that they are not intuitive.

It is a classic “catch 22.” The client wants something that is significantly superior to the competition. But if superior, it cannot be the same, so it must be different (typically the greater the improvement, the greater the difference). Therefore it cannot be intuitive, that is, familiar. What the client usually wants is an interface with at most marginal differences that, somehow, makes a major improvement. This can be achieved only on the rare occasions where the original interface has some major flaw that is remedied by a minor fix.
—Jef Raskin, Intuitive Equals Familiar

Complaining that a programming language “Violates the Principle of Least Surprise” is a complaint that it fails to appeal at first glance, without any training or investigation. But if a new language is “intuitive,” it can only offer you a marginal improvement over the languages you already know well.

You needn’t look at functional langauges like Scala to see this at work. Is Ruby’s for loop an improvement over Java? By how much?...

2008-01-08 21:04:32 GMT

A programming language that doesn’t change the way you think about programming is not worth knowing.
—Alan Perlis

New York Times: James E. Cayne, the embattled chief executive of Bear Stearns, will step down after the deepest losses in the firm’s history... Here at, we're longtime fans of Jimmy.

2008-01-08 18:07:00 GMT

People are starting to realize that endorsing Web 2.0 is going to happen via RIA

I once had an intern who wrote wrote the following code to process a web survey form. The form input widgets were named q1, q2, and so forth:

    foreach $k (keys %in) {
            if ($k eq q1) {
                    if ($in{$k} eq agree) {
                            $count{q10} = $count{q10} + 1;
                    if ($in{$k} eq disaagree) {
                            $count{q11} = $count{q11} + 1;
            if ($k eq q2) {
                    @q2split = split(/\0/, $in{$k});
                    foreach (@q2split) {
                            $count{$_} = $count{$_} + 1;
            if ($k eq q3) {
                    $count{$in{$k}} = $count{$in{$k}} + 1;

There is a lot wrong with this code, but it's all trivial compared with the one big problem, which is the wholly unnecessary loop and tests. The whole thing could be (and should be, and was) rewritten as:

    if ($in{q1} eq agree) {
            $count{q10} = $count{q10} + 1;
    if ($in{q1} eq disaagree) {
            $count{q11} = $count{q11} + 1;

    @q2split = split(/\0/, $in{q2});
    foreach (@q2split) {
            $count{$_} = $count{$_} + 1;

    $count{$in{q3}} = $count{$in{q3}} + 1;
After which one could start addressing the smaller problems, like the fact that "disagree" is misspelled.

This is the sort of mistake you expect from an intern. I chuckled and corrected him. But I've seen it several times since from non-interns.

Here's another example. I am not making this up. Whether it's more or less odious than the intern code is up to you to decide:

         foreach $location_name (%LOCATION ) {
                $location_code = $LOCATION{$location_name};

                if ($location_name eq $location ) {

                    printf FILE "$location_code\,";
                        printf FILE "%4s", "$min3\,";
                        printf FILE "%4s", "$max3\,";
                        printf FILE "%1s", "$wx3\n";


It could have been written like this:

        printf FILE "$LOCATION{$location}\,";
            printf FILE "%4s", "$min3\,";
            printf FILE "%4s", "$max3\,";
            printf FILE "%1s", "$wx3\n";
I started using this problem as an interview question. I'll present the subject with trivial code like this:

        for my $k (keys %hash) {
          if ($k eq "name") {
and then ask if they have any comments about it. One nice thing about the question is that it...

(x-posted to The Kugelmass Episodes)

Bill Benzon calls our attention to a new blog entry by Stanley Fish, posted by The New York Times here.

It is easy to imagine how, after a lifetime of dedicated scholarship, an emeritus professor like Fish might react in frustration against the platitudes in Education’s End, a new book by professor of law Anthony Kronman. Kronman has little to offer us; his vision of college as a place for the “nurturing of those intellectual and moral habits that together form the basis for living the best life one can” is a rhetorically tepid, repackaged version of a pedagogical philosophy shared by many earlier authors, including Matthew Arnold and Michel de Montaigne. Montaigne figures prominently in Alexander Nehamas’s book The Art of Living, which is entirely devoted to the enormous history of this idea within the Western philosophical tradition alone, to say nothing of history, literary studies, or the other constituent disciplines of the humanities.

That said, the banality of Kronman’s prose is no excuse for what Fish has written. Fish ends his post thus:

To the question “of what use are the humanities?”, the only honest answer is none whatsoever. And it is an answer that brings honor to its subject. Justification, after all, confers value on an activity from a perspective outside its performance. An activity that cannot be justified is an activity that refuses to regard itself as instrumental to some larger good. The humanities are their own good. There is nothing more to say, and anything that is said – even when it takes the form of Kronman’s inspiring cadences – diminishes the object of its supposed praise.

The crux of Fish’s argument against literature as an agent of moral self-fashioning goes like this:

If [Kronman’s position] were true, the most generous, patient, good-hearted and honest people on earth would be the members of literature and philosophy departments, who spend every waking hour with great books and great thoughts, and as someone who’s been there (for 45 years) I can tell you it just isn’t so. Teachers and students of literature and philosophy don’t learn how to be good and wise; they learn how to analyze literary effects and to distinguish between different accounts of the foundations of knowledge.

It my sincere belief that this argument is worthless. I hope, when I am finished, that it will be ashamed to show its face again. It is hardly original with Fish; rather, it is everywhere, since it makes scholars in the...

2008-01-08 12:59:12 GMT

First off, thanks to everyone who wrote in with different interpretations of what the word “intuitive” really means. I agree that Jef Raskin did not have the final say.

Intuitive does not only mean familiar. It can also mean consistent, stable, discoverable, and exhibiting affordances. And some other things. The reason it means different things is that “intuitive” is not a concrete or objective property of software. It is the result of a good combination of objective properties. “Intuitive” is the result of good design, not the cause.

And this is why it is not a very helpful word. Like good design, it means different things to different people. So saying that such-and-such a programming language is “intuitive” is far less meaningful than saying it is consistent, or stable, or discoverable, or “familiar to C++ programmers.” Intuitive is a word people use to describe their subjective impression of whether something is well designed. Someone can always argue with the word “intuitive,” but we can all agree on objective characteristics like whether Java or PHP are consistent. Or we can compare the intellectual surface area of Haskell to Ruby.

So on to why a programming language cannot be better without being unintuitive:

All programming languages are equally powerful. So what does it mean to be “better”? Better is a subjective word, a result, just like intuitive. The sentence is consistent, because it compares two subjective things to each other. And obviously it makes a lot of sense if you accept Raskin’s rather narrow explanation that intuitive equals familiar. (Although narrow, it fits my experience when talking about how non-professionals view end-user software: In a recent project, clients were still claiming that search boxes for each field in a table were more “intuitive” than a single full-text search. Naturally, these were older managers who had spent their formative years working with ASCII applications that worked on that principle.)

So for the narrow explanation that intuitive springs from familiarity, a language cannot be better without being unfamiliar. Well, how can it be “better” if they’re all Turing Equivalent? Only in a subjective way; only by making you better. And in that sense, a language is only better if the process of using it makes you better as a programmer. Which comes from being

Actually, it's a little more than a year old; I started this blog on December 19, 2006 with a still-relevant post on Factor's forms of if. I meant to put up a "happy birthday me!" post on the right date, but I forgot, so now: Happy Birthday Me!

Many of you brave, intrepid blog readers have endured more than a year of dry, technical posts approaching 2000 words a pop just to learn what I have in my head, giving me a refreshing boost of self-importance. Be proud of yourselves!

(As a little side-comment about Steve Yegge's recent blog post about long blog posts, I write for a long time for a somewhat different reason. I don't try to make readers endure one huge sitting, but rather try to explain everything as fully as is needed to give a good understanding of things. Because of the topics I usually write about, this sometimes takes a long time. I do this completely without noticing; I only think about it when someone points it out to me. I will never limit myself to 1000-word blog posts, because there's just too much important stuff to say.)

Source: David Lynch's message to people who watch movies on their iPods and cell phones.

Online threats won't go away

Fish’s current blog entry mounts a defense of the humanities. Here’s his concluding paragraph:

To the question “of what use are the humanities?”, the only honest answer is none whatsoever. And it is an answer that brings honor to its subject. Justification, after all, confers value on an activity from a perspective outside its performance. An activity that cannot be justified is an activity that refuses to regard itself as instrumental to some larger good. The humanities are their own good. There is nothing more to say, and anything that is said – even when it takes the form of Kronman’s inspiring cadences – diminishes the object of its supposed praise.

He’s attracted 181 comments as of 1:35 PM Eastern time; the number seems to rise by the minute. I’ve not read them.

2008-01-07 22:50:00 GMT

The story so far: Plato has banished the poets from his ideal Republic ("You will know that the only poetry that should be allowed in a perfectly managed state is hymns to the gods and paeans in praise of good men; once you go beyond that and admit the sweet lyric or epic muse, pleasure and pain become your rulers instead of law and the rational principles …").  He does this on the grounds that (a) they peddle copies of copies, moving people further away from the true realm of the Forms, (b) they lie, and (c) they encourage passions, when as any fule kno passions must be manfully (or, I guess, womanfully) repressed: “poetry feeds and waters the passions, weeds that should rather be killed by drought” [606a-d].  Aha, says his pupil, Aristotle.  Not so.  Which is to say, I agree with you that man should not be governed by his emotions; but, rather than encouraging such emotional incontinence, poetry is an effective treatment for it:

Tragedy is, then, a representation of an action that is heroic and complete and of a certain magnitude—by means of language enriched with all kinds of ornament, each used separately in the different parts of the play: it represents men in action and does not use narrative, and through pity and terror it effects a Κάθαρσις of these and similar emotions.  [Aristotle, Poetics, 1449b]

We might put it this way: the debate is whether tragedy is tonic or cathartic.  I’m teaching a course on tragedy this term, amongst other things, and have been reading a fair few books on the subject recently, one of which (Terry Eagleton’s Sweet Violence, I think, although my memory is hazy) likens it to modern-day debates on the pornography or violent video games: one camp taking the Platonic view that such things only roil-up socially dangerous feelings and ought to be banished, the other the Aristotelian view that they provide a healthy vent by which such emotions can be harmlessly released.

Then again, before getting stuck into the preparatory reading for this course, I’d assumed that ‘catharsis’ for Aristotle meant (as some critics think it does) something like ‘bring these emotions, pity and terror, into a healthy balance in the body’.  But looking over Aristotle again, I’m wondering.  For the Greeks, katharsis was a term with strong medical overtones: purging in a theraputic sense ... emetics, laxatics, the whole pre-modern doctoring perscription.  The aim of such an...

When they don't work, they draw no power. They're very green that way.

To put it squarely and bluntly, is it because he is or is it because he isn't? To phrase it another way, is it because of what he says or what he doesn't say? Sen. Barack Obama of Illinois is the current beneficiary of a tsunami of drool. He sometimes claims credit on behalf of all Americans regardless of race, color, creed, blah blah blah, though his recent speeches appear also to claim a victory for blackness while his supporters—most especially the white ones—sob happily that at last we can have an African-American chief executive. Off to the side, snarling with barely concealed rage, are the Clinton machine-minders, who, having failed to ignite the same kind of identity excitement with an aging and resentful female, are perhaps wishing that they had made more of her errant husband having already been "our first black president."

[more ...]

2008-01-07 16:51:51 GMT

After many months of hard work, we're proud to unveil the beta version of Seekler. We've added lots of features since we released our alpha version, but the most important one is that as of today, user registration is completely...

2008-01-07 14:37:00 GMT

A while back I looked up "zillion" in Wikipedia, which is an alias for the Wikipedia article about "Indefinite and fictitious numbers". The article includes a large number of synonyms for "zillion", such as bajillion, kajillion, gazillion, and so forth. For some reason the word "squillion" caught my eye, and I noticed that the citation was from Terry Pratchett: "And you owe me a million billion trillion zillion squillion dollars." This suggested to me that "squillion" might be a nonce-word, one made up on the spot by Pratchett for that one sentence, in which case it should not be in the Wikipedia article.

Google book search is a good way to answer questions like that, because if "squillion" is widely used, you will find a lot of examples of it. And indeed it is widely used, and I did find a lot of examples of it. So there was no need to remove it form the article.

One of the Google hits was from the Cormac Ó Cuilleanáin translation of Giovanni Boccaccio's Decameron. The Decameron is a great classic of Italian Renaissance literature, probably the greatest classic that Italian has, after Dante's Divine Comedy. It was written around 1350. In this particular chapter (the tenth story on the sixth day, if you want to look it up) Guccio, a priest, is trying to seduce a hideous kitchen-maid:

He sat himself down by the fire—although this was August—and struck up a conversation with the wench in question (Nuta by name), informing her that he was by rights a member of the gentry and had more than a squillion florins in the bank, not counting those he had to give to other people...

The kitchen-maid, by the way, is described as having "a pair of tits like two baskets of manure".

This was amusing, and as I had never read the Decameron, I wanted to read more, and learn how it turned out. But the Google excerpt was limited, so I asked the library to get me a copy of that version of the Decameron. Of course they have many copies on the shelf, but not that particular translation. So I asked the interlibrary loan people for it, and they got it for me.

When it arrived, I was rather dismayed. The ILL people get the book from the most convenient place, and that means that it often comes from the Drexel library, up the street, or the Temple library, across town, or the West Chester Community College library, or Lehigh University, about an hour away in Bethlehem. (Steel Bethlehem, of course, not Jesus Bethlehem.) The farthest I had ever gotten a book from was an extremely obscure quilting manual that Lorrie asked for; it eventually arrived from the Sno-Isles regional library system of

The documentation for a design pattern describes the context in which the pattern is used, the forces within the context that the pattern seeks to resolve, and the suggested solution. [For example:] The visitor design pattern is a way of separating an algorithm from an object structure. A practical result of this separation is the ability to add new operations to existing object structures without modifying those structures.

I have read the view that design patterns represent deficiencies in a programming language. This argument stems from the observation that the specific code examples for half or more of the patterns in the GoF Book are "superfluous" in languages that provide abstractions above and beyond basic OO. The Visitor pattern can be said (depending on which Golden Hammer you are holding) to represent a way to brew your own multiple dispatch, open classes, or pattern matching.

Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it.

Does this mean that given a sufficiently expressive language there will be no design patterns? Certainly not. Each design pattern organizes a problem and one suggested solution in a structured way, giving the solution a name so that programmers may enjoy a common vocabulary. The pattern would only go away if the problem goes away.

But why would a more expressive language have this better feature, if not to solve the problem? Clearly the problem doesn’t go away, it is just that instead of writing our own incomplete and buggy mechanisms for multiple dispatch we can now use the language’s complete, tested, and “free” multiple dispatch feature to solve the problem.

If you consider the problem to be “How do I implement my own multiple dispatch,” then the Visitor pattern is obsolete if you are using a language like Common Lisp. However, if you consider the problem to be “How do I separate algorithms from data structures,” then the only thing obsolete in the originally publicized pattern are the language-specific details. The high-level approach can still be relevant.

A programming language is low level when its programs require attention to the irrelevant.

Some programming languages accomplish the same task with a declaration or a singe line of code. From this, some draw the conclusion that design patterns exist because popular programming languages lack certain abstractions or they lack the meta-abstractions permitting you to build your own abstractions cleanly. The underlying assumption here is that the purpose of the pattern is to explain specifically how to write the code.

This is clearly not the case. The Ruby language implements the Singleton pattern with a single abstraction, the Singleton module. include Singleton is all you need to implement the pattern. Yet,...

2008-01-07 09:43:24 GMT

So, I’ve somehow slipped into the following horrendous cycle: Get a cold Have it turn into something that leaves me horribly congested (trip to the doctor #1) Suffer for about a week of this, gasping my way through the night (in a humidified room if necessary). Cue sore throat from post-nasal drip as well. Have it sink into my [...]

I've been playing with code for exact real arithmetic. Unfortunately I've been too busy to get it polished but I do have time to mention two interesting and counterintuitive facts about real arithmetic on computers. It's also a good opportunity to say a tiny bit more about exhaustive search.
Firstly, what does exact real arithmetic mean? It's a widely held belief that computers (at least idealised Turing machines with as much memory as you need) can't represent real numbers precisely. This is a myth. For example, a common way to represent real numbers is as lists of binary digits. Any programming language that supports the notion of an infinite stream, like Haskell, can therefore represent an infinite stream of digits. If you're unhappy with the notion of an infinite stream, think functionally instead. Define a stream to be a function that takes as argument an integer n and returns the nth element. For example

third n | even n = 1
| odd n = 0

can be interpreted as exactly representing the real number 1/3=0.010101..2. This is a perfectly well defined object that sits in a finite amount of memory. So we don't need infinite computers to represent real numbers as sequences of binary digits. (Though you may notice that we can't represent all real numbers, for example Chaitin's much overrated constant.) Exact real arithmetic is simply arithmetic with real numbers represented with some representation like this.

So now I'm ready to mention the first counterintuitive result. If we represent real numbers as streams of binary digits like above (maybe stored with an exponent or a separate integer part) then it's impossible to implement addition correctly.

The argument is straightforward. Suppose our addition function receives these two inputs: 0.000000... and 0.01111111... What should it output as the first digit after the "binary" point? If the first stream continues as repeating zeroes forever, and the second stream eventually turns into an infinite stream of zeroes, then this digit should be 0. But if both streams eventually turn into infinite streams of ones, then this digit should be 1, as a result of the carry that will happen. But there's no way an addition function can know what will eventually happen to these streams. In order to compute the first digit of the result, it needs to see all of the digits of the inputs. But no computable function can view all of the input digits. And hence addition is impossible to implement.

But that's no reason to give up. The problem isn't fundamental to exact real arithmetic, it's an issue with the representation being...

2008-01-07 07:59:59 GMT

I've often thought that software developers were akin to Magpies: birds who are notorious for stealing shiny items to decorate their complex nests. Like Magpies, software developers are unusually smart and curious creatures, almost by definition. But we are too easily distracted by shiny new toys and playthings.

Magpie with item in beak

I no longer find Scott Hanselman's Ultimate Developer Tool list inspiring. Instead, it's fatiguing. The pace of change in the world of software is relentless. We're so inundated with the Shiny and the New that the very concepts themselves start to disintegrate, the words repeated over and over and over until they devolve into a meaningless stream of vowels and consonants. "Shiny" and "new" become mundane, even commonplace. It's no longer unique for something to be new, no longer interesting when something is shiny. Eventually, you grow weary of the endless procession of shiny new things.

I'm not alone. Jeremy Zawodny also notes the diminishing luster of shiny new things:

Over a year ago I unsubscribed from Steve's blog because he had a habit of writing in breathless fashion about the latest shiny new thing-- often several times a day. I see too many people I know getting caught up in the breathless hype and forgetting to think about whether the latest shiny new thing really matters in the grand scheme of things.

Dave Slusher concurs:

[Robert Scoble] says that he gets too much email and that is ineffective for getting PR releases to him. He suggests that what you should do now is leave him a message on his Facebook wall. Dear god and/or Bob. In the time I've followed Scoble, I must have seen something like this a dozen times from him. Don't email, Twitter me. Don't Twitter, Pwnce. Jaiku me. Leave a wall message, send an SMS, just call me, email me, don't email me, don't call me. Enough already! I'm not even trying to get in contact with him, and I find this constant migration from platform to platform to be a load of shit that just wearies me. I felt the same way when I dropped TechCrunch, well over a year ago. I got so tired of hearing about another slightly different way of doing what we were already doing and why that tiny difference...

I'm always getting criticized for writing long blogs. "Way too verbose! Couldn't he have said all that in two paragraphs?" Not everyone feels that way, of course; lots of people tell me to keep doing what I'm doing. But the size critics are doggedly persistent. And I don't think it's just people who are slow readers. Even friends of mine will sometimes advise me to trim my entries down,

2008-01-07 05:00:00 GMT

Ron Paul wants to put the New Republic back on the Corusca gem standard.

Walt Mankowski wrote to me with the explanation of Samuel Pepys' footballs: They are not clods of mud, as I guessed, nor horse droppings, as another correspondent suggested, but... footballs.

Walt found a reference in Montague Shearman's 1887 book on the history of football in England that specifically mentions this. Folks were playing football in the street, and because of this, Pepys took his coach to Sir Philip Warwicke's, rather than walking.

I didn't ask, but I presume Walt found this by doing some straightforward Google search for "pepys footballs" or something of the sort. For some reason, this did not even occur to me. Once Big Dictionary failed me, I was stumped. Perhaps this marks me as a member of the pre-Internet generation. I imagined this morning that this episode would be repeated, with my daughter Iris in place of Walt. "Oh, Daddy! You're so old-fashioned. Just use a Google search."

Anyway, inspired by Walt's example, or by what I imagined Walt's example to be, I did the search myself, and found the Shearman reference, as well as the following discussion in William Carew Hazlitt's Faiths and Folklore of 1905:

Mission, writing about 1690, says: "In winter foot-ball is a useful and charming exercise. It is a leather ball about as big as one's head, fill'd with wind. This is kick'd about from one to t'other in the streets, by him that can get at it, and that is all the art of it."
This book looks like it would be good reading in general. [ Addendum 20080106: This is not the William Hazlitt, but his grandson. Thank you, Wikipedia. ]

Thanks very much, Walt.

I'm incredibly excited to share with you something that our good friend Steve Hargadon just pointed out to us. This is a list of user-created social networks on Ning in and around the world of education. Each of these social...

2008-01-06 09:16:24 GMT

Learning Factor is tough. One reason for this is that Factor is very different from other programming languages. Programmers today are used to imperative programming languages where data is stored and passed around in named variables (or function calls, which name their variables). Factor is the opposite of this. A lot of code tends to be written in a functional style, and even more jarringly, variables are rare, only referenced in a small fraction of words. Nobody intends to change any of this; it's a feature, not a bug!

What we do need to change is the other reason for Factor's difficulty to learn: lack of documentation and organization thereof. It's hard for me to say this when a lot of effort has been put into documentation, especially creating a comprehensive reference for the Factor core and libraries. When I got started on Factor, there was basically no documentation at all; I just asked questions on the IRC channel. Now there's tons of it, but it's in many places.

Two starting places (not necessarily in this order) are the FAQ and the Factor cookbook. The Factor cookbook is included in the Factor distribution, accessed by running Factor, selecting the "Browser" tab and clicking on Factor cookbook, or online. It was written by Slava Pestov, and illustrates really clearly the basics of Factor.

But once you get done with that, where should you go? Here are a bunch of options, depending on what exactly you want to:
  • Factor's included reference documentation, written mostly by Slava, is sound and basically complete but not very tutorial-like.
  • Slava's blog is the best place to learn about new language features as they're developed.
  • I wrote a bunch of introductory blog posts.
  • Elie Chaftari wrote an introduction to programming Factor, and he wrote about the FFI.
  • You can look at many other blogs about Factor through the Planet Factor aggregator. Scattered around here are many more introductions to Factor.
  • The Joy papers by Manfred von Thun provide a theoretical basis for concatenative languages.
  • You could try reading some source code in the libraries. Simple demos have the tag demo, which you can query in the vocab browser. The core sequence library is a good place to look for clean,...

I've just finally installed my first pre-release of PLT v4 (actually v3.99.0.9 at present), and there are so many little conveniences that are already qualitatively improving my life. Here are a few of the ways v4 is making me happy:

automatic opt-lambda: As I understand it, the underlying low-level #%plain-lambda is like the original lambda, but in the full scheme language, the automatically available, high-level lambda has support for the functionality of opt-lambda from the old (lib "") library. More often than not, that was the only reason I needed to require that library. It's so nice just to be able to reach for opt-args right away, without having to jump through any extra hoops.

keyword integration: Moreover, the high-level lambda also has automatic support for keyword arguments! This means there's a very smooth evolution path for functions: 1) positional when you just need a few arguments; 2) optional when one or two of them have reasonable defaults; and 3) keywords when there are enough arguments with enough defaults that it's too hard for the user to remember their order.

built-in pattern matching: No need to require (lib "") -- it's already in the full scheme language by default. I stumbled on that by accident!

generalized define-struct: There used to be a huge gap between what you could do with define-struct and what you could do with the very general but hard-to-use make-struct-type. But thanks to the expressivity of keywords, the new define-struct form is much more powerful. Plus it's so much easier to understand what
(define-struct posn (x y) #:transparent)
means, as opposed to
(define-struct posn (x y) #f)

built-in list libraries: Many more commonplace list operations are just automatically there when you use the full scheme language, such as foldl, foldr, last, andmap, ormap, build-list, etc. It used to be confusing trying to remember what was in (lib "") and what was in (lib "" "srfi" "1"). Now, if I'm not mistaken, I just don't ever need (lib "") anymore.

my first two columns are mine again: Last but not least, the new #lang module declaration form means I no longer have to indent the entire body of a module.

It looks like the PLT crew have really worked hard on fixing lots of these little inconveniences (some of which I only noticed consciously now that I no longer have to deal with them!).

2008-01-06 03:00:00 GMT

(x-posted to The Kugelmass Episodes)

Dear readers,

In the spirit of the wonderful MLAde 2007, produced by two very funny UC Irvine grad students and distributed, guerrilla-style, around the conference, I’m pleased to present this parody of academic blogging, entitled “My Story.”

(Continued below the fold.)

2008-01-05 23:37:51 GMT


[[Category:Blog entries by date|08.01.05]]
[[Category:Year, 2008]]
[[Category:Agile software development]]

====Blog: Jan 5, 2008 ====

[ John Rusk] recently reminded me (his words):
: ----------
: "Agile" (in the manifesto sense) was intended to capture the essence of a bunch of similar methodologies,
:: some of which were very conscious of reducing the cost of change (XP),
:: some of which were conscious of reducing the initial cost of development (Crystal’s efficiency),
:: some of which were focused on the social structures of teams.
: The essence was none of the above. It was about successfully producing software, and a better understanding of how that should be done.
: ----------

John here reminds me of something that I periodically forget - we all came to the meeting ''with our own value sets'' and found an area of commonality across them.

This means that finding the "true center" of agile can’t be done. There is no "center" to agile development. There's only proximity of similar-but-different personal value systems coincidentally producing similar recommendations.

It's a bit like the "old towns" in Europe. The old town is the center of the city, but the old town has no center itself - it’s just a ''maze of little twisty passages, all different'' ( [ Colossal Cave] :-). From far away it is pretty easy to say, "The ''center'' of the town is in that direction". But once you get into the old town, if you ask, "Where is the center?" you'll either get no answer or many answers. (As Gertrude Stein [ wrote]: "there is no there there")

Exactly as we see with agile development. From far away, it is easy to see in which direction the center of agile development lies: deliver more often, shorten the work-in-progress, increase communication, lighten the bureaucracy, etc.

But once you get "about there", each expert will give you a different answer as to how to get "more there". That's because each expert has their own preference as to what the center might be. John Rusk listed three up above; there are certainly more.

I'd suggest first getting "close", by following the [ Agile Manifesto] as written. Once you're close, some soul searching by the people involved will help you discover the many centers of agile, and the only true test of direction is what helps your organization the most.


[[Riding a dead horse|<< previous blog entry]]
[[Why I still use use cases|next blog entry >>]]

2008-01-05 22:00:17 GMT

There's been a recent flurry of commentary about Ning and porn. While I appreciate everyone's thoughts on the topic, I wanted to post directly and tell you what we know and what we think. Let's take the issues in order:...

Here's a quick listing of the main current Factor developers and their projects. Hopefully, it'll help beginners navigate the community better.

I wanted to keep this list short, but I hope I'm not offending anyone by leaving them off, so please tell me if there's some glaring omission here. There's definitely no official "core" group Factor developers; these are just the people who have contributed a lot in the past. I put the names in order of seniority (in terms of time using Factor).

Slava Pestov
IRC nick: slava

Slava is Factor's creator. He wrote almost all of the core, the compiler and the Factor virtual machine, the frontend of the Factor UI and the backend on X11 and Mac OS X, a detailed math library and the Factor HTTP server. Slava's definitely the leader of the Factor project, but he doesn't tend to operate in a dictatorial way, instead taking input from many people on language design decisions.

Chris Double
IRC nick: doublec

Chris was Factor's first adopter. He wrote a bunch of interesting libraries, including one for lazy lists, another for parsing expression grammars (PEGs), a compiler from a subset of Factor to Javascript, and an 8086 emulator suitable for playing old console games. He also wrote a bunch of useful bindings to various multimedia libraries and a bunch of other things too numerous to list here. Unfortunately for us, Chris has a full-time job, limiting his time to hack on Factor.

Eduardo Cavazos
IRC nick: dharmatech

Ed is a non-conformist and proud of it. He devised Factor's current module system, where vocabs in a USE: clause that haven't already been loaded are loaded automatically. He also wrote a window manager in Factor, a really cool artificial life demo called "boids", a chat server/client, an art programming language implementation and an alternative object system for Factor.

Daniel Ehrenberg (me)
IRC nick: littledan

I'm working on Factor's XML library, Unicode support, and a concatenative pattern matching library. I also have this blog, where I try to write useful (or useless) things about Factor.

Doug Coleman
IRC nick: erg

Doug made a bunch of important libraries including the calendar library, SQL bindings (he's currently working on an abstraction layer), a Mersenne Twister random number generator, some other math libraries, a cryptography library and integration for several text editors. Doug took over maintaining Windows I/O after another contributer, Mackenzie Straight, stopped maintaining it. Doug's really friendly to the beginners in Factor, even the ones who ask stupid questions.

Mackenzie Straight, Elie Chaftari and Alex Chapman, among others, also contributed a lot. You can see what everyone's...

2008-01-05 14:46:00 GMT

The diary of Samuel Pepys for Tuesday, 3 January 1664/5 says:

Up, and by coach to Sir Ph. Warwicke's, the streete being full of footballs, it being a great frost, and found him and Mr. Coventry walking in St. James's Parke.
"The street being full of footballs?" Huh? I tried looking in the Big Dictionary, and it was no help at all.

My best guess is that it's big chunks of frozen mud that you have to kick out of the way. Do any gentle readers know for sure?

The Diary of Samuel Pepys has a syndication feed you can subscribe to. You get a diary entry every day or so, with all the names and places linked to a glossary. It's fun reading.

[ Addendum 20080105: The answer. ]

In short, their Code of Ethics.

Try this: Employ an Engineer. Ask her to slap together a bridge. The answer will be no. You cannot badger her with talk of how since You Hold The Gold, You Make The Rules. You cannot cajole her with talk of how the department needs to make its numbers, and that means getting construction done by the end of the quarter.

Engineers have a certain line that they will not, cannot cross. Doctors work the same way. I don’t agree with everything in this particular post, but one paragraph resonated with me:

Behave like a doctor whose hospital administrator has just told him that hand-washing is too expensive, and he should stop doing it.
—Robert Martin, Business software is Messy and Ugly
Now, I don’t agree that you should refuse to slap together quick and dirty code that will be hell to maintain when told to do so. Whether that is a good idea or not is a judgment call. I choose to write software as cleanly as I know how within the constraints of my relationship with my client or employer. I choose to evangelize my judgment on the matter strongly.

But I don’t think I have the right to out-and-out refuse to do so when my employer or client insists. They suffer the consequences of software that is difficult to maintain, so they and they alone have the last word on the subject.

I don’t think I have the right to refuse to slap together quick and dirty code when my employer or client insists. However, if I am asked to develop software that is insecure and places private user data at risk, I will make the personal choice of saying no.

The 7 Habits of Highly Effective People is one of the most important books I have ever read. Each of the seven habits has helped me find and travel the path that brings meaning to my life. When I feel lost, I return to my well-thumbed copy and it reconnects me to my values. Very highly recommended.
Where I think the advice fits is where third parties—like users—are the ones who suffer the consequences. Doctors wash their...

2008-01-05 07:59:59 GMT

One advantage of being a geek is that our habits-- as such habits go-- are not terribly expensive. I've written before about my interest in auto racing. Instead of spending $100,000 on a sports car, I've built a nifty racing simulation rig that delivers many of the same thrills at a tiny fraction of the price. It's one of my few indulgences, and I'd like to share how I built it with you.

racing simulation rig, overview shot

Here are the ingredients:

Playseats Evolution (black)$299
Playseats Evolution shifter add-on$39
Logitech G25 racing wheel$229
50 watt Aura bass shaker x 2$80
Generic 100 watt subwoofer amp$100

It's worth noting that the Playseat Evolution is designed to mate with the G25 wheels, pedal, and shifter. The mounting holes match up perfectly. That was a pleasant surprise, as I had to do quite a bit of drilling on the older, original Playseat to get things mounted in the first version of this rig. With the Evolution and G25 combo, it's almost plug and play, although you still have to do some drilling to get the shifter add-on mounted properly.

The premium leather-and-metal (well, mostly) G25 kit includes some fairly esoteric features from a major brand vendor like Logitech, notably a clutch pedal and full shifter kit.

G25 shifter   G25 pedals

I know $229 may seem like a lot, but it's actually a great deal considering what you'd have to pay for an aftermarket shifter or clutch. You don't have to use these advanced realism features, of course. You can always ignore the clutch pedal, and the shifter can be switched between simple up/down mode and a full 6 speed + reverse layout.

The other item of interest...

Last year, nine of us shared our New Year's resolutions. Naturally, we had to do one better for 2008. So ten brave souls offered up what they've resolved to do differently this year. The declarations were diverse, honest, and inspired -- promising to amp up, dial it down, or altogether reframe.

Escape the Flatland

Leah Buley

This year, I resolve to finally take advantage of the many tools that are already at my disposal for quick and easy prototyping.

As an experience designer, probably 80% of what I produce is two dimensional in nature: sketches, diagrams, or wireframes. Most of the time, these documents never make it out of the flatland of print or PDFs. In the past, when it has been crucial to convey how the interaction builds and flows, we've implemented prototype development, which, as you can imagine, takes a lot of time and money. And there will always be a place for these bigger, functionally rich prototypes, but there are many discrete interactions and simplified flows that we can and should be bringing to life for our clients every day.

Fortunately, prototype-worthy features have been added to many of the tools already within our arsenal. So basic prototyping has become a lot cheaper and easier. Here's my plan:

  • I'll start by practicing Alexa's excellent tutorial on prototyping with Flash, (which you can read in a soon-to-be-released article on Boxes and Arrows).
  • Next, I'll spend some time familiarizing myself with the new UI elements and pages features in Fireworks that claim to make prototyping from existing Adobe CS files faster and virtually painless.
  • Finally, I'm going to get comfortable with the action and animation capabilities of (gulp) PowerPoint, which, rumor has it, can be used for more than just bullets!

No more excuses. In 2008, I'm busting out!

Embody the Spirit of Practitioner-ness

Pam Daghlian

I haven't made New Year's resolutions in years. I was in my early double-digits when I realized that we beat ourselves up enough over the silly minutiae of life (things like the parachute pants of the 80s). And me failing to get in shape or to stop giving the "stink eye" to people on the subway would only give me more to feel bad about.

However, this year I'm inspired by my colleagues. I've observed them doing their work in ways I've never experienced in my twenty-some years of bringing home a paycheck. They collaborate instead of jockeying for position. They support one another instead of throwing each other under the bus. They bring creative thinking to their projects and play around with methods and ideas instead of sticking to what's safe because it worked last time. They seem fearless about saying, "I don't know or I'm having trouble solving this problem."

A lot of the methods our practitioners use aren't applicable to my...

2008-01-04 23:52:00 GMT

More of Poetry 35:7, this time Charles Reznikoff, who might be considered the Objectivist par excellence. At least Zukofsky seems to have considered him so, considering that the founding document of Objectivism, the essay “Sincerity and Objectification: With Special Reference to the Work of Charles Reznikoff,” included in the appendix of the special Poetry issue & from which Zukofsky coined the term “Objectivism” when called upon by the editor Harriet Monroe to come up w/a label for the movement, takes Reznikoff as the exemplar.

As with many of the Objectivists, Reznikoff had an interesting life—not interesting as in you could make a movie out of it, but interesting as a writer’s life, more specifically, as an example of someone who maintained the life of a writer despite deriving no income from it and having no audience. As with most of the Objectivists, an audience finally showed up at the very end of his life and seems to be steadily increasing since his death.

The work itself is a supreme example of Modernist concision, but without any of the referential obscurantism of Zukofsky. Which is not to say that it isn’t baffling: though all of the references may be clear, the poems eschew narrative frames that would explain the importance of the presented scenes, and there is to a degree perhaps unmatched by an other practitioner of vers libre a fearless refusal to distinguish itself from prose by any means other than the unjustified right margin. Reznikoff is not the greatest poet of all time, but represents an idiom developed to its highest level, which is a great accomplishment. And given the importance of his themes—history, religion, life in the city—, he is a poet certainly deserving of a wider audience.

(Continued below the fold.)

One word: nightmare.

I just had a long vacation and got to spend a lot of time with Iris, which is why she's popping up so much all of a sudden. I seem to have gotten into Mimi Smartypants mode. I will return to the regularly-scheduled discussions of programming and mathematics shortly. But since I seem to have written two articles in a row ([1] [2]) on the subject of telling kids the difficult truth, I thought I'd try to finish up this one, which has been mostly done for months now. Also there was a recent episode that got me thinking about it again.

I went to visit Iris at school last week, and stayed for lunch. I was seated with Iris and three other little girls. As the food was served, one of the girls, Riley, made some joke about how the food cart contained guinea pigs instead. This sort of joke is very funny to preschoolers.

My sense of humor is very close to a preschooler's, and I would have thought that this was funny if she had said that the food cart contained clocks, or nose hairs, or a speech in defense of the Corn Laws, or the Trans-Siberian Railroad, or fish-shaped solid waste. But she said guinea pigs, and instead of laughing, I mused aloud that I had never eaten a guinea pig.

Riley informed me that "You can't eat guinea pigs! They're animals, not food."

"Sure you can," I said. "Meat is made from animals."

Riley got this big grin on her face, the one that preschoolers get when they know that the adults are teasing them, and said "Nawww!"

"Yes," I said. "Meat comes from animals."

Riley shook her head. She knew I was joking. A general discussion ensued, with Iris taking my side, and another girl, Flora, taking Riley's. In the end, I did not convince them.

"Well," I said, mostly to myself, at the end, "you girls are in for a rude awakening someday."

Now, I know that not everyone is as direct as I am. And I know that not all non-vegetarians are as concerned as I am about the ethics of eating meat. But wow. I would have thought that someone would have explained to these girls where meat came from, just as a point of interest if nothing else. Or maybe they would have made the connection between chicken-the-food and chicken-the-farm-animal. I mean, they are constantly getting all these stories set on farms. Since three-year-olds ask about a billion questions a day. they must ask around a thousand questions a day about the farms, so how is it that the subject never came up?

Iris was accidentally exposed to a movie version of Charlotte's Web on an airplane, and the plot of Charlotte's Web is that Charlotte is trying to save Wilbur from being turned into smoked ham. Left to myself I wouldn't have exposed Iris to Charlotte's Web so soon—it is too long for her, for one thing—but my point here is that the...

2008-01-04 18:56:01 GMT

OK, Adam Kotsko objected that I should have known that, for Zizek, ‘Cartesian cogito’ “does not name the argument, but one aspect of subjectivity, which Zizek takes to be more originary and important: namely, the sheer abyss of self-relating negativity.” This doesn’t exactly fit with the discussion in Zizek’s paper. When Zizek says things like “the link between the emergency of cogito and the disintegration and loss of substantial communal identities is thus inherent, and this holds even more for Spinoza than for Descartes” and “Spinoza criticized the Cartesian cogito, he criticized it as a positive ontological entity,” it doesn’t make much sense to suppose that both Spinoza and Descartes were commentators on Zizek. But clearly Adam is right that Zizek is sort of mixing up the history with his own philosophy of mind, and so we ought to just get on with that. Adam cites Tarrying With the Negative [amazon - with search inside]. And, picking that one up, dusting it off - well yes, “Part I: Cogito - the Void Called Subject”. I hadn’t remembered.

(Continued below the fold.)

Most operating systems have some method of displaying CPU utilization. In Windows, this is Task Manager.

Task Manager showing CPU usage and kernel time

CPU usage is generally represented as a simple percentage of CPU time spent on non-idle tasks. But this is a bit of a simplification. In any modern operating system, the CPU is actually spending time in two very distinct modes:

  1. Kernel Mode

    In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. It can execute any CPU instruction and reference any memory address. Kernel mode is generally reserved for the lowest-level, most trusted functions of the operating system. Crashes in kernel mode are catastrophic; they will halt the entire PC.

  2. User Mode

    In User mode, the executing code has no ability to directly access hardware or reference memory. Code running in user mode must delegate to system APIs to access hardware or memory. Due to the protection afforded by this sort of isolation, crashes in user mode are always recoverable. Most of the code running on your computer will execute in user mode.

It's possible to enable display of Kernel time in Task Manager, as I have in the above screenshot. The green line is total CPU time; the red line is Kernel time. The gap between the two is User time.

These two modes aren't mere labels; they're enforced by the CPU hardware. If code executing in User mode attempts to do something outside its purview-- like, say, accessing a privileged CPU instruction or modifying memory that it has no access to -- a trappable exception is thrown. Instead of your entire system crashing, only that particular application crashes. That's the value of User mode.

x86 CPU hardware actually provides four protection rings: 0, 1, 2, and 3. Only rings 0 (Kernel) and 3 (User) are typically used.

CPU Ring Model

If we're only using two isolation rings, it's a bit unclear where device drivers should go-- the code that allows us to use our video cards, keyboards, mice, printers, and so forth. Do these drivers run in Kernel mode, for maximum performance, or do they run in User mode, for maximum stability? In Windows, at least, the answer is it depends. Device drivers

2008-01-04 06:21:13 GMT

First, a big thank you to all of my readers who made my first year (pro-rated) of blogging so much fun and so satisfying! Second, here's my blogging plan for 2008: Continued blogging about startups, entrepreneurship, Silicon Valley, and related...

Don Valentine from Sequoia Capital and Cisco’s founders, Len Bosack and Sandy Lerner, discuss Len and Sandy’s termination in this rare video: We don’t know the actual facts of the matter and we don’t care who is “right”. The lesson here is that, right or wrong, you don’t want to look back and feel the way [...]

2008-01-04 05:00:00 GMT

'It's either 'your mom' jokes or me' 'Then I, like so many men before me, must reluctantly choose your mom.'

I'm having fun going through a computer-programming book called The Little Schemer. It consists of dozens of exercises that you solve using little snippets of recursive code. It definitely has the feel of a game - Sudoku moreso than Call of Duty.

The key to enjoying this book is to not get hung up on the non-code questions. The book is written as a list of questions and answers, and it's frustrating to try to answer the non-code questions because they are often unguessable:

Q: Is that bad?
A: You must beware of shadows

Quickly read through the non-code questions and answers. But try to answer the code questions - that's the stuff that's fun and interesting.

Q: Write fun? with set? and firsts
A: (define fun? (lambda (rel) (set? (firsts rel))))

You'll find pencil and paper to be too slow for this stuff; a text editor is more convenient. But you need not bother running the code through a compiler - the answers are given on the same page.

This old comp.lang.functional article by Albert Y. C. Lai, makes the point that Unix shell pipeline programming is done in an essentially "point-free" style, using the shell example:

    grep '^X-Spam-Level' | sort | unique | wc -l
and the analogous Haskell code:

    length . nub . sort . filter (isPrefixOf "X-Spam-Level")
Neither one explicitly mentions its argument, which is why this is "point-free". In "point-free" programming, instead of defining a function in terms of its effect on its arguments, one defines it by composing the component functions themselves, directly, with higher-order operators. For example, instead of:

  foo x y = 2 * x + y
one has, in point-free style:

  foo = (+) . (2 *)
where (2 *) is the function that doubles its argument, and (+) is the (curried) addition function. The two definitions of foo are entirely equivalent.

As the two examples should make clear, point-free style is sometimes natural, and sometimes not, and the example chosen by M. Lai was carefully selected to bias the argument in favor of point-free style.

Often, after writing a function in pointful style, I get the computer to convert it automatically to point-free style, just to see what it looks like. This is usually educational, and sometimes I use the computed point-free definition instead. As I get better at understanding point-free programming style in Haskell, I am more and more likely to write certain functions point-free in the first place. For example, I recently wrote:

        soln = int 1 (srt (add one (neg (sqr soln))))
and then scratched my head, erased it, and replaced it with the equivalent:

        soln = int 1 ((srt . (add one) . neg . sqr) soln)
I could have factored out the int 1 too:
        soln = (int 1 . srt . add one . neg . sqr) soln
I could even have removed soln from the right-hand side:

        soln = fix (int 1 . srt . add one . neg . sqr)
but I am not yet a perfect sage.

Sometimes I opt for an intermediate form, one in which some of the arguments are explicit and some are implicit. For example, as an exercise I wrote a function numOccurrences which takes a value and a list and counts the number of times the value occurs in the list. A straightforward and conventional implementation is:

        numOccurrences x []     = 0
        numOccurrences x (y:ys) = 
                if (x == y) then 1 + rest
                else                 rest
            where rest = numOccurrences x ys
but the partially point-free version I wrote was much better:

        numOccurrences x = length . filter (== x)
Once you see this, it's easy to go back to a fully pointful version:

        numOccurrences x...

2008-01-03 17:31:00 GMT

There’s a Zizek essay on “Tolerance” up in Critical Inquiry‘s ‘rough cuts’ sections.

I’m not done yet, and it isn’t all bad - but it isn’t good. For example, there’s this:

The main feature of cogito is its insubstantial character: “It cannot be spoken of positively; no sooner than it is, its function is lost.” Cogito is not a substantial entity, but a pure structural function, an empty place - as such, it can only emerge in the interstices of substantial communal systems. The link between the emergency of cogito and the disintegration and loss of substantial communal ...

OK. Cut. That’s rough enough.

(Continued below the fold.)

Ryan Culpepper's algorithm for good writing:

Blather. Condense. Repeat.

2008-01-03 09:04:23 GMT

I've been dissatisfied with java for a while now, but to give the devil his due, it does hit a sweet spot. When you are looking for a combination of cross platform, fast, statically typed, easily deployable language with tonnes of libraries, there isn't much else available. But on the other hand the language itself is mind numbingly verbose and since most of my coding these days is in a combination of scheme and C, when I do switch back to java, it is as if I am suddenly running through quicksand, eclipse notwithstanding.

Generics (the implementation not the idea) was the first misstep in Java's evolution. It makes it easy to write code that is almost impossible to read. For the AIMA code for example, when I used pure Java 5, generics heavy code, students complained that they couldn't make out what the code was doing and so for code that other people have to maintain or extend, I end up writing Java in a style I call "1.4 +" - Java 1.4 + enums + new for loop + generics *for collections* (only). The actual type system of Java 5 is a fairly simple (even simplistic) one (once you've worked through some books like TAPL), but the syntax is atrocious. The present controversy on "closures" (closure != anonymous function and I am tired of programming illiterates abusing terms with clearly defined meanings but that is a rant for another day) convinced me that Java is on the wrong track and is well on its way to obsolescence. "Java is the new Cobol" indeed.

What COBOL never had was an open source cross platform VM that other languages could target and a few hundred thousand libraries. Java != JVM, in other words. Couldn't I just use another language on the JVM ? Well yes, but - I don't particularly like Ruby. Jython hasn't caught up with the latest version of Python. Both these languages have dynamic type systems and are slower than compiled java. So there isn't too much actual choice given the parameters I listed above (fast, statically typed ... ).

Enter Scala. I looked at Scala a year ago, tried some sample scripts, stumbled across a bug and gave up. But things have changed since then. I've been experimenting with Scala over the last few days and I am tremendously impressed. Besides writing small scripts to explore various language features, I've been rummaging through the code for the compiler and type checker (written in Scala of course). Martin Odersky has something that is all too rare in the software world today - a strong sense of design (I am looking at you, Ruby On Rails).Scala has too many brilliant features to go into any great detail here, (there are plenty of blogs that do go into detail see this or

Happy New Year and here’s to an effective 2008. Here are the three most effective hacks of 2007. We maintain a Cheat Sheet of all the hacks, but try to apply these three if you don’t have time to apply them all. Create a market for your shares You need strong alternatives to hack a term sheet. Create [...]

I’ve received an email informing me of the emergence of a new blog devoted to Critical Code Studies:

Announcing the launch of a new collaborative blog titled Critical Code Studies . The blog is dedicated to exploring interpretations of computer code within cultural contexts. Rather than focusing primarily on making code function or even the pursuit of “beautiful” code, critical code studies brings in critical theory to examine the ways in which the lines of code reflect, shape, and reproduce our culture including aspects of class, gender, race, sexuality. These criticisms include both the context for the code’s creation and the ways in which it circulates in culture. Rather than one specific lens, CCS names a growing collection of methodologies for making/finding meaning in code.

I sent the email to some friends in the software business and one of them, Richard Fritzson, pointed me to the Wikipedia entry on Conway’s Law:

Conway’s Law is an adage named after computer programmer Melvin Conway, who introduced the idea in 1968. It concerns the structure of organizations and the corresponding structure of systems (particularly computer software) designed by those organizations. In various versions, Conway’s Law states:

* Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations.

* If you have four groups working on a compiler, you’ll get a 4-pass compiler.

Or more concisely:

* Any piece of software reflects the organizational structure that produced it.

While I tend to be skeptical of any enterprise whose name takes the form “Critical X Studies,” where X is the domain under investigation, there’s certainly room to look at the cultural production of computer code and the styles of computer languages and programs. 

My good friend Adam Beguelin is giving a talk at the office tomorrow as part of our series of live tech-talks.

These talks are open to anyone. The office is at 36 Clyde Street, San Francisco. If you can't attend in person you can watch the talk live on the HackerTV channel, where you can participate in the live Q&A; session via our on-site chat. If you don't catch the talk live, you can see it archived on that channel page later.

The event has a Facebook page.

Post Exit Startup Wisdom Adam Beguelin, PhD

Starting a company is an exciting, frustrating, and sometimes rewarding endeavor. I've done four startups, founding two. I've been through IPOs, acquisitions, near acquisitions, and the Venture Capital Nuclear Winter of 2001-2003. This talk covers some of the lessons I've learned along the way. I'll talk about raising money, spending money, and some opinions on how to build and release software in a Web 2.0 world.

Adam was the CTO and co-founder of Truveo, a leading video search engine acquired by AOL in December 2005. He is currently retired and living with his family in his wife's native country of Vietnam.

Capturing and validating user input

2008-01-02 07:59:59 GMT

Adobe's Portable Document Format is so advanced it makes you wonder why anyone bothers with primitive HTML. It's a completely vector-based layout format, both display and resolution independent. With PDF, you sacrifice almost nothing compared to traditional book and magazine layouts except the obvious limitation of resolution. Here's Kevin Kelly extolling the virtues of PDFs:

A PDF is able to retain the highly evolved grammar, design and syntax that one thousand years of bookmaking has attained. Because of the idiosyncratic way web browsers work, designers do not have full control of what you as a reader see on the web. The web page, including its fonts, fonts sizes, and placement of material and size of the window, partly depends on the viewer's preferences. In my experience as a reader, a web designer, and a book designer, the reading experience on paper -- and PDFs -- is much more refined and elegant. As a publisher and designer I can direct the flow of attention with better tools (font choices, rules, lines, columns) and better control. The benefit to me as a reader is that this sophisticated design translates into increased clarity, smoothness, comprehension, and enjoyment.

But I have a problem with PDF files.

  1. Every time I link to a PDF, I have to tag the link (pdf) to indicate that the hyperlink will whisk you away, not to another web page as you might expect, but to a strange, otherworldly out-of-browser experience.
  2. Links to PDF files assume the user has a PDF viewer installed. Do they? And how will the link be handled? As in situ navigation, presenting the user with a weird new set of PDF controls? Or as an undesirable popup window? Browser support for PDF is so weird there are entire PDF add-ons to deal with it.
  3. The layout better be mind-blowingly good to justify the use of the PDF format. For most of the PDFs I encounter, the information could have been presented in HTML and CSS markup with almost no aesthetic loss at all. The "refined, elegant, sophisticated design" offered by PDF is often wasted.
  4. You might argue that PDFs make sense as a secondary, print-optimized version of existing HTML content. But why not stick to one version of the content? Why repeat ourselves? Do we really want to maintain two different versions of the same content?

I'm not the first person to note the usability problems of PDF, but I consider this a classic case of worse is better. The advantages of PDF...

2008-01-02 01:21:03 GMT


[[Category:Blog entries by date|08.01.01]]
[[Category:Year, 2008]]
[[Category:Agile software development]]

====Blog: Jan 1, 2008 ====

Happy new year (or exit from old year)!

Here is a cute list (I repunctuated the list to separate the list items) from, the book(auto-bio) of J Marvin Brown. (n.b. the action happens in chapter 7).

: ''Bernard Trink calls it ‘riding a dead horse’ in his column ‘Nite Owl’ in the Bangkok Post of 12 March 99.''
: ''Lakota tribal wisdom says that when you discover you are riding a dead horse, the best strategy is to dismount. However, in business (and education and government) we often try other strategies with dead horses.''
: Among them are
:: - buying a stronger whip;
:: - changing riders;
:: - saying things like “This is the way we always have ridden this horse”,
:: - appointing a committee to study the horse;
:: - arranging to visit other sites to see how they ride dead horses.

:: - Increasing the standards to ride dead horses;
:: - appointing a team to revive the dead horse;
:: - creating a training session to increase our riding ability;
:: - comparing the state of dead horses in today’s environment;
:: - change the requirements, declaring that “This horse is not dead”.

:: - Hire contractors to ride the dead horse;
:: - harnessing several dead horses together for increased speed;
:: - declaring that “No horse is too dead to beat”;
:: - providing additional funding to increase the horse’s performance;
:: - do a study to see if contractors can ride it cheaper.

:: - Buying a product to make dead horses run faster;
:: - declaring that the horse is “better, faster and cheaper” dead;
:: - forming a quality circle to find uses for dead horses;
:: - revisiting the performance requirements for horses; saying this horse was procured with cost as an independent variable;
:: - promoting the dead horse to a supervisory position.

Why this blog post?

I was describing to some people yesterday what it felt like in 1999 to go around announcing that "the characteristics of ''people'' are a first-order determinant in the outcome of software projects".

In 1996 [[Growth of human factors in application development]] was rejected by IBM Systems Journal, in 1997 [[Methodology space]] was rejected by OOPSLA as "too speculative"; in 1999 [[Characterizing people as non-linear, first-order components in software development]] was rejected by ICSE (I wrote it based on their ICSE 2000 call-for-papers requesting new directions for the new millenium).

At that time I said that software researchers were acting like people doing radio...

2008-01-02 00:17:00 GMT

A few years ago I was talking to a woman I worked with, who told me that she told her kids that Santa Claus was real, "because how could you not?". She thought she would have been depriving her kids by not telling them the story. And maybe she would have been; I honestly don't know. I don't remember what it was like to believe literally in Santa Claus or how I felt when I learned the truth.

My vocabulary here is failing me. "Telling them the story" is not what I want, because the Santa Claus thing is deceptive, and telling stories is not normally deceptive: "fiction" and "lies" mean different things. When I tell Iris the story of the Little Red Hen, there is no presumption that there is an actual, literal Red Hen. Iris might think there is, or not, or might not think about it at all; I don't know which. Ditto Cinderella, or Olivia the Pig, or any other story I tell or read to her. But when people tell their kids about Santa Claus, they present it not as a story, but as a literal truth. They present it in a way that is calculated to make the kids believe there is actually a fat, benevolent, white-bearded immortal, manufacturing toys in a secret arctic workshop. This is no longer mere fiction; it is a lie. So what I want to say is that this lady thought she would be depriving her kids of the magic of Santa Claus by not telling them this lie.

But I really don't want to use the word "lie" here, because it's so pejorative. It makes it sound as though I think badly of this good woman for telling her kids that Santa Claus was real. But I don't, at all. She is generally wise and honest and I respect her. Parents tell their kids all sorts of awful, appalling lies, which upsets me a lot, but this lie is quite benign by comparison, and bothers me not at all.

Let me be perfectly clear: I have nothing, absolutely nothing, against the Santa Claus story. I have an article in progress about how much I hate the way parents routinely lie to their kids, to manipulate them, and this one isn't in the article, because it doesn't even register. It's just for fun, or nearly so.

Santa Claus seems pretty harmless to me. Unlike many of the pernicious lies children are told, Santa Claus is a great story. It would be really wonderful to believe that I would get presents every year because there was a fat guy manufacturing toys at the North Pole. Delightful! And the only thing wrong with it is that it isn't true. Oh well. There are a lot of pretty stories that aren't true.

Anyway, at the time I had this conversation about Santa Claus, Iris was too young to have heard about Santa Claus anyway, and my co-worker asked if I was planning to tell Iris the Santa Claus story.

Now that I've written this article, it occurs to me what she meant to ask, was not whether I was going to tell Iris the story, but whether I was going to tell her that it was true. Having realized that now, my reply seems a lot more obvious in...

Until now, in my blog posts on Unicode, I've been focusing on internal processing which has only an indirect effect on users. But now I'm thinking about something else: how can you write a text editing widget which potentially supports as many locales as possible? This should generally be the goal when writing internationalized applications, and almost all applications should be eventually internationalized, so why not a text editor?

As it turns out, this is an extremely complicated task, combining the difficulties of input methods and rendering. In this article I'll try to brush on as many relevant topics as possible, trying not to ramble too much on any particular one. Really, each section should probably be given its own blog post.

To test the Unicode-bind approach, I'm looking at the Factor .91 editor gadget, which pays no attention at all to internationalization and basically parrots back whatever characters it receives. Different keyboard layouts were tested on Mac OS X 10.5, though that shouldn't matter here.

Typing European scripts

European scripts are pretty easy. You just type letters on the keyboard and they appear, always in left-to-right order, on the screen, one character appearing for each keystroke in many languages. This works for English, German, Russian, Georgian and many other languages, but not for, say Spanish or Vietnamese. In those languages, there are characters like é or ở which require multiple keystrokes to input. With a typical Spanish keyboard, to write é, first the ´ key is pressed and then the e key. For ở, you first press the ơ key and then the ̉ key.

There are more complicated input methods for, say, typing é with a US keyboard, and these are system-dependent. On Mac OS X, I use Alt-e to get that first combining ´ mark, and then an e to constitute the character under it. This can be used in any application. In Microsoft Office applications on Windows, you can use Ctrl-' to make a combining ´ mark. Elsewhere, you can't use that key chord, just some complicated keystrokes to input the right hex code. I believe Gnome and KDE each define their own mechanisms for this kind of input.

From a Unicode-bind text editor, none of these multiple-character inputs work. When in the Spanish keyboard mode in the Factor editor gadget, pressing ´ does nothing, and when in Vietnamese mode, pressing ơ does nothing. This is because the input system expects something more complicated to happen next. The OS-specific keys, of course, don't work properly either unless there is special handing for them. All of these things must be taken into account in an internationalized editor widget.

Typing East Asian scripts

When looking at the possible input methods in the Mac keyboard layout chooser, you're...

2008-01-01 09:16:18 GMT

(sorry, farnsworth, your headline was too good not to gank)

Happy new year! We're no longer accepting donations for the reddit & xkcd fundraiser (so if you want to donate to EFF, you'll have to do it straight through them). Thanks to all of you who helped, either through donations or by telling people about the fundraiser. And of course a big thanks to xkcd for continuing its trend of awesomeness.

I'll be sending out emails to those lucky (and determined) first 50 who were the first to donate, the most generous 10, and Chris will be calculating those random 40 who'll be getting autographed xkcd comics. Hopefully we'll have all the goods organized and ready to be mailed out early next week.

2008 is off to a great start.

2008-01-01 04:32:00 GMT

From John Crowley, Little, Big [amazon]:

“Christmas," said Doctor Drinkwater as his red-cheeked face sped smoothly toward Smoky’s, “is a kind of day, like no other in the year, that doesn’t seem to succeed the days it follows, if you see what I mean.” ...

“I mean,” Doctor Drinkwater said, reappearing beside him, “that every Christmas seems to follow immediately after the last one; all the months that came between don’t figure in. Christmases succeed each other, not the falls they follow.”

“That’s right,” said Mother, making stately progress around. Behind her, like the wooden ducklings attached to wooden ducks, she drew her two granddaughters. “It seems you just get through one and there’s another.”

“Mmmm,” said Doc. “Not what I mean exactly."

The noetic-noematic structure of Christmas - its peculiarly trans-annual protentive-retentive character - is an appallingly neglected subject in contemporary phenomenology. And grabbing people by the lapels and barking this intelligence in their face doesn’t seem to help. There is no reasoning with a certain class of thinker.

I suppose the tree will have to come down today. I’m going to be dull and say: I had a really great Christmas season this year, very wisely spent it by not blogging too much. Indeed, neither writing nor reading much. I feel considerably restored and am expectant of a Happy New Year. And a Happy New Year to you, too.

2007-12-31 21:02:40 GMT

You may recall that I have been trying hard to keep politics out of this blog. And more or less succeeding. However, lately I've been really missing Newt Gingrich, "advocate of civilization, definer of civilization, teacher of the Rules of...

If you’re a regular reader of Bokardo then you know I think issues like the Facebook Beacon incident, the Facebook News Feed incident, and the Digg gaming incident(s) are big deals. (I’ve written about all three here on Bokardo) The reason why I think they’re big deals is because they’re canaries in a coal mine [...]

From Variety: [O]verall music [CD] sales during the Christmas shopping season were down an astounding 21% from last year. From the week of Thanksgiving up through the day before Christmas Eve, 83.9 million albums were sold, a decrease of 21.38...

2007-12-31 17:57:00 GMT

Iris and I had a pretty heavy conversation in the car on the way home from school last week. I should begin by saying that Philadelphia has a lot of murals. More murals than any other city in the world, in fact. The mural arts people like to put up murals on large, otherwise ugly party walls. That is, when you have two buildings that share a wall, and one of them is turn down, leaving a vacant lot with a giant blank wall, the mural arts people see it as a prime location and put a mural there. On the way back from Iris's school we drive through Mantua, which is not one of the rosier Philadelphia neighborhoods, and has a lot of vacant lots, and so a lot of murals. We sometimes count the murals on the way home, and usually pass four or five.

Iris pointed out a mural she liked, and I observed that there was construction on the adjacent vacant lot, which is likely to mean that the mural will be covered up soon by the new building. I mentioned that my favorite Philadelphia mural of all had been on the side of a building that was torn down in 2002.

Iris asked me to tell her about it, so I did. It was the giant mural of Harriet Tubman that used to be on the side of the I. Goldberg building at 9th and Chestnut Streets. It was awesome. There was 40-foot-high painting of Harriet Tubman raising her lantern at night, leading a crowd of people through a dark tunnel (Underground Railroad, obviously) into a beautiful green land beyond, and giant chains that had once barred the tunnel, but which were now shattered.

It's hard to photograph a mural well. The scale and the space do not translate to photographs. It looked something like this:

Note that the small people at the bottom are actually larger than life-size.

Here's a detail:

One cool thing about it that you can't see in the picture is that the column of stones on Tubman's right is painted so as to disguise an large and ugly air conditioning vent that emerges from the wall and climbs up to the roof.

Anyway, I said that my favorite mural had been the Harriet Tubman one, and that it had been torn down before she was born. (As you can see from the picture, the building was located next to a parking lot. The owners of the building ripped it down to expand the parking lot.)

But then Iris asked me to tell her about Harriet Tubman, and that was something of a puzzle, because Iris is only three and a half. But the subject is not intrinsically hard to understand; it's just unpleasant. And I don't believe that it's my job to shield her from the unpleasantness of the world, but it is my job to try to answer her questions, if I can. So I tried.

"Okay, you know"...

2007-12-31 17:25:23 GMT

My posts seem to raise more questions than they answer. This is as it should be, in accordance with the Computational Theologist Full Employment Act. In this post, I’ll try and answer some of the questions that arose from my last one.

How does one actually hook modules together and get something going? As I mentioned before, module definitions are top level classes - classes that are defined in a namespace, rather than in another class.

Defining a top level class makes its name available in the surrounding namespace. More precisely, it causes the compiler to define a getter method with the name of the class on the namespace; the method will return the class object.

Since a module definition is just a class, one needs to instantiate it, by calling a constructor - which is a class side method. Continuing with the example from the previous post:

MovieLister finderClass: ColonDelimitedMovieFinder

Now this isn’t quite realistic, since ColonDelimitedMovieFinder probably needs access to things like collections and files to do its job. So it’s probable that it takes at least one parameter itself. The typical situation is that a module definition takes a parameter representing the necessary parts of the platform libraries. It might look something like this:

ColonDelimitedMovieFinder usingLib: platform = (
OrderedCollection = platform Collections OrderedCollection.
FileStream = platform Streams FileStream.

So we’d really create the application this way:

MovieLister finderClass: (ColonDelimitedMovieFinder usingLib: Platform new)

where Platform is a predefined module that provides access to the built-in libraries.

Bob Lee points out that if I change MovieLister so that it takes another parameter, I have to update all the creation sites for MovieLister, whereas using a good DIF I only declare what needs to be injected and where.

In many cases, I could address this issue by declaring a secondary constructor that feeds the second argument to the primary one.

Say we changed MovieLister because it too needed access to some platform library:

class MovieLister usingLib: platform finderClass: MovieFinder = ...

We might be able to define a secondary constructor

class MovieLister usingLib: platform finderClass: MovieFinder = (
): (
finderClass: MovieFinder = (
^usingLib: Platform new finderClass: MovieFinder

There are however two situations where this won’t work in Newspeak.

One is inheritance, because subclasses must call the primary constructor. I showed how to deal with that in one of my August 2007 posts - don’t change the primary constructor -...

It is quite astonishing to see with what deadpan and neutral a tone our press and television report the open corruption—and the flagrantly anti-democratic character—of the Iowa caucuses. It's not enough that we have to read of inducements openly offered to potential supporters—I almost said "voters"—even if these mini-bribes only take the form of "platters of sandwiches" and "novelty items" (I am quoting from Sunday's New York Times). It's also that campaign aides are showing up at Iowan homes "with DVD's that [explain]  how the caucuses work." Nobody needs a DVD to understand one-person-one-vote, a level playing field, and a secret ballot. The DVD and the other gifts and goodies (Sen. Barack Obama is promising free baby-sitting on Thursday) are required precisely because none of those conditions applies in Iowa. In a genuine democratic process, these Tammany tactics would long ago have been declared illegal. But this is not a democratic process, and besides, as my old friend Michael Kinsley used to say about Washington, the scandal is never about what's illegal. It's about what's legal.

[more ...]

2007-12-31 16:37:20 GMT

So. I spent a week helping a friend through sort of a rough time. Then somehow I got interested in poker (of all things!) and geeked out on all the math and logic that goes into winning that game consistently, and that became an obsession. When I realised I'd lost a month to it, I spent a week or two just catching up, only to head off to texas for ten days to visit my family. Somewhere in there, I spent two days helping to rebuild a bridge.

I've been craving those personal test cases. Some of the individual tests don't seem all that important in retrospect, but the combined effect made for one of the most productive periods I've had in a long time. Certainly the most clear-headed one.

Looking back a little further, I still think there's something to be gained from having big year-long goals as well as tiny daily habits. Otherwise, the daily checklist is just a well-tuned engine purring along in a car that's stuck in neutral. What I really want is to apply that discipline toward the pursuit of some larger goal.

So what's my goal? I've realized that I tend to make a lot of potential futures in my imagination, and they're all interesting and fun to think about, and it's more fun daydream about ten cool ideas than to set aside nine of them and dedicate myself to only one. Or even to just decide on the order in which I'll tackle them.

But that's what I need to do, and so that's what I'm doing today.

My plan is to... Well, make a plan.

Since time is linear and there's only one of me, a good plan should read like an imperative program. Work on one thing, then the next, and so on. But if you're talking about months, then you HAVE to multi-task. I mean you can't work on fitness for 3 months, and then stop that and work on email. There's on going work to be done.

I think a checklist is a good tool for balancing multiple plans. It gives you a tool to manage concurrency. But even so, there's only so many threads you can run without bogging down the processor (stressing out and being ineffective).

Basically, the point is to balance a set of good habits, and then have one big thread to handle bigger projects one at a time.

It occured to me that I would be incredibly effective if I could just write a little program to tell me what to do - or at least where to focus - on a moment by moment basis. Something with a default schedule for the day that guided me through breaking my goals down into tasks and then organizing and implementing those tasks... Reminding me to start cooking healthy food before I get hungry and go searching for a snack. Checking my email in the background and only notifying me of new messages between tasks. That kind of thing.

I want to talk more about this concept of self-automation, but I'm already starting to ramble here. I really just wanted to check in since I hadn't written in so long. I'm going to post a couple big goals for the year either today or tomorrow, and also...

All quotes are from Programming is Hard, Let’s Go Scripting… by Larry Wall, Perl’s creator:

what is scripting?

When we call something a scripting language, we’re primarily making a linguistic and cultural judgement, not a technical judgement.

For a given dimension X, different scripting languages make different choices, set the knob at different locations.
  • You can’t even think about X!
  • There’s only one way to do X!
  • There’s more than one way to do X!
  • There are too many ways to do X!

programming languages

I started out as a BASIC programmer. Some people would say that I’m permanently damaged. Some people are undoubtedly right.

I had a college buddy I did pair programming with. We took a compiler writing class together and studied all that fancy stuff from the dragon book. Then of course the professor announced we would be implementing our own language, called PL/0. After thinking about it a while, we announced that we were going to do our project in BASIC. The professor looked at us like were insane.

Nobody else in the class was using BASIC. And you know what? Nobody else in the class finished their compiler either. We not only finished but added I/O extensions, and called it PL 0.5. That’s rapid prototyping.

Is LISP a candidate for a scripting language? While you can certainly write things rapidly in it, I cannot in good conscience call LISP a scripting language. By policy, LISP has never really catered to mere mortals.

And, of course, mere mortals have never really forgiven LISP for not catering to them.

I’ve always admired Tcl’s delegational model of semantics. But it fell into the same trap as LISP by expecting everyone to use the One True Syntax. Speaking of the One True Syntax: I don’t really know much about Python. I only stole its object system for Perl 5. I have since repented.

PHP takes the worse-is-better approach to dazzling new depths


I read [the word "text"] from a postmodern perspective. Of course, the term Postmodern is itself context-sensitive. Some folks think Postmodernism means little more than the Empowerment of the Vulgar. Some folks think the same about Perl. But I take Postmodernism to mean that a Text, whether spoken or written, is an act of communication requiring intelligence on both ends, and sometimes in the middle too. I don’t want to talk to a stupid computer language. I want my computer language to understand the strings I type.

2007-12-31 05:25:35 GMT

It's time for the last post of 2007. On December 31, 2004, I created a "Best of Bill" posting for 2004 and it was quite popular (based on the number of unique hits the posting got). So, I continued the tradition for 2005 and 2006 and am now doing the same for 2007. My 2007 posting is cumulative, so it includes the best postings from previous years as well.

It's hard to know which posts others find most interesting; but, hit counts and email comments seem to be as good a measure as any. So, a feature that I introduced to the summary (from 2006 onward) is that I've flagged (using "[*]" as the "flag") the post that either got the most "hits" on my blog each month or ones that resulted in a significant amount of email to me. In several cases, it was too close to call, so I listed multiple high-ranking posts for some months. However, when one of my posts appears on Reddit or Digg, that always drives up the page count even though the post may not be what I would have considered a "high-ranking" post. For example, the post that got the highest number of hits on my blog this year was The reason there's a "Cult of Mac" with 71,971 hits. However, it took almost no time to write the post and it had no Lisp content! The 2nd highest scoring post was Why you should buy an OLPC XO Laptop (24,587 hits) which only barely mentioned Lisp. The third highest scoring post was Mac OS X GeekTool (15,501 hits) which also had no Lisp content. Interestingly, the Lisp-related posts that had the most hits were the Emacs-related ones: Emacs Running All The Time (5,596 hits), Distel = Emacs erlang-mode++ (4,947 hits), and Emacs and Google Calendars (4,674 hits). Coming in just behind these posts was my highest-ranking CL-related post for the year: Lisp with Batteries Included (4,087 hits).

You can always find my past weblog postings by either drilling down from the monthly summaries (available when you click on the month name in the calendar in the side bar or by clicking on the month name in the summary below) or by using the search utility (also in the side bar); however, New Year's Eve is traditionally a time for thinking back on the past year (see here, here, and here), so I...

From the Wall Street Journal: Lord Balaji is one of the most-worshiped local incarnations of the Hindu Lord Vishnu. His adherents flock to his many temples to pray for things like happiness, prosperity and fertility. Lately, the deity has grown...

Los Angeles Times: Jamie Lynn Spears is not the first teen to have a baby Please try to contain your shock.

In the previous article I mentioned "a conference tutorial about the contents of my ~/bin directory". Usually I have a web page about each tutorial, with a description, and some sample slides, and I wanted to link to the page about this tutorial. But I found to my surprise that I had forgotten to make the page about this one.

So I went to fix that, and then I couldn't decide which sample slides to show. And I haven't given the tutorial for a couple of years, and I have an upcoming project that will prevent me from giving it for another couple of years. Eh, figuring out what to put online is more trouble than it's worth. I decided it would be a lot less toil to just put the whole thing online.

The materials are copyright © 2004 Mark Jason Dominus, and are not under any sort of free license.

But please enjoy them anyway.

I think the title is an accidental ripoff of an earlier class by Damian Conway. I totally forgot that he had done a class on the same subject, and I think he used the same title. But that just makes us even, because for the past few years he has been making money going around giving talks on "Conference Presentation Aikido", which is a blatant (and deliberate) ripoff of my 2002 Perl conference talk on Conference Presentation Judo. So I don't feel as bad as I might have.

Welcome to my ~/bin complete slides and other materials.

I hereby wish you a happy new year, unless you don't want one, in which case I wish you a crappy new year instead.

Summary: When lawyers defer their legal fees, they expect equity for the risk of not getting paid. If their risk is low or they’re not deferring fees, you can say no. In any case, offer them the right to invest $25K-$50K in your financing instead of giving them free equity. A reader asks: “I wonder if I [...]

2007-12-30 23:22:08 GMT

For many of us living in New England during the first winter of oil prices above three dollars a gallon, discussions of information technology have given way to discussions of home heating technology. We’re at the beginning of an adoption curve here that will rival earlier waves of adoption — first of iron woodburning stoves, [...]

2007-12-30 21:21:18 GMT

Arthur Lemmens and Edi Weitz have announced that the next European Common Lisp Meeting (ECLM) will be held in Amsterdam on Saturday/Sunday, April 19/20, 2008. The meeting will consist of a Sunday full of talks on April 20, 2008, with optional dinners on Saturday and Sunday evening. This is the current schedule (there may be some additions/changes, so keep an eye on the ECLM 2008 page for updates):
  • Marc Battyani
    HPC Platform
    Neuilly-sur-Seine, France
    Lisp-based supercomputing
  • Juan José García-Ripoll
    Madrid, Spain
    ECL - more than an Embeddable Common Lisp
  • Jeremy Jones
    Clozure Associates
    Boston, MA, USA
    InspireData - how it was written in Lisp
  • Kristoffer Kvello
    Selvaag Bluethink
    Oslo, Norway
    House Designer - using Knowledge Based Engineering and Lisp to automatically design buildings
  • Nicolas Neuss
    University Karlsruhe
    Karlsruhe, Germany
    Femlisp - solving partial differential equations with Common Lisp
  • Stefan Richter technologies gmbh
    Hamburg, Germany
    Using Common Lisp for large Internet systems
  • Kilian Sprotte
    Berlin, Germany
    PWGL - an environment for sound synthesis and computer aided composition
  • Kenny Tilton
    Wall, NJ, USA
    "Why we should not be here and what we should be doing instead" - a rant on the state of Lisp and Lispniks touching on Algebra software, Lisp libraries, Open Source, Cello, Cells, and somewhere along the way introducing Triple-Cells, animated data modelling with persistence for free
Looks to be an interesting conference. And, based on the success of the 2005 and 2006 conferences, I suspect that it would be wise to book early (once registration opens). In the meantime, you can keep informed of developments by subscribing to the ECLM mailing list.

Here is a daily RSS feed for the Summa Theologica. It gives you one article a day, and takes 8½ years to finish.

Better than spending $165 on the 5-volume set.

The Dunning-Kruger effect is the phenomenon wherein people who have little knowledge think that they know more than others who have much more knowledge.

2007-12-30 01:09:26 GMT

We’ve started a Venture Hacks page on Twitter: (RSS). We’ll be posting interesting quotes, links, and other things we like. We’ve started with a few quotes: “Common stock is decorative.” – Anonymous Investor “Valuation is temporary, control is forever.” – Venture Hacks “You never ask board members what they think. You tell them what you’re going to do.” [...]

A quick notice for any web-minded folks in the Newburyport, MA, USA vicinity in early 2008. My buddy Jeff Watkins (Jeff is an ajax developer at Apple) and I are planning a web geek meetup Jan. 3 in Newburyport, MA. We know quite a few web geeks in and around town, and the North Shore [...]

This week you probably read headlines to the effect of, Hollywood has biggest box office year ever. That's technically true if you are counting gross domestic revenue, and you don't adjust for inflation. Bloomberg digs into the numbers. Turns out,...

The howling void apparently lives within all of us... ...or at least those of us who are co-chairmen of New Hampshire Veterans for Rudy Giuliani... From Talking Points Memo: John Deady, the co-chair of New Hampshire Veterans for Rudy, is...

I am reminded of an event 93 years ago, in which Franz Ferdinand was shot, plummetting Europe into war. World War III is coming, and the flashpoint is the Islamic world. Much like Serbia in 1913, it is fragile and fragmented and there is a determination by a large focused interest group to see violence done in the name of their agenda. And, in the use of violence, they have successfully advanced their agenda.

“I know plenty of VCs that behave the way I do and plenty that don’t.” — Brad Feld, on keeping decks to himself Summary: A deck can help you get a meeting but it can also get in the hands of the competition. Whether you send a deck depends on who wants the meeting most. If you [...]

From the New Yorker, May 1932: There were a few strangely depressing things in [an inventions conference attended by the writer]. One was a miniature broadcasting station, owned, built, and operated by Mr. John R. Boyle, who spent ten months...

From ABC News: Robin Garrison, an off-duty 42-year-old firefighter, was walking in Berliner Park in Columbus, Ohio, in May when he saw a woman sunbathing topless under a tree. He approached her and they started talking and getting comfortable, the...

Privacy has always been a concern on the internet. But as more and more people let it all hang out on the many social networking websites popping up like weeds all over the web, there's much more at risk. Every other week, it seems, I'm reading about some new privacy gaffe. Last month, it was Facebook's Beacon opt-out policy; this week, it's Google Reader sharing private data. The privacy problems just keep piling up as more people tune in and turn on.

Nearly a decade ago, Sun Microsystems CEO Scott McNealy snapped out a warning to the worriers of the Internet Age: "You don't have any privacy. Get over it." McNealy's words look more prescient every year. In 2006, AOL unwittingly divulged the personal lives of 650,000 customers by publishing their search histories as research data. Despite AOL's attempts to anonymize the info, the New York Times quickly outed a 62-year-old lady in Georgia whose searches revealed her dog was wetting the upholstery. The Justice Department has subpoenaed Google, Yahoo!, MSN, and AOL for lists of search queries. More recently, Facebook employees were caught reading the customer logs.

Nothing warms the cockles of a user's heart quite like the tender mercies of your friendly neighborhood CEO. That privacy stuff you're so worried about? Get over it! You might wonder if Mr. McNealy has the same glib attitude towards the privacy of himself and his own family. Only criminals have stuff to hide, right? Here's Bruce Schneier's take on the value of privacy:

Last week, revelation of yet another NSA surveillance effort against the American people has rekindled the privacy debate. Those in favor of these programs have trotted out the same rhetorical question we hear every time privacy advocates oppose ID checks, video cameras, massive databases, data mining, and other wholesale surveillance measures: "If you aren't doing anything wrong, what do you have to hide?"

Let's look in this closet

Some clever answers: "If I'm not doing anything wrong, then you have no cause to watch me." "Because the government gets to define"...

From Wired, appropriately enough: In what sounds like a dream for millions of tired coffee drinkers, Darpa-funded scientists might have found a drug that will eliminate sleepiness. A nasal spray containing a naturally occurring brain hormone called orexin A reversed...

I am a long-time fan of self-hosted languages. In that post I listed the reasons I thought that a language should be mostly or entirely written in itself. Here’s another reason writing a language in itself is important: If a language’s core libraries and frameworks are written in that language, it is possible for every programmer to improve on them.

Ruby’s core libraries are written in C. Here’s the source for Ruby’s :collect method (a/k/a :map):

* call-seq:
* array.collect {|item| block } -> anarray
* {|item| block } -> an

* Invokes block once for each element of self. Creates a
* new array containing the values returned by the block.
* See also Enumerable#collect.

* a = [ “a”, “b”, “c”, “d” ]
* a.collect {|x| x + “!” } #=> [“a!”, “b!”, “c!”, “d!”]
* a #=> [“a”, “b”, “c”, “d”]
static VALUE
VALUE ary;
long i;
VALUE collect;

if (!rb_block_given_p()) {
return rb_ary_new4(RARRAY(ary)->len, RARRAY(ary)->ptr);

collect = rb_ary_new2(RARRAY(ary)->len);
for (i = 0; i < RARRAY(ary)->len; i++) {
rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
return collect;

Perhaps you like working with :fold and :unfold rather than Smalltalk’s :collect, :select, and :detect. No problem, you can hack your own in Ruby, like this:

class Object
# unfold takes a "seed" argument and a incrementor. It returns an array. The first element of the array is the
# seed, every subsequentelement is the result of applying the incrementor to the previous element.
# so in pretentious quasi-math: result[n] = incrementor(result[n-1]).
# the array ends when the incrementor returns nil, so unfold(0) { |n| n+1 } is a bad idea in Ruby
# to add terminating conditions, use if not logic, because false does not terminate unfold.
# example: 10.unfold { |n| n-1 unless n == 1 }.inspect => [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
# example: 10.class.unfold(&:superclass).inspect => [Fixnum, Integer, Numeric, Object] # using Symbol#to_proc
# See also: NilClass#unfold
def unfold...

The methods :class and :dup are a bit of a leaky abstraction when used in combination with an object’s Singleton Class:

class Marx
def jokes (laughs)
laughs * 2

groucho =
chico = groucho.dup

puts "#{groucho.jokes(10)} == #{chico.jokes(10)}"

def groucho.jokes (laughs)
laughs / 2

harpo = groucho.dup

puts "#{groucho.jokes(10)} != #{harpo.jokes(10)}"
puts "...but #{harpo.jokes(10)} == #{chico.jokes(10)}"
puts "because Groucho is still considered a #{groucho.class}"

2007-12-28 13:33:06 GMT

In November, I gave the commencement address for Neumont University, a school in Salt Lake City dedicated to teaching computer science where my coauthor lectures. This is that speech.

Headline of the day: Zoo Director Says Tiger Wall Was Low I think that would be hard to dispute at this point. As background, a Siberian tiger escaped from its containment area and tragically killed one person and mauled two...

2007-12-28 03:26:37 GMT

from this site,

....managers are voracious consumers of theory. In other words, they value ways to think about their world, and mental tools that will let them make decisions and predictions with a level of confidence higher than they get from experience and intuition alone.

Ummmm. Ok. :-P

From the New Yorker, July 14, 1951: The most encouraging word we have so far had about television came from a grade-school principal we encountered the other afternoon. "They say it's going to bring back vaudeville," he said, "but I...

2007-12-27 19:20:27 GMT

Looks like Zach has dropped my blog from Planet Lisp (see this post and this post). He says "Bill's blog is great, but it's not all that often about Common Lisp any more". I've made about 80 posts in the past year, of which 56 were lisp-related. However, of that 56, only 16 were CL-specific, so Zach is correct in that I don't focus on CL as much as I used to in previous years. Planet Lisp is Zach's site and he determines what content gets displayed, so I've got no problem with him making that call.

So, if you want to read my blog and you used to read it via Planet Lisp, now would be a good time to update your bookmarks and/or RSS reader! ;-)

Incidentally, if you want to read an aggregation of CL, Scheme, and Emacs blog posts, you might want to have a look at the Yahoo Pipes Lisp mashups that I created. There are two different ones:
  1. Lisp Pipe: An aggregation of the content from my blog, Planet Lisp, and the lisp-specific content from Reddit, Lemonodor, Lambda the Ultimate, and Bluish Coder.
  2. Lisp/Scheme/Emacs Pipe: An aggregation of all of the content from #1 plus the content from Planet Scheme and Planet Emacsen (if you are interested in Scheme and Emacs Lisp as well).

last update: 1519, 09 Jan
The weather in Austin

The Universe of...
The Valve
Jon Aquino
Coding Horror
Useless Factor
Slate Magazine
The Scariest Fun
A Neighborhood of...
The Little Calculist
Adaptive Path Essays
Venture Hacks
One Man Hacking
Room 101
without an e
Bill Clementson
Jon Udell
Bruce Eckel
Learning Lisp
ACM Queue Feature...
Too Much Code
Bram Cohen
The Changelog
Joel on Software
Don Dodge on The...
Tom Moertel
The Observation Deck
symmetry magazine
Technical Revenue
Paul Graham
Creating Passionate...
Startup or Bust
minor emacs wizardry
The C++ Source
programming musings
Adam Bosworth
{ | one, step, back | }
You're It!
Life With Alacrity
Michael Feathers'
Channel 9
Back of a Napkin
Growing a Language
The Mindset
Kill the Meeting
Python owns us