05
25
09

Thoughts on O

Our son Oliver is almost two years old (just a couple of months to go). I’ve been thinking lately that I’d like to record some memories from around this time, so here goes.

Lately he’s been learning how to jump, which he does by bending all the way forward, in a full crouch with his chest horizontal to the ground, and then extending upwards as vigorously as he can. This earns him about an inch of air.

In the morning, though, when I get him out of his crib, he holds onto the side of it and jumps up and down like a maniac. This technique gives him a lot more height, and it’s very funny to watch. It makes getting him out of bed in the morning doubly enjoyable. It’s hard to stay irritated with a Monday morning when someone else’s reaction to the new day is this much excitement.

Eating is always an adventure. An activity that I view as one of life’s great pleasures is a mixed bag for Oliver. Certain foods are always in favour (any type of pasta is met with the exclamation “noose!”, which means “noodles”), while the mere proximity of others is offensive, even if no attempt is being made to force the issue (broccoli may not be in contact with any part of his high chair).

His refusal to eat certain healthy foods has resulted in us playing the deception card, a parental favourite, by cutting food up and mixing it in with yogurt (another sure winner). Oliver enjoyed every bite of a wretched mixture of yogurt and chopped asparagus and chicken.

Last night, while at the in-laws, Oliver and I were indoors while the rest of the family was outside, and he shut a heavy door on his finger. He immediately started screaming in pain, stamping his feet in anguish and holding out his hand for me to look at. I could see that he did not understand why it hurt so much. This confusion is tragic to me. Growing up, he will often hurt, and many times will not know why, just like the rest of us.

This morning, although his fingernail was purple, it wasn’t bothering him any more. I’d say that now he’s less likely to play with doors, but I don’t think that’s true. Instead, he’ll probably just be a little better at it. The resilience of children and their determination to get good at stuff is amazing.

As Oliver gets older, our relationship is changing. I used to take care of him as a baby, now, I’m getting to know him as a person. Few experiences in my life have felt this meaningful.

07
17
08

Fixing HAML in jEdit

(This one is purely for tech people, Ruby on Rails developers who use jEdit to be exact.)

Chances are, if you use jEdit and HAML, you’re using or you’ve tried out Jim MorrisjEdit HAML edit mode.

If you’ve done so, and you’re using an up-to-date version of jEdit (e.g. 4.3 pre14) you’ll have noticed that the way it deals with indentation is really buggy. Here’s a description of the problem I posted to the jEdit mailing list, without much luck:

This is the code I want:

%table.form
  = form_row("First name")

In the code above, as soon as I type the “a” in name (actually the point varies a bit, could be anywhere inside the double quotes), the line unindents, giving me this:

%table.form
= form_row("First na

This means that I have to go and reindent the line, so that it’s back the way I want it to be.

This also happens in cases where I am using braces { }. Here is the code I may want:

%a{:href => "/some/link"}
  = "#{@user.login}"

As soon as I type the opening brace { in that string, the line unindents:

%a{:href => "/some/link"}
= "#{

And again, I have to reindent it.

What’s even more annoying (incredibly annoying!) is that after I reindent it, as I continue to type, it will continually unindent. So I end up fighting with my editor.

You can fix this problem by hacking up a new Ruby mode for jEdit that removes all of the indentation rules. Then, change the HAML edit mode to delegate to your new hacked Ruby mode, instead of the proper one.

Step 1:

Open the jEdit catalog file, probably in the modes folder (precise location depends on your system). Find the entry for Ruby and create a new one called ruby_stripped_down that references a new file called ruby_stripped_down.xml:

<mode NAME="ruby_stripped_down" FILE="ruby_stripped_down.xml" />

You don’t need all the info about file extensions, since this mode will only get called from the HAML mode.

Step 2:

Open up the ruby.xml file from the same folder as the catalog. Save a copy of it as ruby_stripped_down.xml. Now delete all of the lines inside the <props> tags near the beginning.

Step 3:

Open up the haml.xml file from the same folder. Wherever you see:

DELEGATE="ruby::MAIN"

Change it to:

DELEGATE="ruby_stripped_down::MAIN"

This occurs in four places.

Save it. Restart jEdit. Your problem should be solved.

If you’re lazy, you can also download my edited haml, ruby_stripped_down, and catalog files. However, be warned that overwriting your versions is at your risk (especially the catalog file – the others aren’t nearly as risky).

haml.xml
ruby_stripped_down.xml
catalog

04
29
08

Food Is Not Just Another Commodity

Wrote a blog post for RTH:

Global food prices continue to rise. United Nations secretary-general Ban Ki-moon has warned that “We risk the spectre of wider-spread hunger, malnutrition and social unrest on an unprecedented scale”.

Food riots in Haiti, rice rationing in India and even the United States, panic buying in Britain: so far, Canadians have been insulated from these phenomena, but not for long. Our rendezvous with rising prices for life’s essentials is on the way.

To markets, food is just another commodity, subject to the same profiteering and speculation as tech stocks, minerals and oil futures.

The difference is that food, like air and water, is the most basic of necessities. Not being able to afford food is a death sentence.

Markets for food used to represent a means to fairly compensate farmers and a motivation for them to keep growing food. Now, global markets have set up a powerful and dangerous competition for a vital resource.

Go read the rest if you’re interested.

03
13
08

Photoshopped? No!

Some people who saw this remarkable photo of what appears to be a wolf have claimed that it is fake or altered.

I contacted the person who sent me the photograph originally and she was kind enough to provide a full-sized version of the photo, which you can see here:

Wolf, full-size

I’m no photo expert but I think this goes a long way to disproving the critics.

I know it may seem hard to believe that they did indeed have a close encounter with a wild animal that is notoriously shy, but these things do happen. The rarity of the event just makes it all the more incredible.

03
13
08

Beware the big bad black wolf

These people didn’t notice that they weren’t alone until they looked at the photo on their computer.

The photo was taken in Campbell River, British Columbia.

The people in this photograph were hiking in Seal Bay Park. At the end of their walk, they found some butter mushrooms on a mossy log, and were inspecting them. One of them decided to take a photograph, but not being terribly good at photography, the photo was taken off center.

When they returned home and downloaded the pictures off of the camera they got quite a surprise – a large animal that appears to be a wolf heading straight towards them.

They theorize that the flash from the camera scared it off, although I don’t know if it would be a danger or not. Certainly, it’s not the kind of animal you would normally want to be too close to!

EDIT: If you think this photo is fake, check out the full sized version.

EDIT 2: Here’s the story behind the photo as told by the woman in the foreground whose back is to the camera:

This wolf picture incident has just been crazy! It’s spreading around like wildfire! For sure you can use the pic if you’d like. The story behind it is pretty ridiculous. I was visiting my brother, niece and my niece’s mother with my mom in Courtenay, BC. Me, my mom, XXXX and XXXX went for a hike at Seal Bay Park. This picture was taken at the end of the walk…me, XXXX and XXXX were inspecting some really cool butter mushrooms on a mossy log. My mom decided to take a picture, but she’s not very good at it, so it came out totally off center (imagine if she was actually good at taking pictures- we never would have even seen it!!!). We didn’t notice anything at the time, and the “wolf” wasn’t even noticed until after getting home, and my mom had put the pictures on the computer. She didn’t even notice at first, but my other brother was like “what the hell is that??!!”. So, yeah. I don’t even know if it is a wolf, but there were no dogs or anything! around. It’s just a pretty creepy picture- that’s all I know! And it was actually my mom who took the picture (I’m in it- in the gray jacket), so credit for the photo isn’t necessary. Well, that’s my story!



Life, politics, code and current events from a Canadian perspective.

Adrian Duyzer
Email me

twitter.com/adriandz

Proud contributor to
Director, Web Division at

Feeds

Meta