Chris Roos by Chris Roos

Week 844

Week beginning Monday, 17th March 2025 (also incorporating week 843).

Most of our time has been spent working on the project with the Raspberry Pi Foundation where we’re working toward making some of what we’ve been doing public. I’ve enjoyed pairing with James while Chris has been in his happy place crafting HTML and CSS to make things look pretty.

I spent a while configuring Heroku Review Apps this week. I discovered that when editing the app.json config within a PR some changes appear to take effect immediately (e.g. changes to env vars) while others appear to only take effect when the Review App is first created (buildpacks, maybe?). I failed to find documentation explaining the differences so used some classic TED (Trial and Error Development) to come up with an app.json that seems to do what we need.

We ran into a problem that we caused through the introduction of a default_scope in an Active Record backed model. We’re adding a new type of thing to the system but wanted to ensure that nothing else had to care about this new type of thing unless explicitly dealing with it. We did this by adding a default scope that excluded our new type of thing from all queries but failed to handle the case where we’re explicitly creating our new type of thing! We already knew default scopes to be problematic but thought its use was justified in this case. Now I’m not so sure…

Why is it so hard to put HTML on the Internet

As part of the rubyforge redirects work we were doing at the end of last year I created a simple Rails 8 app to consume logs from Fastly. I used Kamal to deploy the Rails app to a Digital Ocean Droplet and thought it might be useful to document the process as I had to figure a few things out from different sources. I had the post mostly written at the beginning of the year but it’s taken until about a week ago to get it published on our site 🤯. I’d written the post using GitHub Flavoured Markdown (GFM) only to discover that our site didn’t support GFM 😢, so first had to add support for rendering that to our site. I then discovered that we were automatically processing all content with ERB which was rendering some ERB tags I needed to display in the post 😢😢. James kindly provided a fix which I was able to make use of 🙏. But only after (re?)discovering a Rake task that James had added to render the entire site to static HTML pages so that we could find differences in rendering after making a change. I wanted to use this to ensure that we hadn’t broken anything with the change to ERB rendering but first had to work out why it was failing part way through generating the site. It turned out that we had some broken links that were preventing it from running successfully 😭. Once I’d fixed some broken links revealed by the Rake task I was able to confirm that the ERB rendering change didn’t change any existing output 🎉 Unfortunately I did discover that I’d inadvertently made a breaking change when introducing GFM rendering 😭😭 so had to fix that too.

I was initially questioning whether we should switch to something like Jekyll to host our site but then started to wonder why I didn’t just write the post using HTML in the first place…

I still intend to write a post about creating a simple Rails app to consume Fastly logs. At current rates I expect that to be ready by about July 😬

Working in the future

I’m late to the multiple monitor party but have recently setup a second monitor in my office. Initially a smaller Raspberry Pi monitor underneath my main monitor and now a second Dell. I’m appreciating being able to remote pair on one and use the other for reference while pairing.

Chris R's office dual monitor setup

CoTech

Chris represented GFR and enjoyed spending time with fellow cooperators at the CoTech gathering at Space4.

Outside of work

James enjoyed a week skiing in the beautiful Alps. ⛷ 🏔

James has continued to have Internet connection problems since his contract was cancelled by an neighbour. Although his fibre connection was recently restored he’s been suffering from intermittent DNS problems. It turns out his router had been trying to connect to the old cancelled service 🤯. He’s been told that the old service has really, definitely, positively been cancelled this time so hopefully it really is all resolved now 🤞

Chris spent a day volunteering on his son’s school trip to London Zoo 🦁.

I’ve mostly been fighting a cold 🤒

Until next time.

– Chris

If you have any feedback on this article, please get in touch!

Historical comments can be found here.

Recent