Dear Santa

Dear Santa,

Everyone else is doing it, so here’s my list, too.

  • A Blu-Ray of a fireplace, perhaps with a secondary audio track of christmas music.
  • Dollhouse Season 2 on Blu-Ray.
  • Books are always nice. I’m in the mood for one of Ian Banks' Culture series, but I’m not sure which ones I haven’t read.
  • Whichever Usagi Yojimbo collections I’m missing.
  • Another two (or three!) sets of BuckyBalls. (I would get Zen Magnets, but I’ve already got BuckyBalls, and I don’t think I want to mix them.
  • a digital photo frame, for the office.
  • A tiny usb monitor. (There are also touch-screen versions for more money, but I’m a little leery about them.)
  • Perhaps an Arduino to play around with.

Well, that’s all I can think of off the top of my head.

Thanks, Blake.

Making sure I don’t forget things.

I’ve created a couple of checklists, and would like to hear any feedback on them. They are a Review Checklist, and a Commit Checklist.

They came about after I had been working mostly on experimental add-ons for a while, and then attempted to push a couple of reviewed fixes. Since I was out of practice, I managed to get something minor wrong on both of the pushes. (The first one failed to attribute the patch to the proper author; The second one failed to mention the bug number in the commit message.) Since I’m a bit of a perfectionist, this really annoyed me, and so I vowed to write up the steps that I go through when I need to commit and push a patch, so that I could refer to them later, since if checklists can save lives, then I figure they can probably also help me do my job better. But before I go to that, I needed to review a patch, so I wrote up some of the things I look for when I review a patch too.

DOM appendChild error in Gecko 2.0

I was recently modifying an add-on for the upcoming Thunderbird 3.3, and part of what I wanted to do was to run some javascript in a chrome context that added some DOM nodes to a document in a content context. But when I ran the following code:

1
2
3
4
5
6
7
8
9
let browser = document.getElementById('tabmail').getBrowserForSelectedTab();
let doc = browser.contentDocument;
dump("\n\n\n\nXXXXXXXXXX\n");
dump("DOM Content loaded for " + doc.location + "\n");
var topBar = document.createElement("div");
topBar.innerHTML = "We got it!!!!!";
dump("iB = "+doc.body.insertBefore+"\n");
dump("fC = "+doc.body.firstChild+"\n");
doc.body.insertBefore(topBar, doc.body.firstChild);

I got the following error:

WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80530009: file /Volumes/Devel/thunderbird/src-central/mozilla/content/base/src/nsNodeUtils.h, line 304
WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80530009: file /Volumes/Devel/thunderbird/src-central/mozilla/content/base/src/nsGenericElement.cpp, line 4077
-- Exception object --
[snip]
+ message (string) 'Operation is not supported'
+ result (number) 2152923145
+ name (string) 'NS_ERROR_DOM_NOT_SUPPORTED_ERR'

Poking around a little, it seemed like I had reasonable things for the insertBefore method, the firstChild attribute, and the topBar variable, and so since it was late, and I couldn't see what I had done wrong, I went to bed.

That turned out to be a the best thing for me to do, because this morning Jonathan Protzenko came to the rescue, saying (in response to a similar problem with a Firefox 4.0 beta 7 extension):

If you're modifying some content DOM from chrome code, you need to make sure the child you're appending was created using the unprivileged document, not the global document.

// This is chrome code, this is wrong because the span is now chrome
// and you're trying to insert it into content
myContentNode.appendChild(document.createElement("span"))

// This is right, appending a content node to another content node
myContentNode.appendChild(myContentNode.ownerDocument.createElement("span"))

I've hit this issue at least three times when upgrading stuff for Gecko 2.0. Might be what you're looking for .

And sure enough, when I changed var topBar = document.createElement("div"); to var topBar = doc.createElement("div"); , it all started working beautifully.

Thank you, Jonathan!

Santa

Dear Santa,

In case you're real, this is my Christmas list.

  • I would like a name necklace—a coloured one.
  • I would like a cat buddy. (That's a stuffie.)
  • I would like some chapter books.
  • I would like some long-sleeve shirts,
  • a butterfly net,
  • and binoculars.
  • I would like a little Pokémon stuffy,
  • and a toy Pokéball.
  • A craft set.

Sincerely,
Delphine

[Typed by Amy.]

Dear Santa

Dear Santa,

I know I don't actually believe in you, and no-one buys me Christmas gifts except my mother who doesn't have Internet access, and my husband who refuses to buy me anything I ask for on account of "it wouldn't be a surprise". But I'm putting this up here anyway. Just in case.

  • I've always wanted a name necklace, and I especially like this red acrylic one.
  • Electric pencil sharpener. I know it's not eco. I just want one.
  • Squirrel-proof bird feeder
  • Jo Malone perfume. You choose the fragrance. (Scented lotion would be fine too.)
  • Votive candles. Now that the children are old enough to not do anything stupid, I've rediscovered candles. I like the expensive ones with good quality fragrances.
  • 24-pack ultra-fine tip Sharpies. All those lovely colours.
  • Quality Street chocolate. Always welcome.
  • I'd love a clicky IBM-style keyboard. ThinkGeek has one, although I'd be just as happy with one with labelled keys.

Thanks in advance, Santa. Remember, I'm the house with the cookies and brandy.

Respectfully yours,
Amy

Meals My Family Loves, Volume II: Bangers and Mash

Yesterday's meal was Cordelia's "favourite meal ever! Can you make this every day!?"

  • sausages - we had lean turkey sausages, which the children declared they didn't love. "They're not very juicy."
  • mashed potatoes mashed with plain yogurt
  • frozen peas and corn (I was running out of time!)

Simple and popular.

A Weekend Away

Ten years ago (well, ten years and ten days) Blake and I got married. Since we're still married we decided to celebrate by taking a grown-up holiday, a weekend away. Last Friday night we left the girls with Baba and Zaida and checked into the Novotel downtown. Our room was on the third floor, room 314, and it was a little disappointing, to be honest. A paltry selection of free toiletries, a teeny bathtub, and the best view of a gravel roof and building mechanics I, for one, have ever seen.

And also engineers. Undergrad engineers. The Novotel happened to be hosting the Organization of Professional Engineers Student Conference (or something) that very weekend. And most of them seemed to be on the third floor. We settled into our room just as the engineers were massing to go to dinner. Noisily. I called the front desk to ask whether there was perhaps a room on a different floor, a floor with fewer engineers.

They moved us up to the top floor, and in so doing, upgraded us to a deluxe room which satisfied many more of my hotel room desires: flat screen TV, schmancy bathroom, superfluous toiletries. The bathtub was still lame; I've realized that if you want a hotel with an awesome bathtub you need to go to a hotel which advertises their awesome bathtubs. And the view... well, it turns out the Novotel in Toronto doesn't have any good views. After settling in again, we went out for dinner and beer at C'Est What.

The next morning we availed ourselves of the breakfast buffet, another of my hotel must-haves. This one was exquisite: fresh, flaky pastries, assorted cereal, French toast, bacon, sausages (such good sausages!), ham, cheese, at least five kinds of bread, yogurt, fruit, coffee, tea, hot chocolate, chocolate milk, fruits. I was in breakfast heaven.

After eating about three breakfasts worth of breakfast, we waddled over to the St Lawrence Market to shop, window shop and sample things. I got some earrings, some strange grains, and gifts: genmaicha for Tanya and Douglas, and mince tarts for Andy.

Our next mission was to find a Shopper's Drug Mart, which you usually can't walk a block without stumbling over but were uncharacteristically thin on the ground over by the market there. So we carried on to the south end of Sherbourne and Toronto's newest waterfront delight, Sugar Beach. It was a gloomy day and we had the waterfront to ourselves as we walked back towards Yonge Street. We eventually wandered back to the hotel for an afternoon of lying around reading newspapers and books. Later we walked up to Dundas and over to Spadina for delicious Chinese food at E-Pan. (As it turns out the girls were having dinner just a block south of us.) We walked back to the St Lawrence Market area for uninspiring ice cream at Lettieri, then back to the hotel.

Sunday morning I woke up early and went down to the restaurant for a cappuccino while Blake slept in. Once he came downstairs we crossed the street to sit in the sun and wait for Scotland Yard to open for breakfast. An hour later we breakfasted in the company of some very vociferous football (soccer) fans. Then back to the hotel to check out, and we took the TTC home.

It was a lovely weekend but kind of ephemeral. I wish we had done something spectacular like go to a concert, but after paying for the hotel we didn't have the budget for any grand gestures. Still, it was lovely to spend time together without any pressing demands on our time.

An Uncertain Thing

I made a book! Okay, I didn't write it, and I didn't really edit it, but I sure turned it from a giant RTF into three beautifully formatted, stylishly covered volumes:

Support independent publishing: Buy this book on Lulu.

Abundance Is Our Nemesis

Here in North America we have a lot of stuff. Mainly we have a lot of energy (not the "let's play go to the park and play Ultimate!" kind, but the "turn up the heat, Martha, I don't want to put on a shirt" kind), and we have a lot of food. And when people have access to a lot of something which is required for survival, like food, or which makes life easier, like energy, we consume as much of it as possible. It's our nature. We evolved in an environment where calories were scarce and precious and anyone who didn't leap on food (more calories in), or seize the opportunity to do less work (fewer calories out) was a fool. A dead, extinct fool.

There's an article in the 11 November 2010 New Scientist which says that 40% of the US population will be obese by 2050. Oh, that's terrible, those disgusting Americans. But Americans are just like everyone else, except they are constantly surrounded by huge quantities of cheap, high-calorie food. And so they eat it and they get fat, just as we all evolved to do.

At the same time energy is cheap and abundant; there are labour-saving devices for almost every task imaginable, from changing the channel on your TV to raising your blinds to feeding the cat, to say nothing of that ultimate calorie-intake-optimizing innovation: processed food. And we avail ourselves of every one — there are precious few people who will say no to a labour-saving device on principle, and most of them are so cheaply run we add them to our lives without qualms. No-one ever rejected an automatic can opener on the grounds that it would cost too much to run.

The only way to control this process is legislation — by making overconsumption so much more expensive than austerity that austerity begins to look good. We need enforced privation.

Show me a politician who will run on that platform and I will show you a politician with a very short career indeed.

So to conclude, we're screwed. The only way off this rollercoaster of plenty is to run out. Run out of oil, run out of soil. And then lots of people will die (hopefully none of my descendants) and maybe enough of us will survive (and the planet will be habitable, because of course there's enough fossil fuel left to ruin the place completely if we burn it fast enough) to start the whole merry-go-round again.

Happy Friday!

Famous Butternut Squash Soup

Here's a recipe I typed in for a friend yesterday. It's not really a recipe, just something I throw together. Those are always the hardest to write down.

Ingredients

1 butternut squash (or any other squash, probably, except spaghetti)
some butter
some oil, probably not olive
1 onion (or more) - chopped
cumin, cinnamon, nutmeg maybe?
black pepper
chicken broth
cream
sour cream
crusty bread and more butter

Instructions
  1. Peel the squash. Yes, really, just with a regular vegetable peeler. Then cut it in half and scoop out the seeds. Cut it into 1 inch blocks (about) and set aside. Chop the onions.

  2. Warm the butter and oil over medium heat and add the onions and some salt. Saute until the onions are soft and translucent. You could brown them a little bit if you like.

  3. Stir some cumin and black pepper and maybe cinnamon or nutmeg (not both) into the onion and cook it a little bit until the kitchen smells really good.

  4. Add the cut-up squash and enough chicken broth to cover everything plus maybe an inch. Bring it to a boil and simmer for twenty minutes or so until the squash is soft.

  5. Take it off the heat and blend everything with your hand blender. If it's too thick add some more broth. Add a splash of cream — maybe half a cup — and stir it in. Put it back on the heat for a while to warm it up again if you like, but don't let it boil.

  6. Serve with a dollop of sour cream and lots of crusty bread with butter. And maybe a nice light ale.

Enjoy!