DevIdiot!
Making a dashboard react to audio: checking RMS and frequency bins in real code
An audio-reactive dashboard needs different values depending on whether an element should respond to overall signal amplitude or to a particular frequency range. Treating RMS and frequency bytes as interchangeable "volume" makes those movements difficult to tune.The analysis code from the personal project beautiful-dashboard-for-bga was tested with synthetic audio. Doubling the input amplitude doubled RMS, while the maximum frequency byte changed from 211 to 232. To change movements by the same
Hotspot analysis on React: its 20 least-healthy files got bug fixes 19 times as often as the average file
TL;DRHotspot analysis ranks files by how often they change and how complex they are. The files at the top are where a codebase does its hardest work, and where bug fixes concentrate.In React, 10 of the 20 files with the lowest health score had a bug fix in the last 180 days, against 64 of 2,446 files overall (2.6%). That is 19 times the base rate. The median across 173 popular repos is 5.4 times.React does not write conventional commits. A keyword rule ("Fix", "bug", "patch", ...) still labels 5
Dark mode in Next.js 16 with no flash: Tailwind CSS 4, one inline script, no library
A user picks dark mode, reloads, and sees a white page for a moment before it turns dark. The server can't read localStorage, so it renders the default theme, and any code that waits for React runs after the browser has already painted that default.This post builds a light / dark / system toggle with no theme library, then checks the first paint with Playwright. I tested everything on Next.js 16.4.6, React 19.3.0 and Tailwind CSS 4.3.3, on a production build (next build && next start) un
Understanding Race Conditions in React: When API Responses Arrive Out of Order
While learning React and API integration, I came across an interesting problem called a race condition.At first, it sounded like a complicated concept. But I realised it can happen in a simple React application too. Imagine a clinical trial search pageSuppose you're building a feature in an application like MedMatch, where users can search for clinical trials.A user types:Cancer โ the application sends Request A.Before the first response arrives, the user types Breast Cancer โ Request B is
New React Challenge: Numbers Game
Six tiles, four operators, one target. Instead of scattering a game across a dozen useState calls, this challenge asks you to keep the whole round in a single useReducer โ then add a stopwatch that keeps ticking until you win. ๐งฉ OverviewBuild a Countdown-style numbers game. Combine six number tiles with +, โ, ร and รท to reach a random three-digit target while a stopwatch measures your time. Along the way you'll practice useReducer for multi-field game state, a self-scheduling effect, and tr
How to read from a smart contract using wagmi v3
Note: This article has been updated from the original version to reflect the breaking changes and new patterns introduced in wagmi v3. The core concepts remain the same, but the API syntax has been modernized to align with TanStack Query conventions and improve type safety.If you have ever done Web3 frontend, then you must have heard about or used the wagmi library. Wagmi allows devs to make all kind of blockchain interactions on the frontend in a manner that feels very native to React, with a s
Make the agent use the existing Table or DataGrid, not a handmade table of divs
The PR renders a list of records as a CSS grid of divs, or it builds a <table> with no caption, no column headers, and a clickable row that is not a link or a button. The repo already has a Table or DataGrid with headers, a caption or aria-label, and the sort or selection pattern already wired. Nearby billing and member lists use it. The homemade grid is not announced as a table, and the header row is just bold text.I've started treating a handmade table of divs as an incomplete data view,
How to listen for and parse smart contract events using wagmi v3
Note: This article has been updated from the original version to reflect the breaking changes and new patterns introduced in wagmi v3. The core concepts remain the same, but the API syntax has been modernized to align with TanStack Query conventions and improve type safety.Sometimes, you need to listen for an event emitted by a smart contract in your frontend. Often after making a contract call so the UI can advance to the next step of the process. So, how do we do this? wagmiIf you have ev
How to call a smart contract using wagmi's v3 useWriteContract hook
Note: This article has been updated from the original version to reflect the breaking changes and new patterns introduced in wagmi v3. The core concepts remain the same, but the API syntax has been modernized to align with TanStack Query conventions and improve type safety.How do you call a smart contract function that performs a change of state (write) on the blockchain? And how could we be sure that the write transaction went through correctly? wagmiIf you have ever done Web3 frontend, th
How We Cut Next.js Tool Homepage TTFB from 1,231ms to 124ms by Removing Dynamic searchParams
When you ship an interactive web tool in Next.js App Router, it is surprisingly easy to accidentally opt your highest-traffic landing page out of Static Site Generation (SSG).Earlier this week, after launching our browser-based FDA nutrition facts label generator along with companion tool pages like our recipe nutrition calculator and Supplement Facts label maker, an automated audit caught an unexpected latency gap:Inner static tool pages: 15msโ18ms server responseHomepage (/): 1,231ms cold-star
Twelve pnpm exemptions for a Next.js version we have not installed in 181 days, and four override lines that turned out to be floors
pnpm 11 holds back any package version that was published less than a day ago. The setting is minimumReleaseAge, it defaults to 1,440 minutes, and it exists so that a freshly published malicious release has a day to be noticed before your install picks it up. The companion setting, minimumReleaseAgeExclude, is the escape hatch: a list of exact versions that may skip the wait.I wrote about that gate once already, from an Expo monorepo where the exclude list was nine pinned versions. This time the
Your blog post title is not a URL slug
Your blog post title is not a URL slugEvery CMS turns your title into a URL automatically, and most of them do a lazy job of it. The slug they generate is usually too long, full of stop words nobody searches for, and sometimes broken in ways you only notice when the link gets shared. A slug is a small thing, but it is the part of your URL that Google reads, that people read, and that never changes once the page is live.Here is the whole job, in plain JavaScript:function slugify(title) { return
Atomic CSS in dx-styles: a build option, and when to use it
dx-styles 1.6 added a second output model, and 1.7 makes it cheaper when the page renders. By default a style still becomes one class with all of its declarations. With one build option, output: "atomic", every declaration becomes a shared class of its own, an atom, and every other style that sets the same property to the same value reuses it. You write styles the same way in both models; only the build output changes.Atomic CSS is not new. StyleX, Panda and Compiled are built around it, and the
The same screens in a native app and a web app: the message bridge I keep reusing
Most "app or web?" arguments end with one of them being treated as the lesser copy. In practice the interesting version is both: the screens live inside a native shell, the content keeps living on the web, and the two have to agree on a small set of things โ back navigation, session, deep links, and what happens when someone taps a link that is not ours. Everything else can stay separate.This is the contract I keep coming back to after shipping a marketplace app (iOS + Android) on top of a web a
Our Mac app ships 74 open source packages and four of them carry a licence notice, and Electron's own 20 MB licence file stays behind
I have already written about the exclusion list in our installer config. In Our installer names 454 of the 528 MB in node_modules to leave out the licence line was one bullet: !**/LICENSE* is case sensitive, so a few lowercase files slip past it. That post counted what survived. This one asks the question I skipped: what do those files say, and what is left of them in the app a customer installs?The numbers below come from the built bundle in app/release/mac-arm64/Notifio.app, produced on 22 Sep
On 1 January, a footer year will throw a React hydration error on all 38 of our pages
The footer of notifio.app says ยฉ 2026 CogniPrep Ltd. The line that writes it is:<p className="text-[12px] text-[#404040]">ยฉ {new Date().getFullYear()} CogniPrep Ltd</p>It is the only wall clock on the whole website. A grep for new Date(, Date.now, getFullYear and toLocaleDateString across the server source finds this line, three timestamps in the licence code and a grant script. Nothing else on a page reads the time.It looks harmless, and today it is. The question I wanted answered i
How to Build a Privacy-First Image Editor (No Uploads) โ APIC Studio
Most "free" online image editors work like this: you upload your photo, a server edits it, you download the result.Convenient, but your photo has now left your device, and you don't know who stores it, how long, or what it's used for.I'm building APIC Studio, a free, browser-based, privacy-first image editor at Akhouri Systems, and its rule is simple: your photo never leaves your device.This guide covers the design rules and techniques behind that, so you can build your own privacy-first image e
A Tailwind dark-mode toggle that never flashes (and 5 more lessons from shipping 6 landing pages)
I just finished a set of six Tailwind CSS landing page templates: SaaS, agency, mobile app, portfolio, restaurant and conference. Each one is a single HTML file that uses the Tailwind v3 Play CDN for preview, a bit of vanilla JS, and dark mode. I went with single files because anyone can open one by double-clicking it. There's no build step, no framework, and nothing to install before you can see the result.Building six pages in a row meant I hit the same problems six times, so I eventually fixe
Strip invisible characters from text without breaking emoji
Text copied from a PDF, a web page or an AI chat often carries characters you can't see: zero width spaces, a byte order mark, soft hyphens, direction marks. They break string comparisons, CSV headers and password fields, so the usual fix is a one-line regex that deletes them.That one-liner has a side effect that's easy to miss. Some of the same "invisible" characters are part of emoji and of several writing systems. Delete them blindly and ๐จโ๐ฉโ๐ง becomes three separate people. What the one-
Send email reminders from a Google Sheet with Apps Script (no servers)
Your renewals, contracts and certificates probably already live in a spreadsheet. The problem is that nobody opens the sheet on the right day.Google Sheets has no built-in "email me N days before this date" feature, but Apps Script can do it, for free, on Google's servers, even while the sheet is closed. This post builds a small version you can copy in about ten minutes:a daily time-driven triggerseveral lead times per row (for example 30, 7 and 1 days before)a "last notified" column, so a row i