Code Review Best Practices: How to Catch the Bugs Outside the DiffBy default, git diff shows three lines of context around every change. That's the window most code reviews happen through. Three lines is plenty to catch a typo, an off-by-one, or a confusing name. It22h ago · 10 min readsimplyexplained.hashnode.dev
Detecting Truncated LLM Output: finish_reason, stop_reason and the max_tokens TailThis is the shape of the line most tutorials use to read a model's answer: text = response.content[0].text It reads the answer. It never asks whether the answer is finished. And the responses where t1d ago · 10 min readsimplyexplained.hashnode.dev
The XY Problem Got Worse With AI. Here's the Prompt Habit That Fixes It.Here's a question that has been asked on programming forums thousands of times, in one form or another: How do I get the last three characters of a filename? The answer is easy: ext = filename[-3:] 2d ago · 11 min readsimplyexplained.hashnode.dev
Money Rounding Errors: Allocate the Remainder, Don't DivideHere's a query worth running against your production database this week: -- Orders whose installments no longer add up to the order total SELECT o.id, o.total_minor, SUM(i.amount_minor) AS installment11A4d ago · 11 min readsimplyexplained.hashnode.dev
Why AI Coding Assistants Suggest Deprecated APIs (and How to Stop It)Same seven code models. Same eight Python libraries. Same 145 deprecated APIs. In one setup, the models reached for the deprecated API in 70 to 90 percent of the relevant completions. In the other, 9 4d ago · 9 min readsimplyexplained.hashnode.dev