Hacker News new | ask | show | jobs
by vunderba 26 days ago
Nice job. Somewhat related, but one "AI smell" (if you can call it that) is LLMs' desire to add layers of redundant safeguards with things like null coalescing operators and defensive fallbacks so that there’s always some default value. LLMs often seem to struggle with the distinction between happy/unhappy paths and often end up treating everything as optional and "safe".

I’m a much bigger fan of surfacing problems like missing values immediately and loudly so they bubble up, particularly during early prototyping and development.

I’ve collected a set of best practices in my AGENTS.md that covers issues like this, and that’s helped a fair bit. Obviously, you want to offload as much as possible to a deterministic linter, but this pattern is a bit tougher to catch in post.

1 comments

Happy to share your AGENTS.md?
Sure. I have about half a dozen that I use in rotation depending on the language, project, etc., but this one is probably my most common for web development.

https://gist.github.com/scpedicini/1407c776b82945b723199a91a...