Cross-compilation with Wails

On 2025-12-9, I tested the cross-compilation of the official Svelte template of Wails v2.11.0, a desktop app framework for Go, on my amd64 laptop running Ubuntu 24 with Go v1.25.5. Of course, the results may change in the future as Wails and Go are being improved. Go is known for making cross-compilation much easier than most other languages, and that is mostly still true when using frameworks like Wails. Creating executable files and/or installers for each of several platforms is sometimes as simple as listing those platforms in a command:...

December 10, 2025

Project generators

A software project generator sets up the starting boilerplate for a project, filling in the new project’s name and other details in various places throughout the new files. Project generators make starting new projects much faster and lowers the barrier to quickly trying an idea. Their output can be much more reliable than that of LLMs. Like all tools, they are useful in some situations and less so in others....

December 5, 2025

Exit in Python

Python has several ways to make a program exit. exit should probably only be used to exit a Python REPL because it’s not safe to assume it’s defined. The sys.exit function is safe, but you might prefer to raise SystemExit instead because: they do the same thing and have the same interface sys.exit requires an additional import (import sys) sys.exit raises SystemExit without being explicit about the fact it raises an exception You can exit with a status code, such as raise SystemExit(0) or raise SystemExit(1)....

November 22, 2025

Copy repos between devices using bash

Sometimes it’s helpful to copy a Git repository directly from one machine to another without using a Git host like GitHub. If you can SSH into the machine(s) involved, you can use Bash’s rsync command. Rsync’s defaults aren’t great for copying repos for several reasons, but a Bash script can fix that. I named the script ,cp-repo (copy repo): ,cp-repo . staging:/home/chris/repos/url-shortener This copies the current directory (.) to /home/chris/repos/url-shortener in a machine named staging as defined in an SSH config file....

October 21, 2025

Python in Justfiles

Just is a tool for defining and running custom commands for specific projects. Justfiles are often compared favorably to makefiles. If you’re new to Just, check out Just Programmer’s Manual. A command definition in a justfile (a recipe) usually contains code written in the system’s default shell language, but Just lets you choose from many other languages including Python! This is especially great because it allows more recipes to be cross-platform....

September 30, 2025

Browser extensions are risky

During the time I’ve been making browser extensions, I’ve learned about the amazing things they can do and how helpful they are, but also how dangerous they can be. Below are some examples of risks and ways to mitigate them. Some of the risks Even though browsers put limits on what extensions can do and require them to ask permission for some things, extensions can still do more than what most people expect....

August 31, 2025

Disposable vs. masked email addresses

Sometimes it’s helpful to give the terms “disposable” and “masked” two different meanings when referring to types of email addresses. Both disposable addresses and masked addresses are great at protecting you from spam and phishing emails. Instead of giving out your main address, you can give out ones that are temporary or easy to replace. Some email protection services have different sets of features: addresses with inboxes that are completely public addresses with private inboxes, but you only get access to a random address for a short time (say, 10 minutes) addresses that you keep access to as long as you want, and all emails they receive are automatically forwarded to your main address I’ll refer to the last of those as “masked addresses” and the others as “disposable addresses” even though Wikipedia’s page on disposable addresses doesn’t make a distinction between them....

July 31, 2025

Restic vs. Duplicati

Restic and Duplicati are both great for making backups of your computer’s files. I have experience with both. They’re mostly the same, but they have some differences that might be important depending on your needs. Similarities They’re the same in many ways, including: free open source versioning of backups choose specific files and folders to back up encryption compression deduplication verification scheduling of backups and retention (I now use Resticprofile for this) support for many storage locations (I happen to use Backblaze B2) Differences Setup Duplicati requires less technical skill to set up because its user interface is graphical....

June 2, 2025

Types of secrets management

When creating software, it’s common to deal with secrets like database passwords, API access tokens, etc. There are many ways to make secrets available to software. Below are notes on some of the ways. Threat Modeling might help you determine which way is best for what you are doing. Environment variables Putting secrets in environment variables (env vars) is very easy and might be fine if your setup is simple and otherwise very secure....

May 5, 2025

Security benefits of SQL stored procedures

Using stored procedures instead of putting SQL statements directly into a service’s code can increase security. There are multiple reasons why. Reduced attack surface The main security benefit is that hackers will be more limited in what they can do if the database credentials they steal can only call stored procedures. As a demonstration, let’s say your data can only be accessed by stored procedures that each take a Discord user ID as input....

April 30, 2025