You build an AI feature. The model takes eight seconds to write the full answer. You show a spinner for eight seconds, then the whole answer appears at once.
Technically it works. Your users think it is broken.
Open any chat product you like and wa...
The endpoint was fast in development. In production it takes two seconds, and it gets slower every week.
So you do what most of us do. You add .lean. You add an index on a field that sounds important. You wonder if the server is too small. Maybe the...
AI-generated code has a particular way of failing. It does not look broken. It is neatly formatted, well named, commented, and the happy path works on the first run.
That is exactly the problem. When code looks this confident, we review it less care...
You ship an AI feature on Friday. It works. People like it.
On Monday you open the billing page and the number is ten times what you expected. Nobody attacked you. No server was hacked. One user pasted a book into the input box, another found a butt...
You add an AI feature to your support tool. It reads each incoming ticket, writes a summary, and can issue a refund when the customer is clearly owed one. The demo is great. Everyone is impressed.
Then a customer submits a ticket that says:
> Ignor...
Here is a type you have probably written:
type UserState = {
isLoading: boolean;
error?: string;
data?: User;
};
It looks reasonable. Then one day your UI shows a spinner on top of an error message, and a user stares at a screen that says bo...
Coverage says 94%. Every test is green. You deploy on Friday afternoon, and by Monday a customer has found a bug in the exact function you "tested".
When you open the test, the reason is obvious in hindsight. The test never ran your code. It ran a f...
A user fills in your form and clicks "Create post". The post is saved in the database. And the page shows "Could not create post".
They try again. Now there are two posts.
Nothing is wrong with your database. Your error handling caught something it...
Here is a pattern I see in almost every React codebase I read:
const fullName, setFullName = useState'';
useEffect => {
setFullNamefirstName + ' ' + lastName;
}, firstName, lastName;
It works. It also renders twice every time a name changes, sh...
You notice it during a code review: .env is in the repository. Your stomach drops. You run git rm .env, commit with the message "remove env file", push, and feel the relief of a problem solved.
It is not solved. The file is gone from your latest com...
You upgrade from Next.js 14 to 15. The app compiles, the tests pass, nothing visibly breaks. A week later your database bill is higher, your pages feel slower, and your Time to First Byte graph has a step in it that lines up exactly with the deploy.
...
A user scrolls through your feed. Page 1 ends with "Post 20". They tap "Next", and page 2 starts with... "Post 20" again.
Another user pages through an admin table and never sees order #4817. It exists. It is in the database. It just never showed up...
A customer clicks "Pay now". Nothing happens for three seconds, so they click again. Or their phone loses signal for a moment and the app quietly retries the request. Or your load balancer times out and sends the request again.
Your server received ...
You need a theme provider, so you create a file, add 'use client' at the top, and wrap your app in it.
Then a nagging thought arrives: "I just wrapped my entire layout in a client component. Did I turn the whole app into client-side React?"
Most de...
Your stomach drops. You typed git reset --hard, or deleted the wrong branch, or a rebase ended with half your commits missing. The log looks empty. Three days of work, gone.
Take a breath. If you ever committed that work, it is almost certainly stil...
You build a dashboard. Sidebar on the left, content on the right, a table or a code block inside. It looks perfect with your sample data.
Then a user pastes a long URL into a field, and the whole page grows a horizontal scrollbar. The sidebar gets s...
You format a date in a component. It looks right on your laptop. Then a user in another country opens the page and either sees a console full of hydration errors, or worse, sees nothing wrong at all and reads the wrong time.
I live in a timezone tha...
Your endpoint sends 50 emails, marks 50 orders as shipped, and returns { success: true }.
In your tests, it works. In production, the response comes back in 8 milliseconds, half the orders are still pending, and one failed email crashed the whole No...
TypeScript's most dangerous keyword is two letters long.
as does not convert anything. It does not check anything. It tells the compiler "trust me", and the compiler does. If you are wrong, the error moves from your editor to your users.
Here are f...
You add a small search box to your navbar. It reads the query string, so you reach for useSearchParams. Everything works in next dev. You push, the deploy fails, and the build log says:
useSearchParams should be wrapped in a suspense boundary at pag...