Reflections on a typo

Much of my day was spent working on a bug described in this SO question. In a narrow sense, it was caused by a careless error: it was a hanging " in one of my environment variables. But in the broader sense, the problem wasn’t the typo. It is my unfamiliarity with Next.js, which made me look and double-check all these areas:- client/server components different .env file settings for each the concept of components itself Next directory structure mailgun create method Had I known the eco-system better, I wouldn’t have looked so widely: the typo would have been spotted sooner....

July 29, 2024

Learn Next.js (up to Ch.7)

As related earlier, two projects I am joining uses Next + Supabase, so I need to get up to speed with them. The official Learn Next tutorial felt quite heavy going at first. But now (at Ch.7) I feel it actually strikes quite a good balance between a simple “toy” example and something more substantial. There is quite a lot of pre-requisites. For example, without some familiarity of React, a lot of the materials won’t really make sense....

July 26, 2024

More Clojure

With these resources (in chronological order): Try Clojure Exercism Clojure track ClojureScript Koans up to /#functions/9 So as to return to 4clojure at my next Dojo!

July 26, 2024

Display rate limit in Official Next + Supabase Quick Start

I need to familiarise myself with Next + Supabase, so used this (generally) very engaging official tutorial to get me started. However, I quickly ran into a problem. The “Log in” page has two buttons: “Sign In” and “Sign Up”. Because the “Sign in” button is green, I clicked on it without much thought. But, with no signed up, no one can sign in. A sensible error message, “Could not authenticate user”, appears....

July 25, 2024

Fireship.io: SvelteKit Full Course

I had a coffee with a Frontend developer on Monday, and he was telling me how he finds playing with Angular helped him understand React better. Another framework he mentioned is Svelte. It is something I always wanted to try out, so I decide to give the official quick start tutorial a spin. I started from the beginning and stopped at around the “bindings” part. It is a very easy framework to get the hang of!...

July 24, 2024

Quick start v. quick deploy: Express + MongoDB Atlas

I had planned to follow these steps one after another to create a simple CRUD website with Express and MongoDB Atlas: run a “hello world” example on my local machine. deploying it to a common platform, e.g. Vercel. wiring up the deployed Express App to the Mongo Atlas database Steps 1 and 2 were fine. This official guide was helpful, even though I still don’t understand exactly why I need to remove the following line before deploying:-...

July 20, 2024

Mailgun quick start: with Express on local machine

The relevant code can be found in this repo. After attending a meet-up, I was told of a volunteering opportunity to improve the group website. Specifically, at present, there was no functionality for the website to send out a confirmation email after someone signs up. The tech lead who put the website together in a few hours says that a good tool for this feature would be Mailgun. So I decided to give Mailgun a quick spin, to see if I am up for the task....

July 19, 2024

Not all public websites are crawled by Google

I discovered quite by chance yesterday that not all Hugo websites are crawled by Google. As Henry Leach explains when he was trying to search an old blog post in 2021 And that’s how I found out that I hadn’t configured a robots.txt file for my updated Hugo site, and Google was politely ignoring it. It seems the same is true of 2024 as well. Maybe that is one reason search engines such as DuckDuckGo or Marginalia is better for searching blog posts....

July 16, 2024

Hugo deploy: struggle v choice

Given my familiarity with Vercel, I initially wanted to deploy my Hugo blog there. But the process was just too difficult. Following the official guide led to a webpage that displayed some, but not all, features of my theme. I tried a few troubleshooting tips from various sources, but without a deep understanding of how Vercel works, couldn’t find a fix. Online discussions seem to put the finger of blame on which Hugo version is used by Vercel: but without knowing the full context it was hard to get a feel for whether that is right....

July 15, 2024

Uses of grep: changing font size for a Hugo static website

Recently I wanted to adjust the font size of this blog. I already have a theme installed, so the choices are either changing something somewhere within the theme, or somehow overriding the theme. A simple Google query didn’t produce any straightforward results. StackOverflow answers seem limited to specific situations. Perplexity AI gave a solution along the lines of overriding the default theme with some additional files. An intriguing solution, but one that neither worked nor have any obvious support from Hugo DOcs....

July 15, 2024