Archive for September, 2007

A Cyndicate+EagleFiler workflow

I’ve earlier mentioned that I’ve started using EagleFiler, an organizational/searching tool. Its author announced a bundle with Cyndicate, a newsreader, so I’ve started using that. It seems to fit my newsreading habits better than either NetNewsWire (2.x) or Safari. (Note: I haven’t used NetNewsWire 3.x).

Here’s a workflow (click for larger screen shots). I’m reading the last day’s news, and I see this:


A newsreader

The article describes a tool I can easily imagine using someday, so I hit F1 to save it in EagleFiler. That happens behind the scenes. Later, I might vaguely remember there was some posting somewhere about making a diagram of your model classes. In EagleFiler, I search for “model diagram rails”, and I find the saved web archive:


Saved web archive

(I get a more exact match if I remember the article mentions ‘dot(1)‘ or OmniGraffle. I’ll also get a more exact match once I process my unfiled entries and add some tags.)

I mention this now because the promotional bundle lasts only two more days.

(I have no affiliation with either company, except that I read Michael Tsai’s blog.)

Talk you like mock

UPDATE: Judging from email, I wrote this badly. Ignore the bit about assertEquals. My point is that I want to write mock tests the way I talk, which is “when this method executes, it calls these other methods in such and so a way” rather than “expect these other methods to be called in such and so a way when this method executes”. Since, in my speech, I describe the action before its effects, I want mock tests to do that too. So I made up a notation and seek comments.

I think we all know that the order of arguments is wrong in JUnit’s assertEquals. If you talked like JUnit wants you to, you’d say things like “After the calculation I’ve just described, 23 is the resulting azimuth.”

It’s not so big a deal that your order of thinking about a truth statement doesn’t match the order in which you have to type it. Probably no more than one in a billion people is driven homicidally insane by the accumulated weight of such grating little annoyances. And there’s nothing we can do about it now.

Let’s move on to mocks. Here’s a test method (with some long lines edited to fit):

  def test_checker_normally_checks_network_once
    checker = testable_checker # creates checker
                               # using mocks.
    @network.should_receive(:ok?).once.
             with(”url”).
             and_return(true)
    checker.check(”url”)
  end

Reading that aloud would sound something like this:

“The network gets asked if some URL is OK once when…

… wait for it…

 

… wait for it…

 

… wait for it…

 

… the checker is invoked with that URL.”

This is, again, not the way people talk. You might not be able to do anything about the problem in Java, but in a Real Language (meaning: one with lambda), you can. So I’ve today started writing my mock tests like this:


  def test_checker_normally_checks_network_once
    checker = testable_checker
    during {
      checker.check(”url”)
    }.behold! {
      @network.should_receive(:ok?).once.
               with(”url”).
               and_return(true)
    }
  end

The “behold!” is a little hokey; I couldn’t think of a good connecting word. But I do think this reads better. Does it read better to you?

Notes:

  • I don’t use mocks that much. This style may not work in complicated situations.

  • Surely someone’s done this before? Who?

Slow software

Jeff Patton writes an article on Slow Software and puts it in context on his blog. He asks for reactions.

My off-the-cuff reaction is that he’s letting us ignore reflexivity. “Reflexivity“: a jargon word. What does it mean? Take two statements of Jeff’s:

Before we plan and build, we should
take time to understand what value is.
Make sure the first thing we gather is
how the people paying for the software
will get value from it. […]

We also might want to understand
better the people using our software.
They’ve got goals, too, which likely are
met using other software or manual
processes today.

“What value is” and “their goals” and “their processes” ought to change when the software is injected into the mix. That change ought to reflect back on the product, which will then change its environment again, …, until eventually things settle down because further change is not worth the effort.

But I have to admit that reflexive loop is something that appeals to my personality. A perfectly valid response to the above goes like this:

  • The vast majority of products don’t need any high-falutin’ reflexive loop. They’re a CRUD app attached to a database, just like a zillion others.

  • I’m overly fond of this reflexive loop because I don’t have the skill to understand its value and user goals until after I dump a product on someone. If I were more skilled, I could immediately get to the same place that I today can get to only after several trips around the loop. Maybe, especially with those CRUD apps, I could even get immediately to the place where further change to decisions is not worth the effort. In that case, the main point of developing in short iterations would not be to allow discovery but to enforce discipline.

I think those are valid points. For that reason, I’ve asked Jeff to let me join him on some consulting gigs, so I can sit at his feet, watch, and learn.

Structured procrastination

Here. Silly, I thought, before I realized I do something like it.

X-driven design

From Keith Braithwaite: a discussion of gauges as a metaphor:

http://peripateticaxiom.blogspot.com/2007_07_01_archive.html
http://peripateticaxiom.blogspot.com/2007/09/gauges.html

It’s nice.

I still like examples as a metaphor, but if it hasn’t caught on in four years and a month, it’s not gonna.

Reasons to try Agile

Mishkin Berteig has a concise list of five reasons to try Agile. Could be useful as a cheat sheet when talking to business people.

Colloquium in Chicago: Edwin Hutchins

Edwin Hutchins is the author of Cognition in the Wild, an influential book on how groups think. If I were closer to Chicago, I’d go. I might still go. Sounds pretty relevant to crossing the cultural divides that often separate, say, the business people from the development team.

Edwin Hutchins (UCSD) will be presenting a colloquium entitled “The multimodal production of common ground understandings” on Thursday, October 4th at 4:00pm. The colloquium will be held at Room 1-421, Frances Searle Building.

For more information on the TSB speaker series (and to sign up for announcements), visit http://tsb.northwestern.edu

THE MULTIMODAL PRODUCTION OF COMMON GROUND UNDERSTANDINGS
Edwin Hutchins

ABSTRACT:
Effective collaboration requires the creation and maintenance of common ground understandings. This is an especially interesting problem in the case of intercultural collaboration, where communicative conventions may not be shared. However, intercultural collaboration often takes place in professionally relevant material settings and among people who share professional competence. In this paper we show how Japanese airline pilots and American flight instructors overcome pronounced differences in language and culture and achieve effective collaboration. They do this by drawing on a rich body of shared professional pilot culture and by exploiting richly multimodality situated communication practices to produce common ground understandings.

Salt Lake City agile roundtable protocol

A nice summary.

On the brighter side: Iapetus

Breathes there the man, with soul so dead,
Who never to himself hath said,
Man, things in outer space sure are cool.

iapetus_cassini_trailinghem_mosaic_ugar_half_lg.jpg

Large image

Really large image

Different pictures

Image credits: NASA / JPL / SSI / mosaic by Gordan Ugarkovic. Image taken from the Planetary Society blog. With apologies to Sir Walter Scott.

Numerology

The cost of the Iraq post-war is roughly USD2,000,000,000 per week (EUR 1,442,760,000 today). The population of the US is roughly 300,000,000. That means each person’s share of the Iraq post-war is about… $6.66, or one centiBeast. I would have expected the world to end a couple of years ago, when we reached a full Beast, but this numerology stuff never does seem to work out.

Seven bucks a week isn’t that much, and think of all we get for it:

 

 

 

 

Switching gears, there are around 27.5 million people in Iraq (July 2007 estimate). So the war costs around USD73.0 per Iraqi per week. Could we just pay them to do whatever it is that they’re supposed to do for the post-war to be considered successful? Well, Sarbast Mohammed works seven days a week at two jobs and brings in around USD120.0 per week. He might appreciate the little top-up to his income. Might win his heart and mind.

Of course, we’d have to get it to him, and we and the Iraqi leadership haven’t done so well at handling reconstruction money in the past. I know the man for the job, though: Karl Rove. He was in charge of the post-Katrina New Orleans reconstruction effort, and we all know how well that went. Since he resigned his job at the White House, he’ll have even more time to do an even better job in Iraq.

 

Sorry, I’m feeling bitter. I’ve sat in on enough product design discussions to know that it’s easy for the external world to disappear. In many companies, each person’s career depends much more on how she positions herself in relation to her management peers than on how the product is positioned in the marketplace. That’s how silly product decisions happen. The more captive the customer base, the easier it is for primate status games to take over.

Well, I’m a captive customer, observing from the outside, and it seems by far most likely that this post-war will go on until someone figures out how to end it without much risk of taking the blame. The media/government network is too inward-looking to break out of the dollar auction, especially since they can personally lose only status, not blood or money.

On the other hand, 33% of US citizens still believe Saddam Hussein was personally involved in the September 11th attacks. Sorry, 33%-ers, but that’s… not sensible. I could grant you “unsure”, like 9% of your peers—more people should answer polls that way. But “yes” seems so beyond the published evidence that I’m flummoxed: either you or I are not paying anywhere near enough attention to have an opinion.

Yet people do, based (as far as I can tell) solely on artful juxtapositions of “9/11″ and “Saddam Hussein” in speeches. A whole lot of people make bad judgments about political matters based on what really amounts to habit and confirmation bias.

We can’t look at that poll result and ask the Democrats to risk doing anything about Iraq. The populace is not sensible. Yeah, so 64% of people say today that they want withdrawal within the next year. But half of them will be convinced in 2012 that Iraq was just turning the corner in 2008, that they knew that at the time, and that the Democrats went and turned victory into defeat.

We are so screwed.

In such a mood, I find configuring a version control / deployment environment (with Twitter and Jabber notifications from subversion!) strangely comforting: there’s an unending stream of glitches, each of which can be solved.

P.S. Because the above seems too self-righteous, I’m compelled to admit that I’ve had some pretty stupid opinions, both geostrategic and otherwise. For example, my opinions about exercising with ankle pain turn out to have been really, really stupid. I don’t mind that, since one of my goals is: