MarkBernstein.org

The email ecosystem has been blighted by the presences of a free, marginally adequate solution that everyone already has. But correspondents, hearing of my email plight, have some good suggestions.

  • Mail Act-On 3 adds popup palettes and keyboard shortcuts that make it easier to file messages from the keyboard.
  • David Spark’s Email Field Guide received an enthusiastic recommendation.
  • Mailmate is a popular alternative client.
  • Postbox is another alternative client, based on Thunderbird, with excellent support.
  • Mail Steward Pro promises better email archiving.
Apr 14 25 2014

Fangirl

by Rainbow Rowell

More identical twins!

There’s a lot of YA power fantasy these days that involves hot girls with weapons. Rainbow Rowell’s heroine wields a laptop.

Fangirl is a writer’s fantasy. Cather Avery, a freshman at Nebraska, is a huge fan of Simon Snow, the boy-magician who has starred in seven long novels about a magic school. Cather writes Simon Snow fan fiction and has thousands and thousands of loyal readers. “I’m weirdly huge in Japan,” she remarks at lunch one day. She thinks nothing of bashing out three or four thousand words at a time, whenever she needs a new installment. What writer wouldn’t want to be Cather?

Of course, any heroine needs a few obstacles. Cath’s father is bipolar, her mother is absent, her identical twin sister thinks Cath is a dork, her roommate thinks Cath is a joke, and Cath has no trace of self-confidence. Despite a down-to-earth sensibility and a talent for writing steamy gay fanfic that won her an international audience, she’s got the sexual timidity of a mouse. Her sister teases her:

“Think of how many beautiful first times you’ve written for Simon and Baz.”

“That’s totally different,” Cath said dismissively. “They don’t even have the same parts.”

Wren started giggling and then couldn’t stop. She hugged the laptop to her chest. “You’re more comfortable with their parts than —” She couldn’t stop giggling. “—your own … and you’ve never even seen their parts.”

“I try to write around it.” Cath was giggling, too.

On top of this, Rowell has terrific fun by spinning the whole romance into a metafictional top, giving is fascinating snippets of the fantasy fan fiction, snippets of the “real” but imaginary fiction on which it’s based, and then turning everything very cleverly on its head.

Apr 14 24 2014

To The Edge

A couple of days back, the main hard drive gave out on my old PowerMac G5 I’ve been using as my email, correspondence, and accounting machine. Worse news was to come: the diagnostics said the main hard drive was toast, but they were none too sanguine about the state of the backup disk.

You need redundant backup. In depth. And yes, sometimes, even the pros get caught. I felt like an idiot. When an aging computer is acting badly, don’t reboot it: make another backup. And then do it again. It wasn’t a total disaster: the very worst case scenario only involved about a week or two of rekeying accounting records and a peeved biographer. The crucial stuff is backed up multiply and offsite.

Worse, I couldn’t find our SATA drive sled, so I've been on tenterhooks for a couple days until a new sled arrived. Fortunately, the backup is sound.

Beyond Eudora

But without the G5, we bid adieu to Eudora as an email client. That’s a bit of a blow: I’ve got an awful lot of email in Eudora, and I still like some aspects of Eudora better than mail.app.

Nevertheless, I'm going to need to shift to a modern email environment. My constraints:

  • I’ve had my email address on public web sites continuously since 1984. I receive incredible amounts of spam. If it weren’t for Michael Tsai and Spam Sieve, it wouldn’t be pretty.
  • I send and receive a lot of email.

If you know about Mail.app add-ons that I ought to be using, Email me.

Apr 14 23 2014

Driven

David Heinemeier Hansson recants test-driven development:

Test-first fundamentalism is like abstinence-only sex ed: An unrealistic, ineffective morality campaign for self-loathing and shaming.

In effect, Hansson echoes Jim Coplien’s complaints in Why Most Unit Testing Is A Waste. Coplien is a fascinating character in the C++ world , an exponent of astonishing techniques for doing things that, perhaps, are sometimes best left undone but which are great to know how to do. Coplien argue, in essence, that:

  • Unit testing is bound to miss lots of bugs, because you can test only a small fraction of the state space for even trivial objects.
  • Finding the right seams and the crucial boundary conditions is not harder than simply proving correctness, which is where we got on the bus.
  • What we really need to do is to test systems and subsystems, anyway.

Hansson writes that

Test-first units leads to an overly complex web of intermediary objects and indirection in order to avoid doing anything that's "slow". Like hitting the database. Or file IO. Or going through the browser to test the whole system. It's given birth to some truly horrendous monstrosities of architecture. A dense jungle of service objects, command patterns, and worse.

This echoes Brent’s concern about splitting big objects into a basket of bunnies, but it’s essential to understand how good design rules can lead to bad design if you don’t keep your eyes open.

The Primrose Path

Isolated behavior is good. Being able to instantiate an object simply is good. Avoiding complex dependency graphs is good. Being able to use an object without a database or the network is good.

But it’s never good to go overboard and let the pursuit of the good create disaster; you seldom want to give the bunnies a skein of colorful yarn and hope for the best. Specifically, it’s quite easy, when splitting a messy big object into smaller objects, to choose bad boundaries. It’s good to be simple here, but only if that doesn’t add too much complexity there. It’s good to isolate this, but only if isolating it doesn’t mean that everything else has to jump through hoops.

This happens all the time in design. A friend of mine was designing an embassy for a funny-sized lot. The reception areas gradually grew to make them lighter and grander. The staircase grew to balance the reception area. A garden pavilion provided a great space for casual entertaining and only required moving the whole building a bit on the site. Small, sensible adjustments. And then: it turned out that the driveway radius was now smaller than the turning radius of a limousine. And while you or I could live with that, an embassy can’t, and you really don’t want to discover this after you’ve done all the drawings of the beautiful but impossible garden pavilion.

Aye, madame, ’tis common

One of the core design assumptions in Tinderbox is that a map’s or an outline’s LayoutPolicy doesn’t know about the DrawingPolicy, and the DrawingPolicy doesn’t know about the LayoutPolicy. That seems a sensible separation of concerns. I wasn’t sure it was right when I first tried it, ten years back. I’m still not sure it’s right. Perhaps they really belong together. Or perhaps they should have been divided differently. One day, we’ll see what the alternatives are; until then, it works.

Another design decision involves the way timeline bands are managed. My reflex is to put all the work into the TimelandBand and make the list of bands, BandList, a simple composite. One day, I tried something different: I made BandList the smart class and hollowed out TimelineBand until it was little more than an BandListIterator. That worked, but it never felt right, and I spent last weekend moving functionality around until timelines felt less acrobatic.

Tech Fundamentalism Is Scary

Methodological fundamentalists descend on technology from time to time. Hell, TDD and agile started as a rebellion against an older tech fundamentalism. As a profession, we’re suckers for The Word and want to know The True Way. Sometimes, the methodologies do help: structured programming, literate programming, strong types, weak types, objects, patterns, functional, agile: it’s all been good for us.

But, perversely, these helpful little ideas often become modes of punishment. The zealots with fire in their eyes arrive to tell us that you’re doing it wrong. Pointy-haired managers support them because it reinforces their authority, and because it’s easy to see surface flaws and hard to understand deep structure. And – let’s face it – a lot of us are all too receptive of that message. The beatings will continue.

The mass of guilt that weighs upon the field deadens our conferences. That guilt arises from the divergence of what we like from what we think we should like. We enjoy exciting new systems that do what nothing else could do; we think we should like systematic demonstrations that this widget lets students do a task 5% faster than that one. We enjoy daring prototypes and agile development; we think we should be planning our work and proving correctness. We enjoy astonishing code; we think we should write code so clear that our most mediocre students (and the management team) will grasp it without effort.
Apr 14 15 2014

How I Live Now

by Meg Rosoff

A delightful YA dystopia in which Daisy, an American teenager with a temper and a bit of an eating disorder, spends a summer with her Aunt’s English family in order to get away from her newly pregnant stepmother. Unfortunately, this turns out to be the summer of World War III.

The superbly-paced book differs in important directions from the recent (and superb) film, and the differences repay thought. Some are mere abridgments, some heighten the drama, some exploit aural or visual references (Fairport Convention, the Dursley’s neighborhood) that wouldn’t work on the page.

The English setting works very well, and though the details of this war are not terrifically plausible, this is surely a story that unfolded in the south of France in 1940, in Kosovo, in Iraq and Afghanistan and probably in villages not far from Thermopylae and Jericho.

In passive vs. imperative linking, Mark Baker discusses the difference between imperative links – links that tell you to Click Here! – and what he calls passive links – everything else.

A friend wrote to ask whether this distinction has a counterpart in hypertext theory. I don’t believe it does, in part because most students of hypertext rhetoric always viewed imperative links as a mistake or an anomaly. Baker agrees.

What we’re really talking about here is not the link but the link anchor, and the distinction is really one of voice: do we tell the reader what to do, or do we lay the matter out in front of the reader and trust the audience. Lots of current Web practice despises the audience, treating it as a herd to be lured into whatever lurid sideshow you’re using today to decorate your ads. That’s clearly neither sustainable nor desirable.

In his Hypertext ’87 keynote, Ted Nelson drew pictures of what we today would call banner ads, shouting “Click Me!” Everyone assumed this was satire.

Are imperative links ever useful? I think they make sense in only a few contexts:

  • Where the link appears in the form of an image or UI widgets, the instruction to “Click here…” indicates that this is an active link, not merely an illustration.
  • Where the link is an instrument for taking an action, the imperative voice fits well with direct address. “Use the inspector to change the properties of the selected item. Click here to open the inspector now.”
  • Where the link cannot appear in its natural context. Baker identifies the most common cause for this, the style rule that prohibits links in body text. That custom is a mistake. Occasionally, though, no appropriate anchor can be found, or placing a link in its natural place might overload a sentence. A footnote or sidebar can be valuable.

The most important point in Baker’s piece is that writers must not presume to know what the reader wants or needs, or why they are reading. The reader’s purposes are hidden from us. They are hidden from the reader. No one knows, from moment to moment, why they’re reading what they are; endless studies of hypertext reading behavior have revealed little, but this much we know. When it comes to reading, nobody knows what the hell they’re doing, but never imagine that you know better than your reader what she needs or wants.

Apr 14 13 2014

It’s Not C

Brent Simmons looks at there Heartbleed Bug and the Goto Fail and blames C: That Pretty Much Wraps it Up for C.

This is wrong, and also dangerous.

Wrong: Any computer language capable of doing real work is also capable of being confusing, capable of being misused, capable of being subverted. That’s why they call it a language. Both these errors were deep in trusted system code, written and reviewed by experts and hiding in plain sight; bugs are like that. The open source charlatans have been shouting for years that it Can’t Happen Here. It did. Twice in two months.

Dangerous: Powerful people wish folks like Brent and me – people who write programs – were all safely inside the military-entertainment complex. If they could lock down computing even more – licenses for programmers, permits for running applications, banning software not sanctioned by the government or by a Fortune 500 company – they could extract better prices. You wouldn’t actually get fewer bugs: you’d just never find out about them. Your mail wouldn’t be more secure; you’d only find out about the insecurity when they knocked on your door, or mysteriously misdirected an embarrassing email to the press, or somehow your “sealed bid” was leaked to your rival, or your daughter’s chat transcript mysteriously got posted to Facebook.

There’s reason to think that goto, and maybe Heartbleed, were deliberate errors introduced by subverted programmers. Abjuring C isn’t going to protect you from that. Hell: we can barely protect against embezzlement – the introduction of intentional errors in adding up a bunch of numbers. Most programs are more complicated than that.

If you have free speech, you risk dangerous speech. If you have free computing, you risk dangerous programs.


Update: Brent’s reply is generous and absolutely right.

Apr 14 11 2014

Sisterland

by Curtis Sittenfeld

The latest novel by the author of the estimable Prep shares many of its strengths. Twin sisters grow up in St. Louis. They’re a lot alike, and they’re a lot like everyone else, except that they have occasional precognitive dreams. Violet grows up to be a psychic, Daisy suppresses her talent and grows up to be a faculty wife, and then one day Violet predicts an earthquake and winds up on the Today Show. A sensitive portrait of relationships, not only between the twins but also a remarkable picture of Daisy and her sensitive, caring, and non-psychic husband.

In the current New Yorker, Daniel Mendelsohn looks at a new book, The Parthenon Enigma, in which Joan Breton Connelly proposes that a central theme in the temple was the human sacrifice of the daughters of the mythical king Erechtheus. This has provoked some shock and fuss, though it seems to me that everyone knows the Greeks had a thing for sacrificing young girls: Polyxena, Antigone, Iphigenia, and who knows what I’m forgetting.

In passing, Mendelsohn explains (and the New Yorker fact checkers approved) an explanation of the size of the Delian League’s treasury.

At that time, it was valued at eight thousand talents – roughly $4.8 billion in today’s money, by one estimate. Another six hundred talents, or about three hundred and sixty million dollars, rolled in annually as tribute from Athens’ ‘allies.’”

Can this possibly be right?

It’s impossible, really, to work out exchange rates for the ancient world. The wealth of Croesus would not suffice to buy a bottle of penicillin. Not only could Midas himself not have bought an iPhone: he couldn’t have bought a window pane. Conversely, you could walk down to the agora and pick up a nice mixing bowl for spare change that would today command millions of dollars.

A talent was literally 25.86 kg of gold. If you assume that ancient gold was worth today’s price of $1318/troy oz, the 5000 talents in the treasury do work out to about five billion dollars. That’s a million dollars a talent.

But that’s probably not a great way to look at things. Herodotos thought there were about 30,000 Athenian citizens in the 5th century. Atheneaus reports 21,000 in the late 4th century. This doesn’t count women, children, and slaves, so perhaps there were 100,000 people in all of Attica. Maybe 150,000. Athens proper would have been much smaller; it would be another five hundred years before technology could support a city of perhaps a million people.

A workman or civil servant in Athens might earn between 1/3 and 1 drachma a day; there were 6000 drachmae to a talent. So one talent is enough money to take care of 20 households for a year. If you say that’s, say, $45,000 per household, a talent works out to about $900K – pretty close to our million bucks. Of course, $45K today buys you air conditioning and television and HBO and fresh fruit; even rich Athenians didn’t have any of that stuff. They lived like village people in Southeast Asia; maybe we’re really talking $4,500/year and we’re an order of magnitude high. Even so, I’m really surprised it’s that close.

On the other hand, a market price requires a willing buyer. Who would have – who could have – bought 5000 talents? Centuries later, this would be a real problem with the Roman economy; Tiberius Caesar tried to live a frugal life and nearly wrecked the economy of the world because he had all the money there was.

Apr 14 7 2014

How I Live Now

I generally don’t comment about films here: I don’t know much about making them, and everyone who cares has already heard about movies before I see them.

But I hadn’t heard anything at all about How I Live Now, and you ought to take a look. (Streaming from Netflix). Its director thinks it’s too dark for the US, but it’s a terrific YA dystopia. Daisy is an American (played wonderfully by Irish actress Saoirse Ronan, even though she is never convincingly Yankee) who is sent to visit her British cousins. One of them picks her up at Heathrow and drives her far, far into the countryside. Fairport’s Tam Lin is on the radio; Daisy rolls her eyes. The cousins are irritating and charming and the oldest boy is gorgeous and sweet.

And then World War III breaks out.

by James White

A correspondent mentioned the idea of culinary science fiction, and this seemed such a surprising concept that I went looking for precedents in the superb Encyclopedia of Science Fiction.

This is a charming, if simple, book about a great cook who decides to join Sector General, the great galactic hospital, in order to do something about the food. All the usual challenges of hospital food are present, along with such inter-species challenges as table manners in a cafeteria where the physician sitting next to you might look a lot like your dinner.

We won. Phew. Great relief. Celebrated until the wee hours, slept in, cleaned up.

For getting out the vote (which turned out to be the difference in this close race), I did a lot of cooking for volunteers. I’ve done this now for a series of campaigns. I’m not a pro — I’ve never cooked this much stuff. Here are some notes about cooking for a bunch of volunteers.

  • Timing matters. Getting the food to the right place at the right time is the most important thing. It’s better to have mediocre food where the hungry people are than to have perfectly good food in an empty room when everyone’s gone back out to their turf.
  • Organizers don’t know what they need. This has been a constant for all the campaigns: the people in charge never seem to have very good plans for how they’ll organize and staff the final push. This seems strange to me: they’re running an engagement campaign dedicated to identifying and turning out your voters, and you’d think they’d spend a lot of energy planning the endgame. They don’t. But you need to know how much stuff to buy and cook, and how you’re going to get it where it needs to be. Expect last minute changes, and prepare for them.
  • Vegetarians. It’s a big tent, and people have different tastes. Our side, I think, is especially challenging because we’ve got the vegetarians and the vegans and all sorts of other dietary needs. I’ve been trying to be sure there’s a vegetarian option (though not necessarily vegan), and that’s been popular. On election day, we went through more of the vegetarian posole than the pork picadillo.
  • Allergies and Religious Diets. Keep people informed, and let the chips fall where they may. Volunteers with really tight constraints are probably in the habit of packing their own snacks. But people will want to know whether those crunchy bits are peanuts or tree nuts, or whether that’s beef, pork, or chicken.
  • Signs. Make a nice sign describing the food. This makes people comfortable, and shows consideration, and also gives you a chance to show that care was taken. One point of cooking for volunteers is just logistics – feed the volunteers so they can get back on the street faster – but another point is social. If you’re using good ingredients (organic flour, home-grown basil, your mother’s pie crust) tell them.
  • Limits. You’re cooking at home. It’s not a restaurant kitchen. You’re not a line cook. Know your limits, and think about the limits of your equipment. Banging out sixty meals in one day reduced me to a quivering jello. Lots of people do that for lunch, literally.

Equipment limits you want to consider include:

  • Your oven: can you fit everything you need? If you have to do the bread then the roast for dinner and dinner’s 40 minutes late, that’s an extra margarita. If you do that on election day, everyone goes hungry.
  • Your refrigerator: will everything fit? You’ll be cooking in larger quantities than usual; do your big bowls even fit in your refrigerator?
  • Your bowls: maybe it’s just me, but I’m always running out of bowls for election day. (Parties, it’s usually spoons.)
  • Your stand mixer. This is a hard limit and it matters. Usually, it’s no big deal to double a recipe. If you’ve got a honking big mixer like mine, you may be able to quadruple it. After than, you’re doing multiple batches. When it comes to your mixer, a little too much is a big mess.
  • Look out: things are going to be a lot less fun if you get a cut or a burn. Be especially careful with the mandolin and the vegetable peeler; they’re not interesting the way a knife is, but they can be painful. In school, they taut us a mantra back when chemists actually blew glass: “hot glass looks like cold glass.” Repeat it early and often.
  • Four hours. This is home cooking, and it’s going to be sitting in the kitchens of strangers. You’re not a pro. Cook clean and do your best. The rule of thumb is that everything that can spoil gets at most 4 hours at room temperature – including prep and sitting around on the table. You want as much of that four hours to be for the volunteers. This, incidentally, is the genius of the kolache as election food: the smoked sausage and the jam are both preserved and then they’re sterilized and protected by the bread baked around them. That’s better engineering than a plate full of sandwiches or a box of cold pizza.

Stop Crying About Choice is an oddly-named but unusually perceptive discussion of choice at the boundary of hypertext fiction and games, written by “HM” who might perhaps be Joel Goodwin.

I disagree with much of the argument – I think the author mistakes the importance of rereading and of contemplation, having little patience for or interest in lyric – but this is the way to do it: serious and thoughtful discussion based on familiarity with lots of works.

I’ve forgotten a detail of C++ semantics; perhaps a reader can give me a hand.

We have a simple function, Mill, the does a task. We create an object saved for its side effects: for example, the constructor saves the graphic state and the destructor restores it.

void MyClass::Mill() {
	GraphicState saved(albatross,ptarmigan);
	doSomething();
	}

This is straightforward and idiomatic C++.

Now, let the optimizing compiler into the mix. In principle, it could see that tail call of doSomething and say to itself, “I could avoid a procedure call by inlining doSomething inside Mill.” And so it could. What I think it cannot do, though, and what I think LLVM is doing, is to call the destructor of saved before it calls doSomething.

So: am I correct in thinking that the GraphicState destructor should not be called until after doSomething returns? And could LLVM really be doing this wrong? It’s been years – like a decade – since I even smelled a compiler bug.

We’re having a special election for the State Senate. It’s the latest in the chain. Obama appointed John Kerry, our US Senator, to the cabinet. So we had an election — and we elected Ed Markey, our Representative, to the Senate. So then we had a special election, and we elected Katherine Clark, our state senator, to the House. Today, we have another election for her seat.

Kate’s Fourth Rule of political volunteers reads:

4) FEED US. This can be as simple as offering us a cup of coffee during a cold standout or a bottle of water to bring with us on a hot canvass. Granola bars and raisins are easy to manage food. Some of us might find providing homemade snacks to be an enjoyable way to help. There are great cooks and bakers in the volunteer ranks. It saves money and adds a nice atmosphere. A little sustenance will make us more efficient, obviating the need for breaks to buy food.

I’ve been trying to help all these campaigns with social media, web sites, online strategy, email — you know, the stuff I do. But I’m a volunteer, so all they want is knocking doors and making phone calls. I’m no good at that, so I cook.

If our team wants volunteers – and the powers that be say we do – we’ve got to do a better job at attracting volunteers under the age of seventy. Decent food might make things a little more fun. Of course, real work that uses real skills would help even more. One fact of the new reality that still hasn’t quite dawned on these old political groups is that the Democratic rank and file has changed. Sure, in 1932, we had a disadvantage because the other team had all the doctors and lawyers and writers; we had pipe fitters and longshoremen, but what does a campaign need with a pipe fitter? But nowadays we have all the doctors and writers, and we treat them like pipe fitters.

I’m OK cooking for two, or maybe the occasional eight-person dinner party. Today, we needed sixty — 20 breakfast, 20 lunch, 20 afternoon sustenance — for different groups at different staging areas. So I’ve been cooking since 6PM yesterday, with six hours off (11PM-5am) for sleep.

Breakfast

  • Current Affairs (currant scones, a double batch)
  • Bagel Bombs
  • Onion bacon focaccia

The scones are Alice Waters, the Bagel Bombs are Christina Tosi, and the focaccia is Susan Goin. So a feminist breakfast, too, in its way.

Lunch

  • Picadillo
  • Posole with poblano creme
  • Potato bread rolls

Our candidate was born in South Africa, which is meaningless in the campaign but a Fun Fact. So I did an improvised take on South Africa’s bunny chow, curries served in a hollowed out bread loaf. Canonically it’s wonder bread, but this crowd isn’t going for white bread and, if you want Democratic volunteers to eat anything, you have to provide small portions. (They’ll eat lots of little things, but if it looks big they won’t touch it.)

Afternoon

  • Kolachki (smoked sausage rolls with fig jam)
  • Koeksisters

I started with the kolachkis for the Markey campaign. They’re a good campaign food: around here, they’re interesting enough for everyone but not scary enough to frighten the proverbial old ladies. I’ve done them with apricot, but fig’s a lovely combination with smoked sausage.

Koeksisters, as far as I can tell, are the South African member of the churros family, a relative of the doughnut. I have some trisol I wanted to try again, so this made sense. But some disaster befell my choux paste and it was not nearly thick enough to pipe, even after adding additional flour. So, they’re messy and incoherent koeksisters.

Bottom line

Sixty is a lot more than eight. I sure hope people enjoy this stuff. I sure hope we win.