DevIdiot!
Architectural Breakdown: I Tried to Beat Peter Norvig and Accidentally Became Ryan Gosling
I Tried to Beat Peter Norvig and Accidentally Became Ryan Gosling: Scaling a Meme to 10K RPS on 8GB RAMThe internet moves fast. One moment you are a nobody with a cheese bread recipe, the next, Ryan Goslingās Twitter fingers have turned your side project into a distributed systems stress test. This is how we survived 10,000 requests per second on 8GB RAM with bounded queues, race condition free SQLite, and a healthy fear of thread explosion. The Gosling Effect: When Your Side Project
Carmack: Has early Scratch experience led to fulfilling careers?
<a href="https://news.ycombinator.com/item?id=49516209">Comments</a>
Evidence of Fraud in an Influential Study About Procrastination
<a href="https://news.ycombinator.com/item?id=49516199">Comments</a>
A Clean React Project Structure for Scalable Applications
A well-organized folder structure makes a React project easier to scale, maintain, and collaborate on.Hereās a simple structure I commonly use:src/āāā components/ # Reusable UI componentsāāā pages/ # Page-level componentsāāā hooks/ # Custom React hooksāāā services/ # API calls & external servicesāāā utils/ # Helper & utility functionsāāā assets/ # Images, icons & other assets š ComponentsReusable UI components such as buttons, cards, modals, inpu
Run macOS Software on Linux
<a href="https://news.ycombinator.com/item?id=49515830">Comments</a>
Develop Cross-Platform CLI and GUI Tools with Tcl/Tk
<a href="https://news.ycombinator.com/item?id=49515662">Comments</a>
What Building a Bitumen Calculator Taught Me About Coding the Physical World
Building a calculator for a digital conceptālike pixels or file sizesāis straightforward. The rules are absolute. But building a calculator for a physical construction material is an entirely different challenge.While building the Bitumen Calculator for Efficienco, I quickly realized that the mathematical formula is the easiest part of the project. The difficult part is translating the messy, unpredictable physical world into a clean digital interface.This article covers the product and UX patte
Put the Longer Branch First Is a No-Op in grep and Changes 15.5% of Answers in JavaScript
A real POSIX ERE matcher: a hand-written parser, a Thompson automaton run as a parallel simulation for leftmost-longest, and a backtracker for leftmost-first, over one shared syntax tree ā so the same pattern string can be read two ways, matched two ways, and the four answers put side by side.Try any pattern: https://dev48.infy.uk/solve/day77-posix-ere-matcher.html The most-repeated piece of regex adviceEveryone knows the first rule of alternation: branches are tried in order, so put the lo
Your Focus-Trap Tests Pass for 3,600 of 3,600 Random Element Orders, Which Is Why Six of Seven Traps Are Wrong
A focus trap is the loop that keeps Tab inside an open dialog. There is one set of things every focus-trap test asserts:Tab never leaves the dialogTab from the last control wraps to the firstShift+Tab from the first wraps to the lastTry it: https://dev48.infy.uk/design/day77-focus-trap.html All three hold for seven of eight traps. Six of those seven are wrong.And it could not be otherwise. The same assertions pass for 3,600 of 3,600 lists drawn at random from the dialog, in random order ā b
The Only Rule Anybody States for Sim Is 570x Ambiguous, and Its Worst Reading Is 56x Worse Than Random
Sim is six dots and fifteen lines. Two players colour lines, and you lose the moment three of your own lines make a triangle.Play it: https://dev48.infy.uk/game/day77-sim-ramsey-game.html There are no draws, and that is a theorem you can checkEvery one of the 32,768 two-colourings of Kā contains a monochromatic triangle. 0 exceptions. Kā
has exactly 12 that do not ā and 12 is also the number of Hamiltonian cycles of Kā
, counted a second time with no colouring anywhere in the argument.So the
Merge PDFs in the browser with JavaScript (no uploads, no server)
In this post I'll show how to merge PDF files entirely in the browser using PDF.js and pdf-lib ā no server, no file upload, no backend. Everything runs on the user's machine, which is great for privacy and for keeping hosting costs at zero (it's just a static site). Why process PDFs on the client?Most "free" PDF websites quietly upload your documents to their server, which:Exposes private/sensitive files to third partiesImposes size limitsOften slaps a watermark on the outputRequires you to
Google Has Removed MV2 Extensions from the Chrome Web Store, Including UBO
<a href="https://news.ycombinator.com/item?id=49514878">Comments</a>
Virtual Eyewear Try-On: 4 Jobs Between Frame Photos and Cart
Putting eyewear try-on on a storefront breaks into four jobs: turning photographs of each frame into a try-on asset, deciding which browsers get the entry point, mounting the widget and choosing what opens it, and connecting the catalog check to the cart events. Three are front-end work. The first is a data pipeline, and it sets the launch date.The ticket usually arrives with a design attached, a button under the add-to-cart block, and no picture of what sits behind it. The code below uses the B
Four JavaScript problems I hit writing a chess engine for the browser
I wrote a chess engine in TypeScript that runs entirely in the browser. No server, no WASM Stockfish, no dependencies at runtime. Paste a position, get a move back in about a second and a half.Most of the chess parts were the easy bit ā the algorithms are fifty years old and well documented. What took the time were four problems that only exist because the target is JavaScript in a browser tab. These are the ones I would want to have read about first. 1. Zobrist hashing wants 64 bits. JavaS
Architecting a Scalable Component Library with Shadcn/ui
In the modern frontend landscape, the debate between "building from scratch" vs. "using a library" has shifted. We now have a third, more powerful option: Headless UI wrapped in your own design system.Shadcn/ui has emerged as the gold standard for this approach. Unlike Material UI or Bootstrap, it is not a component library you download together as an npm package. It is a set of reusable components that you can copy and paste into your apps. Why "Copy-Paste" is the FutureThe brilliance of S
A reactive JS framework for server-rendered apps ā no Virtual DOM, no eval(), no build step required. Looking for critical feedback.
I've been building a JavaScript framework called Voodoo.js, and I'd rather get torn apart in the comments than hear that it looks cool.It started with one question:How much JavaScript do we actually need to write for everyday interactive interfaces?For a lot of apps I don't want to build a component tree, configure a bundler, install five libraries, wrap the API, manage state somewhere else, and then wire it all back into HTML.Sometimes I just want to keep writing HTML.GitHub: https://github.com
Measuring Order Book vs AMM Share on the XRP Ledger
When the AMM amendment activated on the XRP Ledger in 2024, the expectation was that liquidity would migrate into pools the way it did on every smart-contract chain before it.You do not have to speculate about whether that happened. The ledger publishes both numbers. Getting the splitconst { H24 } = await ( await fetch('https://api.xrpl.to/v1/stats')).json();const ob = H24.globalVol24hOrderbook;const amm = H24.globalVol24hAMM;console.log('order book share:', (ob / (ob + amm) * 100).toFix
Building a Full-Stack AI Creative Studio with Next.js, WebGPU, and Node.js: The Ultimate Capstone Blueprint
The landscape of web development is undergoing a violent, exhilarating transformation. For years, we built web applications using a rigid, predictable request-response model: a user clicks a button, a React component fires an HTTP POST request to a Next.js API route, a centralized backend server queries a database, runs some standard business logic, and returns a tidy JSON payload. Try applying that monolithic, server-bound architecture to generative media workflows. Imagine a real-time, node-ba
How I built a Chrome Extension to intercept Crypto Wallet Drains (EIP-2612 & ERC-20)
If you spend enough time in Web3, you eventually see a friend get their wallet drained. The most frustrating part isn't just the loss of funds; it's the UI.When a user encounters a malicious smart contract, standard security tools often throw hex codes at them:ā ļø Error: 0x095ea7b3...Normal users panic, don't understand the alert, and click "Ignore" anyway. Or worse, they get "alert fatigue" and turn the tool off completely.I wanted to solve this "False Sense of Security" problem. So, I built Saf
React Lazy Loading Images: A Simple Guide to Better Performance
Images are important for modern websites, but loading too many images at once can slow down a React application.If a page contains 30 images, users may only see 4ā5 of them initially. There is no reason to load all 30 images immediately.That's where lazy loading helps. What Is Lazy Loading?Lazy loading means delaying the loading of an image until it is needed.Instead of:Page loadsāLoad every imageāShow pageLazy loading works more like:Page loadsāLoad visible imagesāUser scrollsāLoad images