Dashboarding

Right, it’s been a while… how does this work again? Right. Anyway.

I’ve been following Mark Bernstein’s posts on building a dashboard in Tinderbox and enjoying them… and puzzling out how to implement them, in a lot of cases.

One thing I wanted to do, once I figured out how the example he gave in the post above worked, was not have to type in all the random words I wanted as notes in a note in my Tinderbox file.

So what I did was use Tinderbox’s ability to run command line to grab a random word out of the built-in system dictionary. I couldn’t quite get the perl one-liner working inline, so what I did was I created a file called randomWord and put the following in it:

#!/bin/sh

word=`perl -e 'open IN, "</usr/share/dict/words";rand($.) < 1 && ($n=$_) while <IN>;print $n'`

echo $word
I made it executable and dumped it in /usr/bin.
Then, in my Word of the Day note in Tinderbox, I added the following in the Rule section of the note (modified slightly from Mark’s example – visible when you right-click on a note and choose to the Rename menu item):
if($Date!="today") {
 $Text=runCommand("randomWord", "");date="today";}
And I was done. A daily word of the day from the built-in dictionary… now to just find the time to write in that Tinderbox file everyday…

Coding Horror: You’re Doing It Wrong

[From Coding Horror: You’re Doing It Wrong]

Jeff Atwood talks about templating engines (for generating html) being wrong… and I agree, with code like this:

<%foreach (var User in Users) { %>
<div class="action-time"><%= ActionSpan(User)%></div>
<% if (User.IsAnonymous) { %>
<div class="gravatar32"><%= RenderGravatar(User)%></div>
<div class="details"><%= RepSpan(User)%><br/><%= Flair(User)%></div>
<% } else { %>
<div class="anon">anonymous</div>
<% } %>
<% } %>

But, and I might be biased here, the WebObjects approach is much more pure, much more clean, from a markup vs. code point of view.

A quick crack at something similar in WebObjects would look like:

<webobject name="UserRepetition">
<div class="action-time"><webobject name="UserActionSpan"/></div>
<webobject name="IsAnonymousConditional">
<div class="gravatar32"><webobject name="UserGravatar" /></div>
<div class="details"><webobject name="UserRepSpan" /><br/><webobject name="UserFlair" /></div>
</webobject> <webobject name="IsNotAnonymousConditional"> <div class="anon">anonymous</div> </webobject> </webobject>

With a bindings file looking like this:

UserRepetition: WORepetition {
    list = users;
    item = currentUser;
}
UserActionSpan: SomeOtherCustomWOComponentToDisplayThisThingMaybe {
}
IsAnonymousConditional: WOConditional {
    condition = currentUser.isAnonymous;
}
IsNotAnonymousConditional: WOConditional {
    condition = currentUser.isAnonymous;
    negate = true;
}
...

Not too bad, eh? If you’re looking for separating your presentation from your code, well… I don’t think there’s anything better. But then, like I said, I’m biased.

It’s such a shame, with all the comments, that not a one has brought up the Old Lady…

Candy Land as message bringer

[W]hat sort of message does Candy Land send to our kids? (And I’m not just talking about all the implicit advertisements for cane sugar products.) It says you are powerless, that your destiny is entirely determined by the luck of the draw, that the only chance you have of winning the game lies in following the rules, and accepting the cards as they come. Who wants to grow up in that kind of universe?

[From The case against Candy Land – Boing Boing]

Now, Steven, I love ya, buddy, but here’s the deal: For a lot of us, we are powerless. Oh sure, we could ditch our day jobs and seize the day, pull ourselves up by our bootstraps, and throw out the deck of cards and start making our own. People make decisions which affect your daily life, your work life, over which you have no control. A butterfly flaps its wings in China, causing your day to be ruined by some a**hole in a Dodge pickup. Or maybe you get to pick up a coffee in the morning, thanks to that butterfly’s benevolence. Only it’s not benevolence, it just… is.

Don’t get me wrong, I love my day job. Okay, maybe ‘love’ is a bit of a strong word for it. But I like it. I don’t mind it. But many days, especially days when I have meetings, it really, really hits me that I have no power at all over my own destiny. Sure, I also believe you can make your own luck, to a degree, but sometimes, just sometimes, Candy Land is a very apt model for how the world works. Stuff just happens. Pick a card.

Yours Truly,

_m

#9 Lollipop Lane,

Candy Land TW12

A review of “The Pompeii Syndrome”

by David Rice


This was, I was hoping, my steal of the trip. We were heading home, lugging carry on and two small children through Shannon’s lovely concourse, and we stumbled upon Hughes & Hughes massive sale going on. When I say we stumbled upon it I mean that we’d gotten forewarning of it when my sister-in-law and family had reported the going out of business sale at the airport arm of the bookseller, so we didn’t quite stumble upon it so much as we targeted it like a book-seeking missile.
We loaded up a bag or two of books, and headed to security, happy with our haul. It was a mix of business books (not mine, quoth, err, me), kiddie books for the, umm, kids, a fiction of varying prospects. I like to go for local authors when we’re back, and David Rice was local by way of a trip or two round the world and into the priesthood, even. So he was my great hope. Even moreso than the insufferable John Banville writing as the (presumably) less sufferable Benjamin Black. I’ve bought two Benjamin Black novels by now, and I haven’t touched a one, for fear he turns out to be as painful to read as he was writing as himself.

So it was with great pleasure that I settled down with the Rice book once we were marginally adjusted to being back home in the States.
The story… well, here are the basics:
There is a massive nuclear reactor in England which has a dubious safety record, handles nuclear waste from all over the world, there is a woman journalist tasked with writing about it for her paper, there is a television priest doing a documentary on the last days of Pompeii and he has a feeling, a sneaking feeling that the manic behavior that gripped the people of Pompeii in their last days, which they refused to believe could be their last days (simply because it was inconceivable, which is, itself, the Pompeii Syndrome of the title), well, that manic behavior was exhibiting itself now, so what was the inconceivable disaster they could all face? There’s a Middle Eastern sheik with his castle, software plant, and theme park in Galway, staffed entirely by people from the Middle East and none at all from the west of Ireland. There’s also the country’s (Ireland) main anti-terrorist policeman, Black Jack, as he’s known, who is scared, during the course of the novel, by a woman out of her mind with Alzheimer’s disease who chases him with a frying pan.

It’s an… okay, I suppose, crack at a story. The idea was interesting-ish enough. Somewhere, though, David Rice read a book about writing in which the advice given went something like this:

“Show, don’t tell the dear Reader what is happening.”

Unfortunately, this advice was taken to mean that, so long as he doesn’t explicitly come out and write something like:

Jack is conflicted about his role as an anti-terror policeman, and is quite smart and open-minded, really, he just finds that people follow certain stereotypes sometimes, so he looks into it, without being racist, really.

Which is a good thing. Instead, however, he writes:

“Jack,” said his partner, “I know you’re conflicted about your role as an anti-terror policeman, and are quite smart and open-minded, really, and I know you just find people follow stereotypes sometimes, so you look into it, but you’re not racist, I know.”

Which is not great.
The whole thing gets unwieldy, fast. I quickly began to feel like I was being bludgeoned, which may have been a clever terrorist/torture ploy on Mr. Rice’s part. If so, good one.
By the last half of this book, unfortunately, I was reading just to get it over with. He had a few mildly entertaining twists, but I couldn’t get away from the dialogue telling me, rather than showing me anything. And the characters, whether it was the ham-handed descriptions/characterizations or something… else, just didn’t work, for me. The sheik was very one dimensional. The ranting racist West Ireland councilman was very one dimensional. The Black Jack character was… well, he was more than one dimensional, it’s just that none of the dimensions were contiguous. The reporter was… two dimensional, but again, the two dimensions were miles apart and at odds (hard to do, when you’re that far apart), and not in a good way.

At any rate, I finished the book off, and picked up another ‘find’ prospect Amazon dropped in my lap for less than a buck: Peter Spiegelman’s Black Maps, which has, so far, been a million times (roughly, and possibly adjusting for inflation) better, in terms of writing, a cohesive story, and well-paced action. Inconceivable that it could be as bad as The Pompeii Syndrome (which, again, I wouldn’t say was bad… just… difficult or tedious reading).

Final Days SALE SALE SALE!

Writer.app has been heavily discounted now for all you NaNoWriMoers stuck at thirty, twenty, or ten thousand words with only days remaining and your eyes bleeding from surfing the web, staring into space, brushing your teeth, or doing virtually anything but writing!

You can now get this amazing application for just NOTHING! Nothing at all! It’s like Christmas come early! Or late, if your local stores have also had Christmas decorations and sales on since August 9th.

I’m telling you, it’s a great way to get that little self-editor out of your head and just let the words pour onto the paper. Or if they’re not pouring, at least they’re being dumped, unceremoniously, onto the paper. One. Word. At. A. Time.

Listen, I’ve sacrificed my NaNoWriMo for your own sake, tweaking the app a little bit to make it that much more pleasant to work in because I knew I’d be eyeballs deep in something else all month (and for the foreseeable future). Please. I’m begging you. Think of the children…

“Single Dad” Week

Continuing my hockey/playoff beard analogy from Twitter earlier today, here’re the stats for the week thus far (while I play at being “single dad” with L off in Germany and France from Sunday to Sunday):

  • Penalty minutes: 0, 0 (impressive that both sides have stayed out of the penalty box, though there’s been a few tears which nearly resulted in a ‘too many whines about the Munchkins’ two minute minor)
  • We have just about ended our first period. Score, nil – nil.
  • Playoff beard status: still growing
  • Legs are feeling a little fatigued, I’ve got dark circles under my eyes that are either a result of dropping the gloves and duking it out (and being on the losing-ish end) or as a result of lack of sleep.

We’ll haul out the Zamboni tonight, get us some fresh ice, and go again tomorrow.

All this hockey talk is making me itch to get out there and skate… and looking out the front window it looks like my neighbor is putting down the first tentative sheet of prospective ice this evening as it dips below freezing… lunchtime skates, here we come!

A wombat, the sink, and how it got there