## Dealing with thought fragmentation, reducing mental waste

I’ve been figuring out how to deal with the mental fragmentation that can come with being the primary caregiver of a nursing toddler.

It was useful for me to let go of wanting to focus. If I think of childcare as a distraction from what I really want to do, I miss out on what I can get from childcare too. Instead, I’ve been looking for ways to make the most of this stop-and-go life.

Kaizen emphasizes reducing waste. What does mental waste look like when it comes to thinking with a toddler around?

I waste energy if I let my mind fill up with mental clutter. So:

• Appointments go on my calendar so that I don’t have to worry about forgetting them, and a weekly review helps me remember to check the week ahead.
• Near-term tasks go into my todo list. Tasks Free lets me quickly reprioritize tasks so that I know what to do the moment A- lets me unlatch and slip away.
• Blog post ideas go into Markor so that I can write them in Markdown and export them to HTML for my blog.
• Long-term ideas and notes go into Org Mode. It’s been super helpful to have step-by-step instructions and checklists for things I do infrequently.

Waste happens if I prioritize ineffectively. So:

• Once A- is asleep, I quickly take care of personal and household tasks, and then work on my laptop. I can do phone tasks while I’m nursing her in bed, but laptop time is very rare. If I focus on improving my systems and making more things doable from my phone, the benefits compound.
• Small tasks with small benefits tend to beat large tasks with large benefits, because of interruptions. I try to find ways to break large tasks down into small ones with incremental benefits. Many things can wait until next year.

Waste also happens if I repeat myself. So:

• When I manage to have computer time, I slow down and write notes in an Org Mode file instead of trying to speed ahead and do everything before A- wakes up. This helps me resume my train of thought after the inevitable interruption. It also helps me put together blog posts, which means I can find things in my archive, help people, and maybe even learn from people’s comments.
• If I’m thinking about a question or idea, I jot down keywords. That makes it easier to remember those thoughts and build on them. I scribble these on paper if I’m around A-, so that she can see me writing and so that she doesn’t get distracted by my phone. If a thought looks promising, I stick it in my pocket in case I want to refer to it during phone time.

Waste happens if I do low-value activities instead of high-value ones. It’s easy to get sucked into reading lots of social media or books on my phone, so I work on getting more value out of phone time. I can:

• write
• ssh to my web server or backup server, and code or run scripts – hard with a virtual keyboard and no swiping to type, but doable
• organize pictures and other files
• prepare an Emacs News summary
• read e-books from the library, mainly looking for interesting parenting ideas to try or things to learn about early childhood education

Waste happens when I don’t notice, so it’s good to get enough sleep and to pay attention.

Waste happens when I forget, so it’s good to write, reflect, and organize my notes.

Waste happens when we stay too comfortable and when we push too hard. It’s good to work on finding the sweet spot – the zone of proximal development for A-.

I can reduce waste further by getting more value from my time. For example, being interested in making books for A- lets me get more out of reading books with A-. Writing about stuff lets me remember, and I might even be able to help or learn from other people.

This phase is temporary. Next year, A- will probably be more interested in playing with her peers, and she might be independent enough to participate in activities without me. The year after that, she’ll be old enough for school. I want to make the most of this time instead of rushing ahead. I guess that’s part of why I haven’t prioritized night weaning or finding a babysitter. There’s still plenty of potential to explore even with the setup, and it’s fun working with the constraints.

What could better look like?

• Sleeping more predictably or more in sync: She seems to adjust her sleep cycle earlier if I go to sleep when she does instead of staying up to do my discretionary things, so maybe I can sacrifice a week or two of discretionary time to see if we can shift to using daytime better
• Written note workflow: maybe snapping a quick picture and then referring to it when I type; maybe doing small sketchnotes that can be cleaned up by an app and included as images
• Trying out other ssh apps to see which one I like the most, in case that makes it easier to code
• Trying more things (new food, etc.), which could take a bit of planning

Lots of things to play with!

## Making an 8-page 7″x4.25″ captioned photo book with Org Mode and LaTeX

Here’s another technique that makes a simple photo book. I wanted to
make an 8-page book that could be printed 4 pages to a 8.5″x14″ sheet
(duplex, flip along the short edge), with a final page size of
7″x4.25″.

Sample with my own photos:

## Prerequisites

• ImageMagick
• Texlive (probably)
• latex-beamer
• Org Mode and Emacs

## Process

We can define the labels and their captions in a named table like this:

 Let’s Go for a Walk Caption for photo 1 placeholder.png Caption for photo 2 placeholder.png Caption for photo 3 placeholder.png Caption for photo 4 placeholder.png Caption for photo 5 placeholder.png

Note that the first page is row #1 this time, instead of starting with
the last page.

Then we generate the LaTeX code with some Emacs Lisp, like so:

#+begin_src emacs-lisp :var pages=story :results value latex :exports results
(mapconcat (lambda (row) (format "\\graphicframe{%s}{%s}" (cadr row) (org-export-string-as (car row) 'latex t))) pages "\n")
#+end_src


I put that in a subtree for easier exporting with C-c C-e C-s l b (org-export-dispatch, subtree, LaTeX, Beamer).

## Process

• Set up Org Mode export to Beamer
(eval-after-load "ox-latex"
;; update the list of LaTeX classes and associated header (encoding, etc.)
;; and structure
("beamer"
,(concat "\\documentclass[presentation]{beamer}\n"
"[DEFAULT-PACKAGES]"
"[PACKAGES]"
"[EXTRA]\n")
("\\section{%s}" . "\\section*{%s}")
("\\subsection{%s}" . "\\subsection*{%s}")
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))))


This file gets included in the LaTeX file for the children’s book.
Tweak it to change the appearance. In this example, I use black serif
text text on the left side of a picture, both occupying roughly half
of the page. I also experimented with using a different font this time, which you might need to install (for me, I did apt-get install texlive-fonts-extra).

\geometry{paperwidth=7in,paperheight=4.25in,left=0.5in,right=0.5in}
\usepackage{etoolbox}
\usepackage[T1]{fontenc}
\usepackage{Alegreya}
\usefonttheme{serif}
\setbeamercolor{normal text}{fg=black,bg=white}
\setbeamercolor{structure}{fg=black,bg=white}
%% \setbeamertemplate{frametitle}
%% {
%%   \begin{center}
%%   \noindent
%%   \insertframetitle
%%   \end{center}
%% }
\newcommand{\graphicframe}[2] {
{
%% \if #1\empty
%% \usebackgroundtemplate{}
%% \fi
\ifstrempty{#1}{
\begin{frame}[plain]
\begin{center}
\noindent
\textbf{\huge{#2}}
\end{center}
\end{frame}
}{
\begin{frame}[plain]
\begin{columns}
\begin{column}{0.48\textwidth}
\huge{#2}
\end{column}
\begin{column}{0.48\textwidth}
\includegraphics[height=\textheight,width=\textwidth,keepaspectratio=true]{#1}
\end{column}
\end{columns}
\end{frame}
}
}
}
\usepackage[noframe]{showframe}
\renewcommand{\maketitle}{}

• Create the PDF
pdflatex index.tex

• Create one PNG per page
mkdir pages
convert -density 300 index.pdf -quality 100 pages/page%d.png

• Create the 4-up imposition

The diagram at https://pressnostress.com/iw/howto/booklets/1.html was helpful.

montage $$page4.png -rotate 180$$ $$page3.png -rotate 180$$ page7.png page0.png -tile 2x2 -mode Concatenate front.png
montage $$page2.png -rotate 180$$ $$page5.png -rotate 180$$ page1.png page6.png -tile 2x2 -mode Concatenate back.png
convert front.png back.png -density 300 ../print.pdf


## Other notes

Placeholder image from https://en.wikipedia.org/wiki/File:Portrait_placeholder.png – public domain.

## Week ending 2018-03-10

A- got a new conformer last week. Progress: she didn’t cry in the waiting room, although she still burst into tears as soon as she saw the ocularist. We’re continuing with the conformer approach instead of switching to a painted shell because A- still rubs the conformer out of her eye from time to time, and it’s easier to replace a conformer. Maybe we’ll switch when she’s closer to school age.

I asked her where she wanted to go for Field Trip Friday. She said, “Riverdale Farm. I miss that. I have fun. Big sheep make big noises.” So we went, and we enjoyed looking at the baby goats. We passed by the Children’s Book Bank, and I was delighted to find that you can take double the number of books on Fridays. I picked up a few more Seuss books.

We’ve been making more of an effort to explore and catalogue places so that we can make the most of Toronto’s resources. We checked out Baird Park, which has a playset with a short tunnel that A- actually worked up the courage to go through. She liked going down the twisty slide on my lap, and then graduated to going down the twisty slide at Lithuania Park with a little push. I posted a few park reviews in Google just in case other people find those notes handy, and I should find some way of organizing my own copy of the notes too.

A- has been having fun with both fine and gross motor skills. She practised using a ladle to pour and a butter knife to spread. She goose-stepped and danced.

A- can talk about more abstract things. She scribbled and said she was drawing “nervous.” One time, W- was carrying her up the stairs to change her diaper, and she was getting a little wriggly and distracted. He said, “Focus.” She said with enthusiasm, “Diaper!”

She likes being involved. When she was at the sink, she said with delight: “Yes! I’m busy!”

One time, she insisted that I carry her up bridal-style in my arms (which she accomplished by flopping in a certain way and protesting if I tried changing things). I was mystified, but it all became clearer once we got upstairs and she wanted me to read Emma to her. The Cozy Classics version has just twelve words, and “carry” is one of them. “Frank Churchill carry. Emma,” she said. Aha!

She often sings nursery rhymes and other songs. She sang part of “Mamma Mia” while dancing, and then obligingly repeated while I suppressed my laughter long enough to record her on video.

Little improvements:

• W- set up a Synology DS718 network-attached storage server. Wheee! I feel more grown-up with proper backups. I set up borg backups for my server and my laptop. Next: Docker containers for testing the backups…
• I set up lots of voice shortcuts to help me with groceries and with tracking. For example, I can say, “Okay Google, baby awake” and it will log that in my system. I explored Tasker’s Memento support, too.
• I figured out how to use Org Mode and LaTeX to typeset drawing templates for children’s books, and I used that to make a book about smoothies. Next: photos, more layouts
• Lots of tidying up in the basement, too. Whee!
• I switched to writing in Markor on Android. I briefly enabled Markdown support in WordPress, but it was messing up some of my other posts, so I turned it off again.
• I set up god-mode in Emacs, which does make phone use a bit easier.

## Using exiftool to put date, rating, and title in photo filenames

Now that we have a Synology backup server, I want to get better at keeping and organizing photos. I’ve got lots of pictures and videos of A- in Google Photos, but I don’t want to rely only on that. When Google eventually decommissions the service (no signs of this now, but you can never tell), I’d like to already have copies of my favourite photos and videos all prioritized and backed up instead of spending days wading through accumulated cruft.

I had previously added significant moments to a “Weekly highlights” album in the Google Photos app. I had also tried to select a number of those for “Level 2 highlights” and “Level 3 highlights” roughly approximating monthly and yearly filters. This was awkward, though, since Google Photos didn’t let me see which photos were already in an album or which timespans weren’t well represented. I wanted a five-star rating system so that I could gradually winnow images I liked, and I wanted tags for more flexibility.

The F-Stop Gallery app on Android seemed to be a quick way to sort through images, rate them, and tag them. I liked how it stored the metadata in the file instead of in a separate database. The bulk management tools were decent, although of course it would be even better to do things with fewer taps.

I downloaded ZIPs of my highlight albums and extracted them to a Samba share so that I could access them from my phone. I rated the level 3 highlights as 5 stars, level 2 as 3 stars, and weekly highlights as 2 stars, leaving the 4-star level for finer distinctions if I need to fiddle with things. Then I used cp -n (no clobber; don’t overwrite existing files) to copy the 5-star photos, then the 3-star photos, and lastly the 2-star photos. That way, even if a photo was in multiple albums, the file would have just the highest rating I assigned.

I can’t always rely on apps to index and search by the metadata in a file, so I like putting that information in the filename. A good filename might look like this:

2016-08-01-20-14-44 ### Relaxing on the deck #family.jpg

It starts with a date and time, since timelines make sense. I add one to the number of stars and convert that to # so that I can easily search for, say, ### to show me all entries that have at least two stars. This also creates a neat ASCII bar chart effect when looking at lists of filenames. I want to include the title if available, and any tags for easy searching as well.

Here’s the Bash script that takes an image file and renames it accordingly:

#!/bin/bash
exiftool -m \
-"Filename<\${DateTimeOriginal;s/[ :]/-/g} \${Rating;s/([1-5])/'#' x (\$1 + 1)/e} \${Title} \${Subject;s/^/#/;s/, / #/g}.%e" \ "[email protected]" This probably has bugs, but it seems to be a decent start. It was great to find out that I can pass Perl expressions to exiftool to modify the field value. I figured out that I could combine that with the /e flag for executable replacements so that I could generate a string of N+1 characters. While tinkering with the code, I accidentally used \1 instead of \$1 in my Org Mode block. That made a number such as 5 turn up as a scalar with a six-digit value, so I ended up with a really long line of #####... in my Org file. Emacs was definitely not happy. I ended up opening my Org file in vi so that I could delete the offending line. Anyway, I managed to recover from that and figure out what I needed to put in. Yay!

It would be pretty neat to have some kind of inotify` thing watching my NAS inbox and processing files accordingly. In the meantime, I don’t mind running another script. We’ll see how this goes!

## February 2018

In addition to our usual field trips to the Science Centre and the ROM, we went to Riverdale Farm. A- named the animals and enjoyed talking about them, although she found the sheep a little loud. We also started visiting family more often, for both big things like Chinese New Year and A-‘s birthday as well as small things like an afternoon of hanging out.

A- wanted to build a Duplo tower so tall that she had to stand on a chair to add blocks to it. She got pretty good at inserting shapes into her sorter and screwing together the nuts and bolts in her toolkit.

She walked astride her balance bike all the way to the kitchen by herself. She carried empty containers on a tray. She danced a lot and imitated other aspects of music class. She enjoyed bouldering. She wanted to try out a life jacket while swimming, and she kicked her legs too. She picked up diving rings with her foot.

She sang Humpty Dumpty, Baa Baa Black Sheep, and Hey Diddle Diddle practically in full. I could prompt her to show me a sleepy face, a sad face, and so on. She talked about recent events and how she felt, often revisiting moments that were particularly significant to her. She echoed many of the things we often say, such as “Give it a try.” She asked for specific things using “I need…” and often thanked us.

She played more independently, often amusing herself for a number of minutes or toddling off to a different room while telling us to stop. She confidently touched different textures in books. She asked to be pushed faster while in the playground swing, and she wanted to go down the twisty slide.

Her eye exam went well. The pediatrician is working on referrals to Sick Kids for dentistry and endocrinology.

We replaced our printer with an HP M277dw, and I learned how to use it to make short books for A-. I figured out an Emacs News workflow that I can do entirely from my phone, and I set up Syncthing for my files too. We organized A-‘s toys and clothes into IKEA Trofast drawers. I uploaded old photos to Google Photos. Progress!

March: A new conformer, a consultation with the anesthesia dentist, more children’s books, and lots of time with A-. We’ll figure this out!