Two weeks with the iPad Air (+ SuperNote A5X and Lenovo P52)

Posted: - Modified: | geek, tech, ipad

[2025-03-01 Sat]: Genaro suggested beorg, so now I've got that on my iPad and it seems to be doing fine for browsing my Org Mode files. I think I'll set up WebDAV on our network-attached storage (NAS) and see what that's like, too.

Also, apparently, it's been about three weeks, whoops!

I've had this iPad Air 13" for about two three weeks now, and I'm slowly settling into how the different pieces of tech can work together and how things can flow.

Text from sketch

Getting used to SuperNote A5X + iPad Air 13"

SuperNote A5X:

  • I prefer it for writing, sketchnotes
    • pen feel
    • strokes: exactly as I expect, no hooks or smoothing
    • lighter weight
    • no backlight
  • Also nice for reading EPUBs, PDFs

iPad Air:

  • Libby for library e-books
  • Procreate, Simply Draw for art
  • NetNewswire for RSS
  • Copying & pasting is nice

Procreate replaces spaces with underscores and doesn't overwrite files. Instead, it adds 2 to the filename.

I want to start building up thought maps so I can see quick summaries and open questions. The laptop is probably the best place to do it.

Org Mode files with sketches, text, and links

  • Export to HTML
  • Also, add export to HTML gallery view?

Private sketches: Available through DS

Private web server on the NAS? I can just run my sketch viewer.

DS: Synology NAS drive

  • Program the server to consolidate files?
  • Consider moving metadata to subdir for easier flipping?

Ideas for next steps:

  • Figure out easier doodling from iPad: resample, autocrop, insert with HTML markup
  • Automate recolour/rename from Dropbox (phone? server?)

On the iPad, I've been mostly using:

Moving data around is a bit of a hodgepodge: internal webserver or Dropbox for the Supernote, Dropbox and Synology's DS Drive for the iPad, and Syncthing for the server. I'm sure that'll settle down eventually as I figure out a better flow.

Untitled_Artwork.jpg

I like how drawing, singing, and playing the piano give me a way to distract myself from the urge to nag A+. Still definitely just starting out, but it's fun anyway. It's nice to be able to breeze through library e-books again, too.

I notice I've been missing the occasional calendar reminder from my phone, so that's probably a sign that I need to (a) set up the iPad for calendar access as well, (b) have more distinct notifications on my phone, and (c) take the phone with me as I go from room to room. On the plus side, that probably means I've been getting in the zone, yay! It seems a little easier to just take the whole stack of phone+Supernote+iPad when I move rooms instead of leaving them in different places and then having to go find them. The laptop is a lot heavier, though, so I tend to move that on an as-needed basis.

I set up a copy of sketches.sachachua.com server on the NAS (so it's just on the local network) pointing to my private sketches directory, so now I can flip through my private sketches fairly easily. They're mostly just various thoughts on parenting and emotions and life. Now I can review them from either my iPad or my laptop, yay!

Ideas for next steps:

  • Keep distracting myself from fretting about A+ by completing various art/music tutorials.
  • Have fun doodling.
  • Contemplate whether I want to read my Org files on the iPad, and what the best way of doing it might be. (Organice? PlainOrg? Just do a PDF/EPUB export of stuff I'm focusing on? - update 2025-03-01: added Beorg)
  • See if A+ is up for field trips to the art gallery or museum.

The iPad Air seems like a good addition. Let's see what I can do with it.

View org source for this post

Letting A+ play with generative artificial intelligence for fiction, and a primer

Posted: - Modified: | ai

[2025-03-01 Sat]: After experimenting with ChatGPT in depth, A+ has decided that she prefers Claude, so we'll try that.

A+ likes prompting Claude AI to generate funny kid-focused Star Wars fanfic mostly exploring how various characters might babysit Luke, Leia, and Grogu in a universe where Anakin did not fall to the Dark Side. This seems to be working out well. It encourages her to improvise stories even when we're off-screen, and it lets her play with small variations on ideas and quickly try things out. The stories that Claude generates are humorous and descriptive, with better dialogue and characterization than I might come up with myself. This is infinitely better than letting her wander around fanfiction.net on her own.

She often runs into the free tier's usage limits. There are plenty of other things she enjoys doing, so it's not a problem. She just goes on to read other things, practise singing, or colour. Still, we've been noodling around the idea of paying for a subscription, especially if we can help her get even more out of it. For example, maybe we could build some routines like:

  • Daily: Tell me your favourite story of the day. What did you like about it? What was the problem and what was the solution?
  • Weekly:
    • Check in to see if you're all caught up with schoolwork
    • Pick a story and let's draw a quick scene from it together; maybe I can compile it into a little PDF we can enjoy
  • Once a month:
    • Record one story out loud (~ 250 words, so a couple of minutes)

(I know, I know, it's pretty aspirational. But maybe I can sneak some of it in here and there, especially if I start doing it myself. Then she usually wants to join in.)

Prompt engineering

A+ currently writes prompts like:

  • Write a funny story where Darth Vader has a bunch of body doubles (like Queen Amidala did) and they have a very important meeting. The Emperor is trying to find Darth Vader and keeps finding the body doubles instead.
  • Write a silly story where Anakin raises Luke and Leia with Padme instead of turning to the dark side.
  • Write a continuation of The Skywalker Family Chronicles where Anakin is helping Luke and Leia get dressed for a very important Bring Your Children to a Council meeting.
  • Write a funny continuation of The Skywalker Family Chronicles about the time that Captain Rex brought the rest of the 501 Legion and Commander Cody's Legion to help babysit Luke and Leia.
  • Write a continuation of The Skywalker Family Chronicles where Commander Cody has to babysit Luke and Leia because Captain Rex is dealing with leftover Separatist droids and has to call in reinforcements who run into the Skywalker Naboo Lake House, fully armed, and wearing their full armor, asking whether his problem is either rouge Separatists droids or the Skywalker children and bringing two bags of military equipment and two bags of Skywalker Specific Stress Depleters and other things for babysitting.
  • Write a continuation of The Skywalker Family Chronicles where Grogu reads his journal, flipping to the page where Padme takes Ahsoka, Anakin, Yoda, Grogu, still talking and potty training, Luke, and Leia to a boat ride, but it turns out Yoda, Anakin, Luke, Ahsoka, and Leia get seasick, told from Grogu's point of view in detail.
    • It was interesting to see this prompt evolve over 16 iterations starting from "Write a continuation of The Skywalker Family Chronicles where Padme takes Anakin, Luke, and Leia to a boat ride, but it turns out that boat rides become disasters for Skywalkers."
  • Write a continuation of The Skywalker Family Chronicles where Ahsoka reads her journal, ending up on the page where she ends up at the Senate Medical Center due to some flu that only Togrutas can catch, the journal written in slightly squiggly handwriting, which is either Grogu or Anakin's handwriting.
The story Claude generated for that prompt

Ahsoka's Journal — Entry #47

[The handwriting is notably messy and inconsistent, with some letters larger than others and lines that don't quite stay straight across the page]

Dear Snips Journal Ahsoka's Top Secret Thoughts Today's Very Important Record of Events

Anakin here. Ahsoka is sick in bed with Togrutan Spotted Fever (which is apparently a thing??), so I'm writing this for her because she made me promise to "keep her journal updated" and threatened to tell Padmé about the speeder bike incident if I didn't. So here we are.

Medical droid says she'll be fine in a few days but needs rest. She keeps trying to get up to train, so I'm taking dictation between making her stay in bed. Her exact words: "Make sure you get everything right, Master, or I'll know."

This is ridiculous Here's what happened:

It started three days ago when Ahsoka's lekku developed these weird purple spots. She insisted it was "just a cosmetic phase all Togruta go through" and refused to see a healer. Then she collapsed during lightsaber practice, which was TERRIFYING, by the way. Not that I panicked. I was very calm and collected as I carried her across the Senate District while shouting for people to move out of the way.

The twins kept trying to "help" by Force-pushing pedestrians, which didn't actually help AT ALL. Leia claims "that man was going to step on Ahsoka's lekku" but I'm pretty sure she just wanted to see if she could push someone into a fountain. (She could.)

Luke tried to use the Force to make Ahsoka float "so you don't have to carry her, Dad" but only managed to make her boots come off. One hit Senator Organa right in the back of the head. I'll have to apologize for that later.

When we got to the Senate Medical Center, the droid at reception just stared at us like we were crazy. In my defense, it's not every day a former Jedi Knight runs in carrying an unconscious Togruta while two Force-sensitive five-year-olds make medical equipment float around the waiting room.

Padmé arrived looking perfect as always, somehow already briefed on the situation. She claims she "felt a disturbance in the Force, and that disturbance was you causing chaos, Anakin." She's not even Force-sensitive! How does she KNOW these things??

The medical droid diagnosed Ahsoka with "Togrutan Spotted Fever" which apparently only Togruta can catch. The spots spread all over her lekku and montrals before the fever kicked in. The droid said it's like "human chicken pox but confined to head-tails" which is both fascinating and disgusting.

Grogu seemed very interested in the spots, kept trying to touch them until Ahsoka made that scary growling noise. Now he brings her soup instead. At least I think it's soup. It's green and bubbling and I'm a little afraid to ask what's in it, but Ahsoka seems to like it.

Obi-Wan stopped by with "medicinal tea" which smelled terrible but made Ahsoka laugh so hard she snorted bacta solution out her nose. Something about a mission where I apparently got similar spots in an inappropriate location? I DON'T REMEMBER THIS AND IT NEVER HAPPENED.

Oh, Ahsoka wants me to add:

"Master Yoda visited and said 'Strong with the antibodies, you must be.' He brought me a weird root that tasted awful but made my headache go away. Also, tell the younglings the spots are NOT for coloring practice!" Speaking of which, I caught Luke trying to "connect the dots" on Ahsoka's lekku with a marker while she was sleeping. Leia was standing lookout. I'm simultaneously proud of their teamwork and horrified by their choices. Padmé has now banned everyone except medical droids from the sick room after Ahsoka's fever spiked when Rex brought the entire 501st to "boost morale." Apparently twenty clone troopers singing get-well songs isn't restful. Who knew?

Ahsoka is falling asleep now, but insists I note that "Anakin's nursin g skills are terri bl…"

She didn't finish that sentence because she's WRONG and also finally sleeping. I am an EXCELLENT caretaker! I've only spilled bacta solution twice, and the second time wasn't even my fault because R2 bumped into me. I should wrap this up. Padmé says my handwriting is getting worse, which I didn't think was possible. Also, Grogu is trying to add his own notes in the margins and I can't tell if those are drawings or actual words. Get better soon, Snips. The twins miss their "Auntie 'Soka" and I miss having someone else to blame when things go wrong.

— Anakin

[In the corner, there appears to be a small green handprint with what might be Grogu's attempt at writing "Get better" beside it]

All right, let's get a bit meta here. "Here are some prompts that my 9-year-old child has been using to generate funny Star Wars fanfiction in alternate timelines. Suggest 5 ideas for improving her prompts and provide detailed examples." We're out of free messages for Claude, so I asked ChatGPT.

It suggested:

  1. Be more specific about the chaos or conflict.
  2. Add unexpected reactions from characters.
  3. Use a "What If?" format to spark creativity.
  4. Introduce a clear perspective or narrator.
  5. Add an absurd or over-the-top element.
Full response including examples and details

Your child already has a fantastic imagination and a great sense of humor! Here are five general tips to help improve and refine her prompts for even funnier and more engaging Star Wars fanfiction:

1. Be More Specific About the Chaos or Conflict

  • Funny stories often work best when there's a strong contrast or a big misunderstanding. Adding more details about what could go wrong will make the story even funnier.
  • Example: Instead of: "Write a funny story where Darth Vader has a bunch of body doubles, and the Emperor keeps finding them instead." Try: "Write a story where Darth Vader has a dozen body doubles, but they're all terrible actors who keep revealing they're fakes in ridiculous ways. The Emperor gets increasingly frustrated as he accidentally promotes one to Grand Moff, challenges another to a lightsaber duel, and gets tricked by one into approving a Death Star Karaoke Night."

2. Add Unexpected Reactions From Characters

  • One of the funniest things in fanfiction is when characters react in ways they normally wouldn't. Encourage your child to play with unexpected character reactions.
  • Example: Instead of: "Write a silly story where Anakin raises Luke and Leia with Padmé instead of turning to the dark side." Try: "Write a story where Anakin raises Luke and Leia with Padmé, but he's the most overprotective parent in the galaxy. He installs lightsaber-proof baby gates, interrogates their playdates like a Jedi Council trial, and insists on Force-training them before they can walk. Meanwhile, Obi-Wan just shakes his head and drinks space tea."

3. Use a "What If?" Format to Spark Creativity

  • Reframing prompts as "What if?" questions can help make them more engaging and open-ended.
  • Example: Instead of: "Write a funny continuation where Captain Rex and the clones babysit Luke and Leia." Try: "What if the entire 501st Legion had to babysit Luke and Leia for a day, but they treated it like a high-stakes military mission? Their strategy meetings include creating 'Operation Diaper Storm,' using clone trooper formations for nap time, and having emergency evacuations when Leia gets hold of a blaster."

4. Introduce a Clear Perspective or Narrator

  • Some of the best humor comes from seeing an event through the eyes of a character with a strong personality or a unique way of looking at things.
  • Example: Instead of: "Write a story where Grogu reads his journal about a boat ride." Try: "Write a story from Grogu's journal where he describes (in broken baby Yoda language) a disastrous boat ride. Yoda, Anakin, Luke, and Leia all get seasick, Ahsoka tries to 'train' the fish, and Padmé regrets everything. Meanwhile, Grogu just wants snacks and writes about it like it's a Jedi prophecy."

5. Add an Absurd or Over-the-Top Element

  • Taking an idea to the extreme can make it even funnier.
  • Example: Instead of: "Write a story where Commander Cody has to babysit Luke and Leia." Try: "Write a story where Commander Cody has to babysit Luke and Leia, but he's so stressed that he calls in every trooper he knows for backup. Within an hour, the Skywalker Lake House is surrounded by AT-ATs, aerial support is patrolling for 'nap-time threats,' and Palpatine accidentally approves a new 'Elite Babysitting Clone Squad' after mistaking their report for a battle plan."

Encourage her to keep going with her hilarious and creative ideas! These small adjustments can make the prompts even more fun and engaging. 🚀

We read through this yesterday, and she's started telling me how she's added more detail to her prompts. I think she takes constructive feedback from the AI better than from me (just like using a timer works better than me telling her it's time to wrap up), so maybe there's some opportunity here on using a layer of indirection to keep the grumps from getting in the way of learning…

A primer on generative AI

I don't want A+ to treat generative AI as some kind of magic black box with amazing capabilities, so I've been sprinkling in some primer information here and there. I want her to understand roughly how it works, how it's not actually thinking but can still do a surprisingly good job of putting things together based on patterns derived from really large data sets in ways that are hard for humans to fully understand.

I also explained how conversations and token limits work. She's already getting the hang of editing prompts to refine things instead of adding more prompts to the conversation, although she still prefers to keep most of her story prompts in one conversation because the stories sometimes refer to previous incidents in the timeline.

Text from sketch

Generative artificial intelligence

How it works:

  • Tons of data: webpages, books, questions & answers, even images & videos
  • Computer model that predicts the next word/etc.
    • noticing the context
    • bat: ball, fly, base
    • bat: cave, wing, guano, fly
    • bat: man
  • Repeat with training until it gets things mostly right
  • We finish each other's sentences/sandwiches

Result: tools that can predict words or fill in blanks or even make images, recordings, and videos of things that don't exist.

They don't actually think for themselves yet; although sometimes the results can be quite interesting

Things to remember:

  • It doesn't actually know or think things. Not everything it says is true. Double-check when needed.
  • It usually doesn't cite or credit its sources. Even when it seems to do so, it can be wrong. So double-checking can be hard.
  • Use it to help you learn & explore. Don't let it substitute for your thinking & learning.
  • Don't put sensitive/private info in.

Caveats: The models cost a lot of energy to create. They cost less energy to use, but still a lot in terms of carbon emissions, water, etc. The data they were trained on includes things that people didn't give them permission to use. They are changing jobs & industries, but are often overhyped. Everyone's still figuring things out.

prompt, response context, tokens

sachachua.com/2025-02-27-01

Other resources:

I also showed her what NotebookLM could do with audio podcast generation, so she could get a sense of computer-generated audio. She noticed the interactive mode, so we experimented with that for a bit. The pauses in her speech tend to trigger premature answers, so it works better if she thinks about her sentence and says it confidently.

Going forward

A+ finds generating text very engaging at the moment and I think she's learning a lot through experiments. She'll probably have a deeper understanding of and appreciation for fiction than I did as a kid because she can easily change some things and see how it feels. (What if this story is told in third-person perspective? What if this story is told in present tense or past tense? What if this event happens differently; what would happen because of that change?)

With any luck, exposure to lots of story elements, vivid words, and dialogue will influence how she writes. Maybe she'll eventually get to the point where she can imagine a story and then want to write parts of it or all of it herself to bring it closer to her vision. So it's probably worth supporting this and seeing where it can go.

View org source for this post

Working with smaller chunks of thoughts; adding anchors to paragraphs in Org Mode HTML export

Posted: - Modified: | org, js

I write my blog posts in Org Mode and export them to Eleventy with ox-11ty, which is derived from the ox-html backend.

Sometimes I want to link to something in a different blog post. This lets me build on thoughts that are part of a post instead of being a whole post on their own.

If I haven't added an anchor to the blog post yet, I can add one so that I can link to that section. For really old posts where I don't have an Org source file, I can edit the HTML file directly and add an id="some-id" so that I can link to it with /url/to/post#some-id. Most of my new posts have Org source, though. I have a my-blog-edit-org function and a my-blog-edit-html function in my Emacs configuration to make it easier to jump to the Org file or HTML for a blog post.

If the section has a heading, then it's easy to make that linkable with a custom name. I can use org-set-property to set the CUSTOM_ID property to the anchor name. For example, this voice access section has a heading that has CUSTOM_ID, as you can see in the . If I don't mind having long anchor names, I can use the my-assign-custom-ids function from my config to automatically set them based on the outline path.

my-assign-custom-ids
(defun my-assign-custom-ids ()
  (interactive)
  (let ((custom-ids
         (org-map-entries (lambda () (org-entry-get (point) "CUSTOM_ID")) "CUSTOM_ID={.}")))
    (org-map-entries
     (lambda ()
       (let ((slug
              (replace-regexp-in-string
               "^-\\|-$" ""
               (replace-regexp-in-string "[^A-Za-z0-9]+" "-"
                                         (downcase (string-join (org-get-outline-path t) " "))))))
         (while (member slug custom-ids)
           (setq slug (read-string "Manually set custom ID: ")))
         (org-entry-put (point) "CUSTOM_ID" slug)))
     "-CUSTOM_ID={.}")))

Adding anchors to paragraphs

If the part that I want to link to is not a heading, I can add an ID by using the #+ATTR_HTML: :id ... directive, like this snippet from my reflection on landscapes and art:

  #+ATTR_HTML: :id interest-development
  That reminds me a little of another reflection
  I've been noodling around on interest development...

Text fragments

Text fragments are even more powerful, because I can link to a specific part of a paragraph. I can link to one segment with something like #::text=text+to+highlight~. I can specify multiple text fragments to highlight by using #::text=first+text+to+highlight&text=second+text~, and the browser will automatically scroll to the first highlighted section. I can specify a longer section by using text=textStart,textEnd. Example: #:~:text=That%20is%20the%20gap,described The text fragments documentation has more options, including using prefixes and suffixes to disambiguate matches.

Text fragment links require rel="noopener" for security, so I added JKC-Codes/eleventy-plugin-automatic-noopener to my 11ty config.

Update 2025-03-20: Quick ways to link to a text fragment:

  • On my Android phone, selecting text in Google Chrome and sharing it automatically includes the text and a link to the text fragment.
  • In Google Chrome on my iPad, my process is:
    1. Select the text and choose "Copy Link with Highlight".
    2. Tap the selected text again and share it.
    3. Paste the link after the shared text.
  • There's this Text Fragment extension for Firefox.
  • I have some Emacs Lisp to link to currently-selected text using Spookfox. Spookfox connects Emacs to Firefox using a browser extension. Once it's properly set up and connected, it allows Emacs to evaluate things in the Firefox context.

These seem like good starting points for addressing smaller chunks of thoughts.

View org source for this post

2025-02-24 Emacs news

| emacs, emacs-news

Links from reddit.com/r/emacs, r/orgmode, r/spacemacs, r/planetemacs, Mastodon #emacs, Bluesky #emacs, Hacker News, lobste.rs, programming.dev, lemmy.world, lemmy.ml, communick.news, planet.emacslife.com, YouTube, the Emacs NEWS file, Emacs Calendar, and emacs-devel. Thanks to Andrés Ramírez for emacs-devel links. Do you have an Emacs-related link or announcement? Please e-mail me at sacha@sachachua.com. Thank you!

View org source for this post

Playing with sketching again

| art, drawing

After our first informal field trip to the Art Gallery of Ontario, I got my own 13" iPad Air so that I can play with digital painting beside A+. Using the same apps might make it easier for her to pick up ideas from me and for me to pick up ideas from her. We mostly draw in Procreate, and I'm starting to get the hang of its brushes and features.

It's been nice doing moments from daily life again. It's been a while since I got to play with colour this easily.

A+ and I are both interested in piano, singing, and drawing, so we're experimenting with the Simply family subscription (CAD 46.49+tax/month). A+ likes to draw in the evening as a way of postponing bedtime. I could probably find lots of free drawing tutorials like the ones that Simply Draw has, but it's nice that it's already set up with the video in a corner and it pauses at the appropriate steps, so A+ can independently do it. She's starting to see shapes and shade a bit better now, although she doesn't yet have the patience to blend things slowly. I'm developing that patience, yay me. I wish I could zoom in on the reference image, though.

Here are some drawings I made following the Simply Draw tutorials.

One of the things I like about digital drawing and painting is that I can sneak up on blending by using different opacity settings and colours instead of either accurately controlling the pressure in my hand or switching between pencil and eraser. I also love the way I can use layers to build up an image gradually, how I can erase or undo, and how I can just use whatever colour I want without having to hunt for the right colour pencils or put things away afterwards. I haven't really played around with drawing with art supplies, although the watercolour tutorials that cross my feed seem fascinating. Maybe someday.

There's a glimmer here of how this might become a relaxing thing to do, different from untangling a thought or condensing a book into a sketchnote. I'm slowly getting to the point where, when I notice I'm starting to get anxious or when I'm tempted to nag A+ about procrastination, I can tell myself that I'm going on an art/music break instead and that usually keeps me busy enough until the urge passes. I think this might be useful for our sanity, especially if A+ picks up the idea too. When I'm on a music break, she often gets inspired to kick me off the piano and do her own music lessons, so that's a win. Art is something we can do side by side, and I can always make a drawing more elaborate since A+ likes to stay at roughly the same stage as I am.

I remember enjoying art enough as a kid to have fun at a summer camp where we did things like sand art and papier mache. I think I worked on an illustration of a sparrow that made it into a book of poetry or something like that. By the time we got to drafting classes in high school, I was feeling a bit more meh about art. I got back into art again with the Colors app on the Nintendo DS and then ended up getting into drawing and sketchnoting. I'd like to play around more with colour, and maybe I'll do more doodles and more drawing just because. I like drawing nature, and I'd like to get better at drawing characters too. I'll put the sketches on my blog and in my online sketches, and it'll fun to see how I grow over time.

View org source for this post

Productive procrastination and parenting

| productivity, parenting

Text from sketch

Productive procrastination

We are going to procrastinate. That's the way our brains like to work. No sense grumping about it, that'll just make it worse. We might as well get better at it This is a skill that takes practice, so try to learn when the stakes are low.

  1. Have a good idea of what needs to be done
    • Why? (Useful for motivation)
    • What? (Including details, subtasks, prerequisites)
    • By when?
    • For how long? Estimating & tracking time helps with accuracy
  2. Choose procrastination wisely. A few good options:
    • Something else that you needed to do anyway & that won't get in the way
    • Something that resets your brain and helps you grow
      • ex: exercise, music
    • Something that builds up dopamine or manages energy
      • sure, have a short video
      • calming, energizing -> the zone
  3. Use timers
    • so that your break doesn't stretch on
    • and to make work feel more manageable
      • I can do that for 5 minutes
  4. Celebrate! Pat yourself on the back even for small wins.

A+ is 8 (almost 9!) and is starting to learn how to procrastinate. I think this is a fairly new development now that she's got more classwork and more ideas about how she wants to use her time (not doing classwork). That's cool. I procrastinate, too. Part of my job as her parent is to help her learn how to procrastinate well, and to let her practise while the stakes are low: while she's dealing with schoolwork, instead of when she's making critical life decisions on her own.

This is hard for both of us, but mostly for me. I keep getting the urge to try to keep her on track. I have to remember that it doesn't work out if I'm the one pushing. She resists. Also, she doesn't get the practice in managing herself.

I think it'll work out better if I help A+ learn to tune into and manage her energy. That might look like 5-minute breaks and the occasional snuggle, or reading during class and then catching up on work. As she experiments, she'll get a better sense of when she should pay attention and do things at that moment because they're going to use those things in a discussion or because the opportunity isn't going to be available later.

There'll be failures along the way, like underestimating how much time a task will take, not managing energy well enough, or making the wrong choices about attention–but that's just feedback for the experiments. Failure is low-stakes at the moment: a reminder from the teacher if she hasn't gotten started on the class activity, some negotiation about when to do things if she ran out of energy the night before, a worksheet we take our best guess at because we don't know what the instructions were. She'll make mistakes along the way, but that will help her learn. As long as she gets the work done, that's cool. And if she doesn't get the work done, then that's an opportunity to debug and improve.

Her virtual school teachers are more on the synchronous "everyone should be working on this slide for the next ten minutes" side of things, so we'll see how long we can get away with this flexible approach. I hope eventually she'll get the hang of getting the work done and then reading, but that's probably something she's going to figure out with experimentation.

It's great seeing A+ start to learn how to manage herself. I made a menu of activities before, but now she often thinks of activities herself. Earlier in the schoolyear, she wanted the breaks to be playing 20 minutes of Minecraft with me. Now we've gotten that down to 10 minutes of Minecraft or videos, and sometimes she even chooses 5-minute breaks instead. She sets her own timers. Now that we're experimenting with the Simply apps for piano/singing/drawing, she sometimes uses that for her break. Going through a bite-sized lesson or practice session gives her energy and makes her feel great about herself, especially if she's picking a song like How Far I'll Go from Moana.

Sometimes A+'s breaks are a bit longer because she wants to help out with something around the house, like baking cookies. (It's funny how much her motivation to help increases when there's a piece of homework in front of her.) Practical life skills are worth it too, and we talk about what she gets out of those activities.

We also talk about dopamine levels and the effect different activities have on our energy levels. We talk about how things like music can shift how we're feeling and help us get ready. She can tell when she's ready, and she can tell when she's too tired to work. (Goodness knows that getting better at detecting when I'm in the negative productivity zone is useful as a coder…)

Someday she'll be able to manage her own checklists. In the meantime, I can help make lists (and resist the temptation to add pressure to them). Someday, all her breaks will be self-regulated. In the meantime, if she wants snuggles as a break, she gets them. Someday she'll have a variety of breaktime activities that she can use to manage her energy. In the meantime, I can update the menu as her skills grow and her interests evolve. Someday, she'll be able to work longer and take shorter breaks, maybe something like Third Time. In the meantime, it's okay to start where she is. Someday she'll be in tune with when she has the most energy in the day, and plan her tasks accordingly. In the meantime, I can share my observations. ("Hmm, we'll probably be tired after we get back.") Someday, she might even be able to strategically use procrastinating on other tasks in order to get her main tasks done. This is the time to experiment and learn.

One of the things that I appreciate about virtual school is that her classwork gives her fodder for practising the skill of figuring out how to get things done. Sure, the skills and bits of knowledge she develops by doing it are handy, but she can learn that whenever. The process of getting stuff done (including things you might not particularly enjoy doing, but which need to be done anyway)–now that's a generally useful thing. If we choose to homeschool, I'll probably want to come up with something similar so that she can keep practising.

Speaking of feedback, I wonder how I can make something that'll help us estimate and then track how much time a task actually takes, without feeling the pressure of a count-down timer or a missed goal. I occasionally track my time on tasks using Org Mode effort estimates and clocking, and I like to approach it with curiosity instead of stress. My tasks are usually not repetitive, so it's more about calibrating my sense of effort. It might be interesting to help her start developing that sense too. She's already used to timers on her watch. This is more of a stopwatch thing, but maybe something less frenetic than a digital stopwatch or a Stackmat timer. Or we could use her timer and then treat it as a check-in reminder… I don't think she's quite there yet, but it could be something to try later on. Something to grow into.

On my side, I'm working on staying focused on our long-term goals. It's not about making sure this particular thing gets done now. It's about helping A+ develop ownership of the process and the ability to tune into herself: her interests, her energy levels, her decisions and experiments. I'm also here to help build her up by catching her doing well and celebrating those small wins. It's very tempting to try to use pressure and stress when I feel responsible for helping her develop a work ethic that's convenient for fitting in, but maybe there are other things that could work well for us. Practising letting her work it out–even if it means the occasional failure–will be important as she gets older and more independent, so I might as well learn that while the stakes are low, too.

It's easier to work with what we've got than to grump at ourselves for not being who we wish we were. It's like the way I've been learning to work with how my brain works, too. Our brains procrastinate. We can get better at doing it. Could be fun.

Does your brain tend to procrastinate too? What do you find works well for you?

View org source for this post

Using systemd to switch nginx configurations based on number of CPUs

| geek

I set up a BigBlueButton web conferencing server so that people can use it for Emacs meetups. To keep costs down, I want to resize it to 1 GB RAM 1 vCPU most of the time, and then resize it to 8 GB RAM 4 vCPU when there's a meetup. When it's at a proper size (4 CPUs), the Nginx web server should proxy the Greenlight web interface for BigBlueButton. In between meetups, I want to display a backup page to let people know they've got the right URL but that it's not up yet.

First, I need a shell script that returns the name of the configuration file to use. This is /usr/local/bin/nginx-cpu-config.sh:

#!/bin/bash
cpu_count=$(nproc)
if [ "$cpu_count" -ge 4 ]; then
    echo "/etc/nginx/nginx.conf"
else
    echo "/etc/nginx/backup-nginx.conf"
fi

Next, I need to copy /etc/nginx/nginx.conf to /etc/nginx/backup-nginx.conf. Instead of include /etc/nginx/sites-available/*;, I'll use include /etc/nginx/sites-backup/*;. Then I need to set up a copy of the /etc/nginx/sites-available/bigbluebutton in /etc/nginx/sites-backup/bigbluebutton. I changed the try_files so that it tries the backup file.

  # BigBlueButton landing page.
  location / {
    root   /var/www/bigbluebutton-default/assets;
    try_files $uri /backup/index.html @bbb-fe;
  }

I set up a /var/www/bigbluebutton/assets/backup/index.html with the message that I wanted to display between meetups.

I removed the /etc/systemd/system/haproxy.service.d/require-cpu.conf I had previously set up, so it would start even if downscaled to a single CPU. Then I created a /etc/systemd/system/nginx.service.d/based-on-cpus.conf with the following contents:

[Service]
ExecStartPre=
ExecStartPre=/bin/bash -c '/usr/sbin/nginx -t -c $(/usr/local/bin/nginx-cpu-config.sh)'
ExecStart=
ExecStart=/bin/bash -c '/usr/sbin/nginx -c $(/usr/local/bin/nginx-cpu-config.sh)'
ExecReload=
ExecReload=/bin/bash -c '/usr/sbin/nginx -s reload -c $(/usr/local/bin/nginx-cpu-config.sh)'

Then I ran systemctl daemon-reload and used service nginx restart to test.

Seems to be working. We'll see!

View org source for this post