RSSAmplifier

Blog

Roland Leth — Tech blog

Software development thoughts by Roland Leth

roland.leth.roRSS feed ↗20 posts

Latest posts

The tools that keep me out of the admin

Back in the opener I wrote "No CMS" and moved on in four words, without saying what happens instead. Then I spent three posts hardening an admin — auth, input…

What I'd do differently

Seven posts in, the rebuild has been live long enough that the things I called "more than this site needs" have had a chance to either earn their keep or…

Three markdown pipelines and a theme toggle

Every post on the site is markdown in a database column. Three different consumers turn that column into something readable, and each one wants the output in a…

Three surprises about server components

Server components are the best thing Next.js has done in years. Most of my code never ships to the browser, the few interactive widgets are visibly marked with…

200 markdown posts and the future-dated content puzzle

The blog has about 200 posts. They're stored in Postgres, edited through an admin UI, rendered as markdown, and cached with unstable_cache so the average page…

The admin write contract

An admin write on this site does three things in order: it mutates the database, it writes a structured audit line, and (on the UI side) it commits an…

Input validation and logs that don't leak

Every admin write on the site goes through one of two helpers at the request boundary: parseJsonBody, which Zod-validates the JSON body, and the multipart…

Auth for a single-user site, without NextAuth

I'm the only user on this site. There's no signup, no password reset, no OAuth providers, no "log in with GitHub" button. Just me, a cookie, and a login page…

The shape of a Next.js app

The other month I rebuilt my site on Next.js. I want to write about it, but not the migration itself, which is mostly a long list of "this was the equivalent…

Sync build versions between targets

I've been working for a while on a new project (stay tuned!) which has a watch app. Up until now I used a script that automatically increases the build number of the app, based on the value in `Info.plist`:

DND Me

Work without distractions!

Improved UIFont naming

Using static properties with semantic names, we can improve the readability of our UIFont usage.

Long parameter lists

Trimming long parameter lists with the help of a struct wrapper.

Learning new languages

Just like it’s beneficial for the brain to learn several spoken languages, the same can be said about programming languages. The benefit might not seem big, but it adds up.

Delightful animations

We all love animations. On one hand, they help our eyes be guided, but they also bring a nice finishing touch, a bit of extra care, a bit of emotion; we also prefer a lively UI to a static one, a UI that gives us feedback, that interacts back with us. But, as with anything, too much will be harmful,

Learning through mini habits

If you’d like to learn a new programming language, try to aim for ”write a line of code” every day. You might rightfully ask ”how will one line help in the long run?” and the answer is rather simple: you will almost never stop at one line of code; it also keeps you connected and the process ongoing.

CAAnimations and groups

Short introduction to animating CALayer properties like borderColor and borderWidth.

Easier UIFont usage

In a previous post I was writing about improving working with UIFont and now I’d like to take it one step further in regards with having a quick and easy way to set fonts, if you use a single typeface (font family):

My Travel Stories

The other week we released My Travel Stories, an app to journal your travels, share beautiful photos with the world, but also find inspiration from others.

Avoiding the keyboard on UITextField focus

A couple of posts ago I was writing about handling the Next button automatically. In this post I’d like to write about avoiding the keyboard automatically, in a manner that provides both a good user experience and a good developer experience.