AI 资讯
Great Stack to Doesn't Work #3 — Redis: "99% Cache Hit Ratio, System Down"
A survival guide for when everything goes wrong in production. Your Redis dashboard looks perfect. Hit ratio: 99.2%. Latency: sub-millisecond. Memory usage: 60% of available. Every metric says healthy. Then at 2:47 PM, your API starts returning 500s. Response times spike to 30 seconds. Users can't log in. The dashboard still shows 99% hit ratio because the cache is working — it's serving cached errors to everyone equally fast. Redis is doing exactly what you told it to do. The problem is what you told it to do. Why Single-Threaded Is Fast (Until It Isn't) Redis processes commands on a single thread. No locks. No context switching. No synchronization overhead. One CPU core, fully utilized, can handle 100K+ operations per second because it never waits for another thread to release a lock. The event loop model (similar to Node.js) multiplexes thousands of client connections on a single thread using non-blocking I/O. Read a request, process it, write the response, move to the next. When your commands are simple — GET, SET, INCR — each one takes microseconds. The trap: slow commands block everything. KEYS * on a million-key database? That's a full keyspace scan on the main thread. While it runs, every other client waits. SORT on a large set? Same. LRANGE on a list with 10 million elements? Same. Redis 6.0 introduced I/O threading ( io-threads config) for reading and writing network data on multiple threads, but command execution is still single-threaded. Redis 7.0 improved this further, but the fundamental model hasn't changed. Long-running commands on the main thread stall everything. Rules: Never use KEYS in production. Use SCAN instead — it's cursor-based and returns results incrementally. Watch out for O(N) commands on large data structures: LRANGE , SMEMBERS , HGETALL on million-element structures. Use SLOWLOG to find commands that are blocking the event loop. Pipelining: The Easiest 10x You'll Ever Get Every Redis command involves a network round trip: send request
AI 资讯
Great Stack to Doesn't Work Bonus: SQL vs NoSQL: Which One in 2026?
The honest decision framework, not another flame war. The SQL vs NoSQL debate has been running for 15 years and it still generates more heat than light. Here's the framework that actually helps you decide. The Real Question It's not "SQL or NoSQL." It's: what does your access pattern look like? If your application is mostly reading and writing related data through well-defined queries — orders with line items, users with addresses, products with categories — relational databases are purpose-built for this. JOINs are not expensive when they're indexed. Transactions are not slow when they're scoped correctly. PostgreSQL handles 50 million rows comfortably on a single node. If your application is reading and writing self-contained documents with predictable access by a primary key, and you rarely need cross-document queries — user profiles, product catalogs, content management — a document database simplifies your code. No ORM mapping hell. No migration files for adding a field. If your application writes massive volumes and reads by partition key with eventual consistency — time-series data, IoT telemetry, activity feeds at scale — wide-column stores like Cassandra were built for this specific workload. The 2026 Reality PostgreSQL has eaten NoSQL's lunch in many areas. JSONB support means you can store and query unstructured data inside PostgreSQL with GIN indexes. You get the document model flexibility without giving up transactions, JOINs, and a 30-year ecosystem. For 80% of startups and mid-size companies, PostgreSQL is the only database you need. MongoDB has gotten more relational. Multi-document ACID transactions (since 4.0), schema validation, aggregation pipelines that look suspiciously like SQL. It's converging toward what PostgreSQL already does, but with a different starting point. DynamoDB dominates serverless. If you're in AWS and your access pattern is simple key-value with known query patterns, DynamoDB's pricing model (pay-per-request) and operational s
开发者
Great Stack to Doesn't Work #2 — Kafka: "Where Did My Messages Go?"
A survival guide for when everything goes wrong in production. There's a moment every engineer who works with Kafka experiences. You check the producer. Messages are sending. You check the consumer. Nothing. The consumer group shows zero lag because there's nothing to lag behind — as far as the consumer knows, the topic is empty. But it's not empty. The messages are there. Somewhere. In some partition, at some offset, behind some configuration you set six months ago and forgot about. Kafka doesn't lose messages. But it's very good at hiding them from you. Consumer Lag: The Number Everyone Watches Wrong Consumer lag is the difference between the latest offset in a partition and the offset your consumer group has committed. Simple concept. Dangerous in practice. The mistake: treating lag as a single number. Lag is per-partition. If you have 30 partitions and one consumer is stuck on partition 17 while the others are healthy, the total lag looks manageable. But partition 17's data is hours behind, and whatever downstream system depends on that data is serving stale results. Monitor lag per partition. Tools like Burrow, Kafka Exporter for Prometheus, or even kafka-consumer-groups.sh --describe break it down. If one partition's lag is growing while others are stable, you have a stuck consumer, a hot partition, or a poison message. A poison message is a record your consumer can't process — malformed data, unexpected schema, null where it shouldn't be null. The consumer throws an exception, the offset doesn't commit, and it retries the same message forever. Lag grows. The consumer looks "alive" because it's processing — just not making progress. The fix: dead letter queues. After N retries, move the message to a separate topic, commit the offset, and move on. Alert on the dead letter topic. Investigate later. Don't let one bad record block millions of good ones. Rebalance Storms: The Silent Killer Consumer rebalancing is Kafka's mechanism for redistributing partitions acro
开发者
I Updated My GitHub Auto-Commit Desktop App
A few weeks ago I posted about building a desktop app that automates GitHub commits because...
AI 资讯
How do you stop AI from missing the bias that's actually there?
A child laughs on a playground. Pure. Unbothered. The world owes him nothing yet and he owes it nothing back. Then he grows up. He does everything right. Studies. Works. Sends his resume. Waits. Rejected. Sends it again. Rejected. Again. Rejected. The smile disappears. Not slowly. Suddenly. The day you realize the system was never built for you. An empty stomach has no dignity. A person denied the right to work is not just unemployed, they are being told their existence has no value. That is not a glitch. That is a choice someone made. 72 million rejections per year in the US alone. The algorithm decides in 0.8 seconds. No human ever reads his name. AI did not build this system. Humans did. AI just made the discrimination invisible, scalable, and deniable. So I built BiasLens. Paste your rejection. 30 seconds. Scans for documented discrimination patterns under US employment law. Free. Anonymous. No account. The hardest part was not building the scanner. It was forcing the AI to say "no bias found" when there isn't any, instead of manufacturing injustice to seem useful. How do you stop AI from missing the bias that's actually there, without inventing bias that isn't? I am still solving that. For that child. For every human who deserves to keep smiling. https://biaslens-justice.vercel.app/
AI 资讯
Fragments May 27: on-the-loop with Claude Code, 2h of endurance, and NHS closing repos
Martin Fowler's May 27 Fragments brings together four arguments with direct implications for teams working with AI agents. All four are worth covering. Ian Johnson: build quality gates before releasing the agent Ian Johnson published a series about restructuring a gnarly codebase: three months, 258 commits, moving from a Laravel monolith with no tests to an application with automated quality gates and an AI agent shipping production code with minimal supervision. The insight Fowler highlights is about the transition from in-the-loop to on-the-loop: "For the first two months of this project, I used Claude Code with auto-approve turned off. Every file edit, every terminal command, every change… I reviewed it before it executed. The results were good. The code was clean. But I was doing most of the thinking and half the typing. The agent was a fancy autocomplete with better suggestions." Ian Johnson Manual review of every change is not how you build trust in the agent. Trust comes from building the structure that ensures the agent will do the right thing, then stepping back. The sequence: characterization tests first, static analysis, architectural patterns that make things flow correctly. Fowler notes this is exactly the sequence he would use himself. Adam Tornhill: roughly 2 hours of cognitive endurance Adam Tornhill observes that agentic work has a decision density that is mentally more expensive than it appears. The estimate is roughly two hours as a sustainable limit, not a full day of work. The implication: adding more parallel agents does not solve the problem, because the bottleneck is the coordinating engineer's cognitive capacity, not available processing volume. The solutions are smaller tasks, automation, and verification mechanisms, not more parallelism. NHS: closing open source repositories NHS (UK National Health Service) closed open source repositories citing LLM threats to code security. The UK Government Data Services countered directly: making code p
AI 资讯
Dev Opportunity Radar #1: A $100K AI Grant, Two Fellowships, and an AI Agent Resource
TL;DR I've missed a lot of opportunities simply because I didn't know they existed. So every...
开源项目
🗓️ Monthly Dev Report: May 2026
Hey everyone! I bring you my development journey on what I have discovered, accomplishments for this...
开发者
What was your win this week?
👋👋👋👋 Looking back on your week -- what was something you're proud of? All wins count -- big or small...
AI 资讯
What's the Most Underrated Programming Language in 2026?
I've been exploring some lesser-known languages and I'm curious what the community thinks. Languages like Go, Rust, and Kotlin have gained traction, but I feel like there are some gems that don't get enough attention. What programming language do you think is underrated? Which one deserves more love from developers? Share your thoughts and why you think that language is underrated!
AI 资讯
Software Engineering: The Art of Thinking Out Loud (with AI)
A colleague said something to me recently that I keep coming back to: "Often, by the time you've finished articulating a complex problem for the AI, you've already solved it yourself." It sounds almost like a joke. You open a chat window, start typing out your problem in careful detail — and somewhere in the middle of the second paragraph, the answer appears. Not from the AI. From you. If you've worked with LLMs seriously, you've probably experienced this. And I think it points to something important about what is actually changing in our craft — something that goes beyond the usual conversation about automation and job displacement. The Rubber Duck, Promoted Developers have known for decades that explaining a problem out loud helps solve it. The classic technique involves a rubber duck: you place it on your desk, narrate your code to it, and the act of articulation forces you to confront the assumptions you'd quietly made. The duck never responds. That's not the point. The LLM is a rubber duck that occasionally says something useful back. But even when it doesn't — even when the response is generic or slightly off — the discipline of formulating the prompt has already done its work. You've had to be precise. You've had to strip away ambiguity. You've had to decide what actually matters. That process is not a workaround. It is thinking. The Inversion of the Workflow In the pre-AI era, the typical development workflow looked something like this: you had a rough mental model of the solution, you started coding, and you discovered the edge cases along the way. The code was exploratory. The thinking happened during the writing. With AI assistance, that workflow inverts. Vague inputs produce vague outputs — the model has no way to compensate for an underspecified problem. So precision becomes mandatory upfront. You have to think before you type, not while you type. This is a more demanding cognitive posture. It requires holding the full shape of a problem in your head be
AI 资讯
I Spent 10x Longer Debugging AI Code Than Writing It
AI wrote the code in 30 seconds Three lines A simple function I prompted it generated I copied It...
AI 资讯
AI Agents Are Great at 80% of Our Code. The Other 20% Is Why We Still Need Seniors.
We let AI agents loose on a payment platform. They crushed the boring stuff. Then they silently broke the stuff that matters. A survey came out last week. 54% of all code is now AI-generated. Up from 28% last year. I read that number and thought: yeah, that tracks. We're probably in that range too. But here's the thing nobody's asking — which 54%? Not all code carries equal weight. A CRUD endpoint for fetching merchant details? Low risk. The webhook handler that transitions a payment from pending to complete ? That's someone's rent. Someone's payroll. Get that wrong and money moves where it shouldn't, or worse, money doesn't move at all. I'm the CTO of a payment platform. FCA-authorised, processing real money, real merchants, real consequences. We run NestJS microservices, Docker, Traefik — the usual stack. And we've been using AI agents aggressively for over a year now. I'm not here to tell you AI is dangerous. It's not. I'm here to tell you it's dangerous when you forget what it's actually good at. The 80% Where AI Agents Are Genuinely Brilliant Let me give credit where it's due. AI agents have made our team faster in ways that would have seemed absurd two years ago. API scaffolding. Generating service boilerplate. Writing Zod validation schemas. Spinning up new endpoints. Creating test stubs. Refactoring imports. Migrating patterns across repos. We run multiple microservices. When we need a new service, an agent can scaffold the entire thing — module structure, base configuration, Docker setup, Traefik labels — in minutes. What used to be a half-day of copy-paste-and-tweak is now a conversation. When we overhauled our env management across all repos, AI agents did the grunt work. They mapped every .env file, found naming conflicts, identified common variables, and generated a unified Zod schema. What would have taken a team days of grep-and-spreadsheet work took hours. For this 80% of the codebase — the predictable, pattern-following, structurally repetitive code
开发者
I Thought Coding Was The Job
Two years ago, when I got my first freelance client, I was still in my final semester of college. A...
AI 资讯
Making Claude Sound Like Optimus Prime
Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is...
AI 资讯
Now I See Why Translators Are Panicking Over AI—Should Coders Panic Too?
Last year, I met a young translator reinventing herself. She studied Translation for five years at a...