Sage words from the 4 year old:

You need to be the first to tell mommy that she’s pretty. Say it first thing in the morning, as soon as she wakes up. That’s the kind of adult _I_ want to be

So what’s the best way to feed my car’s user manual to an LLM and have it answer all my questions? Or every appliance in my house, for that matter.

Python script failing via cron

The issue

I had setup a cron task to run my Squirrel Archiver script once per day, but for some reason the task was not executing. Nothing, including any errors, was showing up in any logs. At first I thought there was something wrong with my crontab, but other scripts set up to run in the same way were running without issue.

Copying the commands in crontab to the terminal and running it manually worked. It was only when cron was triggering the run that it failed.

Just to be sure, I changed my script to just print('hey'), and this worked! So there must have been something wrong inside the script, and I started the tried and true debugging process of deleting chunks of code until something works.

Side note: Since the script had to run via cron, while I was debugging it was set to run once per minute on the dot. I had to rush to make changes in time, but I also had to wait to see results, which made for an interesting experience.

The culprit

I had been declaring openai_client = OpenAI() as a global variable, outside of any function. This worked fine when running the script manually, but when cron triggered it, it failed silently.

Why?
I have no idea.

Is initializing objects outside of functions commonly known to be a bad practice?
Probably.

I wish I knew more about the reasons, but moving the declaration inside a function fixed the issue.

So, maybe to many it is obvious that “yes of course you shouldn’t do that”, but I’m recording it here in case anybody else out there is like me.

What I'm doing /now

Personal Life

Nothing much has changed for our family these past few years, and that is by design. Work is stable, life is stable, everybody is happy. I am very thankful for that.

Work

Since 2022 I have been leading a department that is tasked with making our studio better at creating new games. This involves encouraging all staff to submit game ideas at any time, working with people to strengthen game ideas and create attractive pitches, coaching teams through early development phases, maintaining a corporate strategy for the release of new games, and more. It allows me to work directly with a lot of people throughout the company, and has been tremendously fun.

Hobbies

In 2022 I joined a Haiku study group. We decide on a few prompts every month and submit our poems in advance of a meet-up, where we comment on each other’s pieces and have our teacher critique them. Haiku is fascinating because its extreme minimalism (only 17 characters allowed) makes it feel like putting together a puzzle. It is also a great way to learn about nature and Japanese culture.

Last year I set up GoToSocial as a solo instance to join the Fediverse, and that has been a lot of fun. It’s nice to be social on the internet again. I think this has helped motivate me to update this site more, and I’m having a lot of fun making little updates to the site as well.

AI tools have been super useful for programming as a hobby. It has made it so much easier to finish and ship my little projects, and I have already developed a slew of little utilities that I use often. I’m still writing words by hand though, because I think being able to organize my thoughts into communicative sentences is such an important skill.

I also started keeping a physical journal at the beginning of this year, and one month is the longest I have ever kept up the habit so I am hopeful that it will continue. I had always admired people who keep physical journals; I thought it was a wonderful habit. I never could get into it though, and had resigned myself to thinking that I just wasn’t that kind of person. But my wife convinced me that if that is the kind of person I want to be, then it’s worth putting in the effort to make the change.
So far, I am really enjoying it. I’m using the most simple interpretation of Bullet Journal. It’s turning to be a super helpful framework to guide the kinds of information I should keep, and the format for recording it.

Katamari Damacy postmortem

By Game Developer Magazine:

We recently received a request to publish the Katamari Damacy postmortem from the December 2004 issue of Game Developer. It has been posted here in full for the first time in 2024 to celebrate the game’s 20 year anniversary. Please enjoy.

This article was written by the game’s director, Keita Takahashi, and has been translated into English from the original Japanese. I wish I could find the original text, but this is a great read regardless.

It’s easy to take a successful game and say “Here are its unique features and the reasons why we think they led to success.” But this portmortem also includes regrets from the game’s development, which gives a really rare, close look into what the team’s ambitions were and how they thought about the game’s design.

CrossPooter - Poot your toots around the web

CrossPooter logo, showing a smiling cartoon face among arrows branching away
CrossPooter logo, showing a smiling cartoon face among arrows branching away

CrossPooter is a simple script for personal use, that reads the RSS feed of this website and posts the latest article to GoToSocial and Bluesky. It was inspired by EchoFeed, but I wanted to try my hand at making something similar myself.

You can see the source code here.

Features

CrossPooter reads the RSS feed of this website and checks if the latest article has been posted yet. If not, it will grab the article’s OpenGraph tags to construct a post.

The post will include a link to the article, the article’s title, and the article’s description. It will also attach an image if one is available.

The script is inteded to be run via cron every hour or so. I’m assuming that I won’t be posting new articles faster than that, so the script only checks the latest article.

Things I learned building this

Bluesky was very straightforward since I just used the official python sdk. GoToSocial probably would have worked with the Maston library, but the API was simple enough that I wanted to try just sending HTTP requests.

I’m still very inexperienced when it comes to creating complex HTTP requests, so I stumbled a lot with setting the correct headers and formatting the data in the correct way. But it was a good exercise in reading source code and documentation, and now I have a stronger handle on how to do it.

The geometric nests of the white-spotted pufferfish

The white-spotted pufferfish, or Amami hoshizora fugu, is a species of pufferfish newly discovered in 2014 near Japan’s Amami-Oshima Island. The males spend roughly a week constructing an elaborate circular nest about 2 meters in diameter to attract females.

Divers had known about these structures that appear in early summer every year, but apparently it took a while to catch the fish in action.

The circular nest of the white-spotted pufferfish
The circular nest of the white-spotted pufferfish