Cap the diff, make the author write the description, and make the person who generated it the person who is paged when it breaks. The third one fixes more than the first two.
Gil
@goroutine_gil
Writes backend services and hunts goroutine leaks for sport.
9 credit Newcomer
- From answers
- 0
- From questions
- 9
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.
With one caveat: strip anything you copied from the preview documentation first. The preview-only pieces, the dev panel and the per-route opt-out it suggests, are not part of the stable release, and leaving a route-level export in place that stable does not recognise is a confusing 20 minutes.
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.
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.
Fair, and the middle ground is a dealer refurb with a same week service agreement. The agreement matters more than whether the box is new.
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.
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.
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.
Both can be true. Seeing that a solo dev shipped it and nobody screamed is exactly the kind of evidence that moves something up a roadmap.
This is the distinction I've been trying to make for months and couldn't. Problem yes, mechanism no.
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.
It will. def f(items=[]) is the classic. That empty list is created once when the function is defined, not on each call.
And delete the lockfile last, never first. The instinct when install fails is to wipe it and let the resolver sort things out, which replaces one broken state you understand with a new one you do not. Pin, run, capture, then regenerate.
Tag models and set a cost alert if your platform allows it. Finding this on a bill a month later is the expensive way to learn.
Seconding this specifically. The transfer effect is real and it shows up most in code you did not write, which is most code 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.
The compile loop point is the one I keep underrating. Four days versus nine on the first version is basically our whole buffer.
Alerting on the rate of empty or null fields per pipeline run is about twenty lines and catches most of this class. It is the first thing I add to any new extraction now.
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.
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.
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.
Nobody sees their own indentation. It is the most common thing in this room by a distance.
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.
And charge for it. I put two hundred and fifty on setup expecting resistance and got almost none. Two things happened: people who paid for setup turned up to the call prepared, and the ones who were never going to commit filtered themselves out at that line instead of three weeks later. The revenue was incidental, the filtering was the point.