Caching and downsampling images in Swift
A Swift image cache keyed by URL alone hands the list screen whatever size the details screen asked for first. Cache the Data instead, and downsample per size.
20 stories
A Swift image cache keyed by URL alone hands the list screen whatever size the details screen asked for first. Cache the Data instead, and downsample per size.
Working with Claude Code since the spring: I type much less and decide much more. Where the deciding lands, what it costs, and what I'd tell someone starting.
Claude Code will test, review and argue, but it won't ask whether the premise is right. Six careful rounds on a wrong assumption, and how I get at premises now.
Claude Code's report of what it did is a claim, not a result: a feature that counted attempts as submissions, why it's hard to catch, and what I verify now.
Claude Code starts every session with the code and none of the decisions behind it. What that memory gap costs, and the routines that write down what happened.
Claude Code's plans arrive finished-looking, and a considered choice reads like an arbitrary one. Why I decide before it writes, and the 4-word question I ask.
Claude Code's three places to shape how it works: rules for prose it reads, skills for procedures, hooks for what must run every time. Which one to reach for.
Why I gave building with AI a proper second try, the 2 apps and a site that came out of it, and what sits around the model: rules, memory, who decides.
How I publish without the admin: posts are markdown files in a repo with title and slug frontmatter, projects are a manifest, and a script imports them.
Closing the Next.js series: which over-engineered defenses earned their keep as patterns, the ones I'd reach for again, and what I'd revisit on a do-over.
Three markdown pipelines in Next.js: React with highlighting, feed HTML, plain text for meta. And the theme-toggle bug that taught me useSyncExternalStore.
Three Next.js server-component behaviors I shipped bugs on: Link prefetches every visible row, Link on mailto and static files, unstable_cache assumes JSON.
Scheduled posts in Next.js with unstable_cache: why a future-dated WHERE clause has two bugs, how the cache stays correct as now moves, and a catch-all route.
What every write in this Next.js admin goes through: an audit log, optimistic mutations and their small horrors, a return-type discriminant, one isAbortError.
Zod validation at a Next.js API boundary that logs the failing field's path, never its value, a magic-byte MIME sniff for uploads, and a log-string sanitizer.
Single-user auth in Next.js without NextAuth: a jose-signed session JWT, bcrypt with a dummy hash, per-IP rate limiting on Upstash, and pseudonymized IPs.
How I structured a single-user Next.js site: server components by default, Prisma and Zod at the edges, 200 lines of auth by hand, Tailwind only.
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`:
Showing 18 of 20 stories
Load more storiesGet the top AI news and tools straight to your inbox every week.
Weekly · AI news
Join 15,000+ AI enthusiasts