HACKER Q&A
📣 stuartjohnson12

New software engineering heuristics for agentic coding


As I've transitioned to writing a lot of new code with Claude via Cursor, I've noticed myself following new heuristics for how to progressively add complexity to a new feature or edit a part of the codebase while respecting context window limits and Claude's capability levels.

When I wanted to become a better software engineer, I studied concepts like encapulisation, separation of concerns, composition over inheritance, modular vs OOP, and the like. It seems to me like there's a void right now of new heuristics needed to fill in the right and wrong way to code with agent assistance. I've found myself falling into and then correcting new types of anti-pattern as I improve.

One example I've noticed is that because Cursor doesn't access the internet by default, its knowledge of libraries is limited to what's in the training data. From the perspective of a software engineer, oftentimes the fastest way to get something working is to have Claude write the code itself, but usually this code has not considered all edge cases, and so if you don't assist Claude in choosing libraries, you'll eventually be caught in a fatal pinch of trying to cover all edge cases in the library code you've reproduced.

I'm not sure how to describe this in words, but I always inspect the diffs when using composer, and oftentimes find myself remarking "that looks like the kind of thing that shouldn't be in my codebase" and finding the correct library to use instead.

If I am instructing a software engineer using Cursor for the first time, that's one of the anti-patterns that look outwardly tempting I'll point out - kind of like how new programmers tend to over-abstract when they discover classes for the first time.

Probably the first step here is for someone more skilled than myself to write a sophisticated essay on the matter. I'd love to read one, and I've looked, but it doesn't exist.

So for now, I'd love for people to share the most important software engineering lessons they've learned from making substantial use of Cursor and similar editors.


  👤 codingdave Accepted Answer ✓
This sounds really simple to me - Claude doesn't produce code that meets your standards. So stop running under the assumption that it should. Use it for whipping up simple code where it does a decent job, and do it yourself in areas where AI does not suffice.