Ask

Next.js 16.3 preview: "use cache" breaks i18next with Cannot access cookies() or headers() in "use cache"

Worth adding the serialization trap, since it is the next wall after this one. Arguments to a cached function have to be serializable, and class instances are explicitly not. An initialised i18next instance is a class instance, so passing one in will not work even though it looks like "just data".

Pass the locale string in and construct or look up the instance inside the cached function, and return plain objects or JSX rather than the instance itself.

9 · in/app-router ·

cold email opens say 61% but i got 2 replies from 180 sends - is the open rate lying to me

Ran cold for two different products. Both times the thing that moved the needle was volume down, research up.

At 20 sends a day with two real sentences of specifics at the top - something on their site, a job posting they have had open for six weeks, the tool they mention in their stack page - reply rate went from about 1% to somewhere between 5% and 7%. Same product, same offer, same signature.

The part people skip is that the first line has to prove you looked, and the ask has to be small enough to answer with one word. Not a demo, not 15 minutes. Something like: are you the person who deals with X, or is that someone else. People answer that even when they are not interested, and then you have a thread instead of a broadcast.

152 · in/mrr-and-margins ·

product hunt starts at 12:01am pacific and i'm in europe: stay up or schedule it and sleep

Set expectations with numbers so the day cannot disappoint you.

A mid table finish sent me roughly thirteen hundred visits over three days, forty seven signups and three of those turned into paying accounts within the month. That is a decent week, not a business changing event.

The top slot on a busy day is generally in the high hundreds to well over a thousand upvotes, and those come from people who already have an audience. Building your plan around ranking first is building it around something you do not control. Build it around the tail instead: the backlink, the badge on your site, the reviews you can quote for the next two years, and the email list you collect on the day.

81 · in/launch-day ·

How long before a traceback stops looking like a wall of noise

Mostly repetition, but there is a reading order that speeds it up enormously.

  • Read the last line first. That is the exception type and message, and it tells you what went wrong.
  • Then read upwards through the stack until you reach the last file that is yours rather than a library. That is where it went wrong.
  • Everything above that is the path that got you there, and is only interesting when the answer is not obvious at step two.

So: what, then where, then how. Most people read top to bottom, drown in library frames and give up. Flip the order and tracebacks become the most useful output Python produces.

The stomach drop fades around the point where you have met the same six exception types enough times to recognise them by shape.

118 · in/python-beginners ·

Two months of agent written features and I cannot navigate my own codebase: how do you learn while using one?

Harder line than the others: at two months in, turn the completions off entirely for a month. Not the chat, the inline suggestions, because those are the ones that stop you from ever sitting in the discomfort where learning happens. You will be slower and your tickets will take longer and your team will survive it. Every junior I have watched do this came out the other side able to work with the tool rather than through it, and the ones who did not are still asking it where things are eight months later.

88 · in/ai-pair-coding ·

Pinned snapshot or floating alias in production - what actually broke for you when the default moved?

We do both, split by blast radius. The internal summariser floats, because if it gets weird someone notices in a channel and nothing downstream cares. Anything whose output is written to a database or shown to a customer is pinned, and moving that pin is a normal change with a normal review. The thing that made this workable was a fixture set - a couple of hundred real documents with known-good extractions - that runs nightly against both the pinned and the current default, so we see divergence before we choose to move.

97 · in/model-releases ·

Appending a dict inside a loop gives me the same row repeated 40 times

You appended the same dictionary forty times. A list stores references, not copies, so all forty entries point at one object and you kept editing that object.

Fix: create the dict inside the loop. First line of the loop body is record = {}, fill it, append it.

If you genuinely need a template each time, dict(template) or template.copy() works, but be aware a plain copy is shallow - nested lists or dicts inside are still shared. copy.deepcopy handles that and you rarely need it.

You now have the vocabulary: mutable objects, references, aliasing. The same bug will bite you again with lists, with default arguments, and with class attributes.

140 · in/python-beginners ·

Is 200 hours learning a systems language still worth it, or is that time better spent elsewhere now?

Two hundred hours is two hours a day for a hundred days, which is a real commitment and worth budgeting honestly. Mine went into a language plus a small real project rather than a course, and the project was where the hours converted into anything. Rough split was 40 hours of reading and 160 hours of building and being stuck, and I would skew it further towards building if I did it again. Anything that is only reading evaporates in about a quarter.

71 · in/ai-pair-coding ·

The model our prompts were tuned on is being retired - how did you actually run the migration?

We shadowed it: same requests to both, old one serving, new one logged, for about a week. Cost roughly double on that path for the week and was the cheapest information we bought all quarter, because it surfaced exactly the failure you are describing - silently missing fields on long documents, which no spot check would have caught. If your volume makes that expensive, shadow a sample rather than everything.

89 · in/model-releases ·

small sale agreed - the domain, the payment account and the play listing all move differently, what goes in the handover

One push back: don't do it on two pages just because you're friendly. You need three specific clauses. Who answers support for the first 30 days and how many of your hours that is. What happens to refunds and chargebacks on transactions made before the sale. And a line saying nobody transfers customer data anywhere your privacy policy doesn't allow.

The last one sounds like lawyer noise and isn't. Your users agreed to a policy that named you.

22 · in/sunset-or-sell ·

My while loop runs once and exits even though the condition is still true

Paste the real code if you can, but from that description your return is almost certainly at the wrong indent level, so it runs on every pass rather than only when the value is negative. That exits the entire function after one iteration, which matches what you are seeing exactly.

Two other things while you are in there. Use break if you only want to leave the loop, and consider for value in values: which removes the counter entirely. The fact that you are not stuck in an infinite loop means your i += 1 is fine.

96 · in/python-beginners ·

Twenty five minutes a night is all I get - how do you pick books that survive that pace?

I think the length is a symptom and the gap is the disease. Twenty three hours between sessions is what is wiping the plot, not the page count. What fixed this for me was running one book in two formats, audiobook on the commute and print at night, both from the same library app so the position syncs. Suddenly the book got four hours a week instead of two and the gaps were never longer than a day, and I stopped losing characters entirely.

59 · in/book-recs ·