Tag Archives: code

Week 3038

Tap Tap…

So, I’ve been a busy boy. Biking has started up again and I got a few days in this week.


Max has been learning to read pretty well and is sounding out words he sees all over the place. I like that he’s teaching himself to some extent. At school he’s only in the B reading group, but at home he can get through E and F books. It’s really exciting because reading is such a big part of my life that I really want to be able to share this with him.

As a result of showing Max some bees and bombs gifs he was into asking for that every night for months. I almost ran out of internet art! Slowly I got him into just listening to me as I read The Watch aloud.

Wednesdays Sam and I go to special therapy with Beryl Nightingale to learn how to deal with Swale’s twice exceptional behavior. I think we’re making progress because this is the first week back from his spring break and when I picked him up from school his teacher said he participated in everything and has really improved from the beginning of the year.

Zelda has turned into a little chatterbox. She just started naming circles and triangles, she’s got opinions about everything and she’s super funny and super cute. She’s doing a lot of pretending to be dogs or lions and is always ready to go on a walk.


At work I’ve managed to spend some time doing interesting code work. I probably shouldn’t but it was too juicy to not grab. We’re changing the namespace of our client libraries to better brand them. That’s good! But it means that anyone who’s currently using our client libraries would have the code completely break for them. That’s bad!

So I’ve written a little utility that wraps the client library python wheel and outputs a set of legacy wrapper scripts that bridges everything and does it dynamically!

I call it snowchains (a wheel wrapper, getit?) and it was also a good chance to get to know sphinx, tox, RestructuredText, Abstract Syntax Trees and python reflection internals – a real geekfest of learning. Hope to get it open sourced if possible.

Speaking of a real geekfest of learning, I snapped up the python humblebundle super quick.

Kyle at work helped me figure out an issue with jumpstart having problems installing z. It seems that if you run a script in non-interactive mode it isn’t sourcing all the resource files so it doesn’t see certain paths so it can’t tell that my tool is already installed.

Grunting and Sweating

On Thursday I registered for the City Challenge New York Obstacle Race. Some folks from work are joining me and I’m hoping you might as well. The last one was fun other than it raining. I put in some work and Vimal, the proprietor of Cafe Hudson came out to be my personal photographer. He got some verrrry sweet photos.

Not bad for an old guy

Cinco de Mala

If you can make it to Szechuan Mountain House 6pm on Sunday we’re going to go eat some crazy fizzy spicy Szechuan food. This place specializes in delicious numbing Mala food – I stumbled on it while exploring on my free night out a week or 2 ago and was really impressed. I’ve never eaten anything quite like it. Also I will turn as old as an actual mountain.

How to show WordPress page hierarchies

Got a request for help from some the Eyebeam list. 1 The folks organizing the Urban Wilderness Action Center for the international Electrosmog festival 2 wanted some usability help.  Navigating between subpages of their projects was too confusing.

If you like the way the sub pages are listed out on, say, the Berlin Micro-Turf Expedition – here you go.

// Does this even have a parent?
if($post->post_parent) {
$parent_title = get_the_title($post->post_parent);
<a href="<?php echo get_permalink($post->post_parent) ?>"><?php echo $parent_title;?></a>:
<?php } ?>
//ok let's find our sibling pages, but we don't need to list the current page
if ( ($post->post_parent) && (get_post($post->post_parent)->post_parent) )
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&exclude=".$post->ID."&echo=0");
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
<ul style="display:inline">
<?php echo $children; ?>
<?php } ?>
  1. The Eyebeam folks are doing a cool skillshare on how “Tools and Models for Online Collaboration”  (back)
  2. It starts March 20th!  It’s completely free!  Go!   (back)

The beauty of Ruby’s array subtraction operator

Today I had to a set of email addresses, one per line, from which I had to remove the addresses of folks that said “Don’t email me.” Those emails were in a separate file, one address per line.

I figured I’d have to do this again, so I wrote a ruby script to automate it. Below, stripper.rb

#put each address in an array, remove whitespace and make it all lowercase
 potential_emails = IO.readlines("potentials.txt").map! {|email| email.strip.downcase}
 delete_emails = IO.readlines("donotemail.txt").map! {|email| email.strip.downcase}

#use the beauty of ruby's array subtraction operator
 puts potential_emails - delete_emails

Simple, terse and readable.  Lovely!