Week ending 2018-03-23

The big thing this week was the initial consultation with the dentistry department of Sick Kids. They plan to put A- under general anesthesia and fix her top four incisors. They said it looks like totally normal early childhood caries now, so no worries about enamel hypoplasia, and they strongly recommended night weaning as a way of reducing the risk of repeat dental surgery. Since we haven’t been able to be 100% solid on cleaning her teeth before bedtime, night weaning probably makes lots of sense.

Now that we’ve got A-‘s medical things scheduled for May, I decided we could squeeze in a quick trip to the Philippines so that she could spend time with Lola and see her cousins and Tita Kathy before they move to the Netherlands. If A-‘s teeth turn into an emergency situation, I hope travel insurance will help us sort everything out.

We took the ferry to Ward’s Island with Jen and E-. It was lots of fun even though everything was closed. The kids played with the pirate ship playground and had fun tossing leaves. A- favored Aunt Jen quite heavily, even telling me to stop. She also practised climbing up the ladder because she saw E- do it. It was great to see her becoming more independent.

A- was up early one day, so we made it out to Riverdale Farm in time for a farmer Q&A session. I learned a little bit about the sheep and the other animals at the farm. We got to touch the sheep’s nose and wool, which A- liked a lot. We combined that with a trip to Children’s Book Bank and the Regent Park playground, where A- had fun climbing up, sliding down, and digging in the sandbox.

A- was very interested in squeezing glue onto paper and sticking on pompoms, googly eyes, and ripped pieces of paper. She also liked playing with dough while I made breadsticks. Those and spinach pancakes were big hits. For gross motor development, she walked her balance bike up and down the sidewalk.

Lots of fun with language this week. She can use the word “sapatos” to mean shoes, and she can say the first two lines of Cattus Petasatus.

W- told me how she was jumping on the bed and he saved her from falling off head-first. He said she looked a little shocked, and then she said, “Nurse more, nurse more, no more monkeys.”

For my part, I’ve been trying to wean her with the help of timers on my phone. That prompted this hilarious attempt at social engineering: “Phone said it’s okay to nurse, beep beep.”

She really liked the Five Little Ducks song. I changed the lyrics to refer to Papa Duck instead of Mama Duck, and she insisted on changing the song so one little duck always comes back. She was interested in playing the recorder, and she actually listened when I asked her to play it quietly because people were sleeping.

Lots of pretending to be a cat qnd pretending I was Mama cat. She also enjoyed pretending to be Ate G* and pretending I was Tita Kathy.

On our side, W- fixed a leak in the dishwasher drain pipe, and I generated and printed labels for many of the toy bins.

Next up: travel!

Helping A- level up

A- is becoming more opinionated, which is a good thing. I can be more opinionated, too. We can start talking about reasons, and we can work on weathering big emotions. I’ve been erring on the side of permissiveness and allowing self-determination, but maybe I can trust in her resilience and adaptability. Here are some areas I might work on being more firm about:

Weaning: A- asks to nurse for comfort and to help her go back to sleep. Sometimes she stays latched for a long time. The dental surgeon strongly recommended weaning her to reduce the risk of further cavities and repeat dental surgery. I know there are mixed results regarding night nursing and early childhood caries. Still, it’s probably as good a time as any to make the transition.

I’ve been slowly getting A- used to waiting or finding other ways to comfort herself during the day. Sometimes she gets upset for five to ten minutes, but that’s bearable. It’s a bit more challenging at night. I won’t push it too much at night because we have a long trip coming up. When we get back, it might be good to try something like Dr. Gordon’s method.

What could being too soft look like? If I give in to her, she’ll probably stick with nursing on demand for a year or more. We’d probably need to go for another round of dental surgery with its associated risks, costs, and finger-wagging. It’s easier for me in the short term to night nurse instead of wean, but I might be missing out on long-term sleep improvements.

What could being too hard look like? If I push her too fast, she’ll cry a lot and we won’t get much sleep. Lots of people have survived cry-it-out methods, but I’m still hoping to do something a bit gentler. I feel better about her crying if I’m there offering a hug or a backrub. She’s usually so upset that she doesn’t want me to touch her, which I respect, so I just hang out and listen until she settles down. The first time we tried it, she cried for an hour before falling asleep. She seems much better at recovering now.

  • Eating: A- likes playing while we have dinner, and sometimes wants to pull me away. I like sitting down for dinner with W-. I’m getting better at insisting that I will come play with her after I finish my dinner. We keep her dinner on the table until we’re done, since she often wants to sit down for dinner when she realizes we’re enjoying ours.

She tends to eat food every 1.5-2 hours. It might be good to stretch it out a little further.

We plan to move a little away from snacking on the go when we’re out and about. It’s better to sit down and have proper snacks, anyway.

  • Sleep: I can be more firm about waking her up from her afternoon nap so that we don’t end up staying up too late in the evening. I’m also thinking of being more firm about my own bedtime, although she’s welcome to stay up and play a little if she wants.

I think the general plan is to trust in A-‘s resilience and adaptability, and to not be afraid of the hard stuff. We’ll figure this out together. She wants to learn how to be a big kid, and I want to help her. I don’t want things to feel like a power struggle if I can help it. I want it to be more like “Okay, you’re ready for bigger challenges. Let’s try this together.”

As for brushing teeth, we’ll try working on playfulness first. Lots of parents take a firmer approach, but the dentist doesn’t recommend restraining A- for toothbrushing, so we’ll just have to work on making it more fun.

Travel kaizen

What has changed between our trip last January and this next trip? How can I adapt and make things even better?

  • I’m traveling with A- while W- stays home. This means he can drop us off at the airport. We’ve traveled the same route without him before, so I’m less worried about handling long flights on my own.
  • A- will be too big for a bassinet. Instead, we’re going to try the baby seat provided by Korean Air. According to SeatMaestro, the baby seat is good for 9.1-31.7 kg (20-70 lbs) and a height less than 124.5 cm (49 in), so A- should be okay in it. She’s been focusing on the bassinet in her pretend play, so I hope she doesn’t get too disappointed.
  • I requested grown-up meals for A- instead of child meals. I used to throw out half of the child meals anyway because they were too sugary. We might as well go with the regular meals so that we can try different entrees.
  • A- may want to be carried in my arms instead of the carrier. If I can get away without bringing a rolling carry-on, going with just a backpack might be more convenient.
  • A- often likes walking. If I don’t have to worry about scrambling for overhead bin space, it might make sense to let her run around first instead of boarding the plane early.
  • A- is more talkative. Her pretend play is more elaborate. She can even sometimes be reasoned with. On the flipside, she’s also more particular about what she wants.
  • My dad is no longer alive. No fun stories from him. New family dynamics will take a while to adjust. On the other hand, A- won’t feel nervous about the IV stand or my dad’s coughing. We’ll deal.
  • My sister and her kids will be moving from the Philippines to the Netherlands in the middle of our trip, and my mom will be figuring out her new normal. So things will probably be busy and chaotic, and my mom will probably be sad. I’ll continue to focus on A-, of course.
  • I won’t bring a laptop. I sorted out how to write my journal and Emacs News on my phone, so I think I can probably get away without my personal laptop this time. I was able to turn over my consulting stuff to my client, too, so no work laptop either. This should make getting through airport security a bit easier, although I might still need to take the iPad out.
  • I won’t pack a lot of snacks. There’s plenty of food on the plane and at the airport, and it’s good to spend money to explore new tastes. Still, I might bring some fruit or cheese next time.
  • I’m using more travel organizers. W- has convinced me of the power of organizers. I also bought packing cubes to help me keep my backpack and my suitcase sorted. Having zippered units will probably help me a lot while packing, since otherwise A- tends to unpack my stuff at the same time.
  • I have a phone with a good camera, and a long battery life, and a stylus. This probably means way more pictures and videos, some writing, and maybe even some drawing. It’s bigger, though, so I need to think about stashing the phone securely.
  • I have an iPad with a stylus. I can’t reliably use it for notetaking yet because A- gets distracted by it, but maybe I can figure out a good workflow for drawing and learn more by doodling. W- lent me his Bluetooth keyboard, too.
  • I’m going to keep the ditty bag and toothbrush from the airplane amenities kit. The bag is handy for organizing things, and A- recognizes the toothbrush as “airplane toothbrush.”
  • I’ll buy an electric toothbrush head in the Philippines. I noticed there’s an electric toothbrush body in the bathroom, so I’ll just get my own toothbrush head while I’m there instead of bringing the one from home.
  • I’ll bring our backup nail scissors. I’ll probably leave them in the Philippines, too.
  • I’ll try to leave my Philippine things neatly packed in a bin at my mom’s house. That way, I don’t need to take up drawer and closet space in between trips.
  • We’re landing in Toronto on a Saturday. It was really helpful to have W- around when I recovered from the long trip. Well worth paying extra.
  • We’re paying for our own hotels in Korea both ways. We’re not eligible for the stopover paid by carrier program (STPC) even on the return leg. We used to get it on our previous itineraries, but maybe we can’t this time because we’re flying out on Friday and there’s another flight that leaves later. Maybe they’ve changed their rules. Anyway, since we’ll still have a bit of energy after the 4-hour flight from Manila, I’m going to go check out a different hotel on the way back.
  • I’ll postpone moving off nursing or diapers. I’ll continue talking to A- about it, but I won’t nudge her too much.
  • I’ll organize my everyday carry. A-‘s new bag doesn’t have as many pockets, so I’ll need to stay better organized. I’ll probably need to use a wallet. I wonder if it’s time to try the vest again. I wish I’d gotten it in beige instead of black – no need to be any warmer in the sun. Anyway, I can see if it works for going through the airport and lounging around at home. If I like it, I might consider getting a lightweight khaki one for my next trip.
  • New Crocs. Same as the old Crocs, but not worn down.
  • I can wear scrubs again. No nurses in the house, so I can go back to wearing scrub pants without feeling weird. Pants with pockets for the win.
  • I’m not bringing a backup sling, just my main carrier. If my main carrier needs washing, I’ll just carry A-.
  • I’m packing Giraffe in check-in instead of carry-on. I think A- is comfortable enough to get away with one stuffed toy instead of two during the flights.
  • We’re traveling more frequently. It’s been just two months since our last trip. But I decided to take A- more frequently this year while my mom gets used to life without my dad. Going now means we’ll have a few days with A-‘s cousins too. If we didn’t go now, we would probably wait until June, since A- has a couple of big medical things scheduled for May. Time to take the first circus, as my family would say…

2018-03-26 Emacs news

Links from reddit.com/r/emacs, /r/orgmode, /r/spacemacs, Hacker News, planet.emacsen.org, YouTube, the changes to the Emacs NEWS file, and emacs-devel.

Labeling toy storage bins with photos and text using ImageMagick and org-babel

I wanted to make labels for A-‘s new toy storage: three low Trofast drawer frames all along the wall.

I liked how early childhood drop-in centres labeled their shelves with both pictures and text. That way, kids can find things before she can read, while still being exposed to print. I took pictures of the bin contents and renamed the files to the labels I wanted to put on them, such as 2x2 blocks.jpg. (We have a lot of Duplo.)

This time, I experimented with creating the labels entirely in Imagemagick instead of using LaTeX. First, I used a table in Org Mode to let me easily play with the dimensions and recalculate pixel sizes.

DPI   300
Columns 3  
Rows 5  
Paper width 14 4200
Paper height 8.5 2550
Minimum margins 0.5 150
Label width 4.3333333 1300
Label length 1.5 450

I passed the width and the height to the following code block by using header arguments. I liked using 400 pixels as the height instead of 450, so that’s what I used. My source image size was 4032×3024 pixels. If I resize them to a height of 400, that gives me a width of 533. Allowing 20 pixels for the text left and right borders gives me (- 1300 533 20 20) = 727 as the text width.

#+begin_src sh :dir ~/code/labels :var width=1300 :var textwidth=727 :var height=400 :var pointsize=72 :results silent
for x in source/*; do
  file=$(basename "$x")
  /usr/local/bin/convert \( \( "source/$file" -resize x${height} \) \
     \( -background white -fill black -font Alegreya-Regular -bordercolor White \
         -gravity West -border 20 -pointsize $pointsize -size ${textwidth}x caption:"${file%.*}" \) \
     +append \) \
     -extent ${width}x${height} \
     \( -fill none -stroke gray -draw "rectangle 0 0 $(echo $width - 1 | bc) $(echo $height - 1 | bc)" \) \
     "out/$file.png"
done
#+end_src

Sample resized label:

I moved the ones I wanted from the out directory to a ready directory and combined the ones I wanted to print into a PDF:

#+begin_src sh :dir ~/code/labels :results silent
montage ready/*.png -tile 3x5 -background none -geometry +0+0 print.png
convert print*.png -density 300 -quality 100 print.pdf
#+end_src

Then I printed the labels in colour on an 8.5×14″ sheet of paper (single-sided, landscape), cut them out, and taped them onto the bins with packing tape.

W- suggested taking macro shots that more clearly show the characteristics of things in the bins instead of just aiming down and taking pictures of the contents. Might be a good excuse to show A- basic product photography when we get back.

W- also recommended making the label text bigger. The first time I did it, I just picked a pointsize based on whatever fit the ones I wanted to print. I decided against letting Imagemagick maximize the font size because I didn’t want labels to have very different text sizes. After a little poking around, I figured out how to use caption: instead of label: to give me text that can neatly wrap within a given space, and that will probably let me use 90-point font instead of 72-point font. That will make the next iteration of labels even easier to read.

It’s nice having all these bins. A- is getting pretty good at heading straight for the bin she wants something from, and she even talks about them: “Horse is in animals bin.” I’m glad we labeled the most frequently used bins. I’ll tweak the labels when we get back from our trip. We’ll probably change some of the bin contents anyway.

Hooray for ImageMagick, and hooray for variables in org-babel blocks!

Oops report: Moving from i386 to amd64 on my server

I was trying to install Docker on my Linode virtual private server so that I could experiment with containers. I had a problem with the error “no supported platform found in manifest list.” Eventually, I realized that dpkg --print-architecture showed that my Ubuntu package architecture was i386 even though my server was 64-bit. That was probably due to upgrading in-place through the years, starting with a 32-bit version of Ubuntu 10.

I tried dpkg --add-architecture amd64, which let me install the docker-ce package from the Docker repository. Unfortunately, I didn’t review it carefully enough (the perils of SSHing from my cellphone), and installing that removed a bunch of other i386 packages like sudo, ssh, and screen. Ooops!

Even though we’ve been working on weaning lately, I decided that letting A- nurse a long time in her sleep might give me a little time to try to fix things. I used Linode’s web-based console to try to log in. I forgot the root password, so I used their tool for resetting the root password. After I got that sorted out, though, I found that I couldn’t resolve network resources. I’d broken the system badly enough that I needed to use another rescue tool to mount my drives, chroot to them, and install stuff from there. I was still getting stuck. I needed more focused time.

Fortunately, I’d broken my server during the weekend, so W- was around to take care of A- while I tried to figure things out. I had enough free space to create another root partition and install Ubuntu 16, which was a straightforward process with Linode’s Deploy Image tool.

I spent a few hours trying to figure out if I could set everything up in Docker containers from the start. I got the databases working, but I kept getting stymied by annoying WordPress redirection issues even after setting home and siteurl in the database and defining them in my config file. I tried adding Nginx reverse proxying to the mix, and it got even more tangled.

Eventually, I gave up and went back to running the services directly on my server. Because I did the new install in a separate volume, it was easy to mount the old volume and copy or symlink my configuration files.

Just in case I need to do this again, here are the packages that apt says I installed:

  • General:
    • screen
    • apt-transport-https
    • ca-certificates
    • curl
    • dirmngr
    • gnupg
    • software-properties-common
    • borgbackup
  • For the blog:
    • mysql-server
    • php-fpm
    • php-mysql
    • php-xml
  • For Quantified Awesome:
    • ruby-bundler
    • ruby-dev
  • For experimenting:
    • docker-compose
  • For compiling Emacs:
    • make
    • gcc
    • g++
    • zlib1g-dev
    • libmysqlclient-dev
    • autoconf
    • texinfo
    • gnutls-dev
    • ncurses-dev
  • From external repositories:

I got the list by running:

zgrep 'Commandline: apt' /var/log/apt/history.log /var/log/apt/history.log.*.gz

I saved my selections with dpkg --get-selections so that I can load them with dpkg --set-selections << ...; apt-get dselect-upgrade if I need to do this again.

Symbolic links to old volume:

  • /var/www
  • /usr/local
  • /home/sacha
  • /var/lib/mysql (after installing)

Copied after installing – I’ll probably want to tidy this up:

  • /etc/nginx/sites-available
  • /etc/nginx/sites-enabled

Lessons learned:

  • Actually check the list of packages to remove.
  • Consider fresh installs for major upgrades.

When things settle down, I should probably look into organizing one of the volumes as a proper data volume so that I can cleanly reinstall the root partition whenever I want to.

I also want to explore Docker again – maybe once I’ve wrapped my mind around how Docker, Nginx, WordPress, Passenger, virtual hosts, and subdirectories all fit together. Still, I’m glad I got my site up and running again!