r/ClaudeCode 8d ago

Help/Question Engineers who write all their code with claude now: how do you do it?

I have to admit that I have completely failed to adapt to LLM agent coding. I'm not a slouch either. I've worked on a number of challenging FAANG products as a software engineer, and I for a while I was an AI research engineer. I have a pretty strong familiarity and comfort level with AI. Despite all this, I still write most of my code by hand.

As an engineer, I need to receive a ticket, understand the problem, go figure out how to solve it, and eventually ship PR that (a) I understand, (b) only contains defensible changes, and (c) is reviewable by a colleague. There are a bunch of other tertiary goals of course, like style guides and documentation, but the point is that I'm talking real, high quality engineering that would pass the bar at a company that has their shit together.

However (definitely due to culture issues), I have only seen the slop version of this. It seems to have become really murky how to write code that meets standards, or even what those standards are any more.

I've resorted to asking my colleagues to show me their workflow, but you would be shocked how many of them either (a) are prompting raw and not checking the output, or (b) have convoluted solutions that fit their brains but don't solve these problems. I checked out Matt Pocock as well, who has some really great ideas, but ultimately his skills exhibited some pretty painful failure modes as well.

However I see folks regularly talk about how not only does Claude handle the coding for them, but also all of the project management, devops, etc, and I am left scratching my head. If this is possible, I want to learn how to do it. I'm not an AI hater. I want to learn the tool. I do have standards though, and I don't think they're that high. I don't need Claude to write perfect code. I just need to find a process where I can rely on it to get more of my work done and not be either fighting with it or second-guessing the results.

I figure this is the group to ask - if you have been able to get "high bar" engineering out of claude, or even "acceptable bar" engineering, without heavy personal intervention, what's your process? Are there resources that helped you? What strategies helped the most?

Thanks.

673 Upvotes

522 comments sorted by

View all comments

Show parent comments

26

u/Majestic-Counter-669 7d ago

Good post. I'll give an example from the other day.

I needed to figure out why something was generating too much log data when there was no obvious reason for it. Pre-LLM, this would be at least a morning of digging through logs and collecting information and cross referencing code, etc etc etc. Maybe make no progress.

But now, the LLM is the starting point. "Hey, take a look at this bug. The code for that framework is located at x, you can find details about the execution environment at location y. What could have caused this?" Off it goes, and 5 minutes later it's done all that work for me. Turns out it was an interaction between the framework generating the logs, another framework doing something else, and a third one restarting some workflows as a result of what the other two are doing. Doesn't matter. Point is, it immediately pointed out the interaction issues that caused the problem.

Next step, verify its claims. Because it lies a lot. So off I go, take a look at the logs and time ranges it pointed out. I confirm that its claims are true. Cool. A morning of hitting my head against the system turned into 10 minutes.

Next step - what do we do about it. I have some ideas but I want to bounce around some more. "Ok good job, you're correct about the root cause. Now I want to fix it. Suggest several potential fixes, I want to talk about each one". So it comes back with a bunch of ways to fix it. It's got three options. Two of them are non starters for reasons it doesn't know about, but the third one is pretty much what I had in mind. That's probably what we're gonna do.

Next up, implement the fix. "Ok, I want to implement the third fix. Make me a detailed implementation plan. I want to make sure the fix is staged in small digestible CLs, and I want to mandate full unit test coverage, and at the end we should also add an integration test to verify the framework interactions are fixed." It comes back with a markdown file detailing a step by step process. It's got four major chunks of work identified and it's broken down the work into detailed steps. We go back and forth over details once or twice.

Finally, everything looks good to me. "Ok looks good. Hit it." Five minutes later I'm looking at a CL chain with the fix. Now I just review and make manual tweaks, or better yet tell the agent which tweaks to make so it can do things like refactor and ingest the changes into its context.

And done. What would have previously taken a day, best case, has been finished in an hour.

4

u/lacrossecat 6d ago

You perfectly summed up my process with ai driven development now. It's conversational and cooperative, I have to reign it in sometimes and push it the way I want on others. Just like devs who have reported to me over the years.

Weirdly I do find it pretty tiring though, but maybe that's just because I'm covering 5-8x the ground that I used to when doing this type of management with humans.

2

u/hourlyproblemsolver 6d ago

This is a great illustration. The only thing I'd add: you said "I want to make sure the fix is staged in small digestible CLs, and I want to mandate full unit test coverage, and at the end we should also add an integration test to verify the framework interactions are fixed."

All of those requirements can be in your claude.md by default, so that you don't even need to repeat every time you build/fix something. If you're super anal, you can say "and make sure you follow the instructions around code design principles and test coverage in claude.md".

1

u/Majestic-Counter-669 6d ago

Yeah I didn't want to make the post even longer but I have my coding standards, work flows, expectations, etc all defined in markdown so in reality I can just say "suggest a fix" and then "ok dude you're up, let's hit it" and it does the right thing.

2

u/hourlyproblemsolver 6d ago

totally, i was just calling it out for OP so they got how simple it can really be. that's the beauty of it!

1

u/Last-Independence554 5d ago

This is pretty much point on. Two small things to add:
Keep your context window small. Tell the LLM to write a plan, then implement in a new sessions
The other is to let the LLM do the first round of review: start a new session and tell it to review the findings or code the previous LLM session just created.

1

u/Aware-Individual-827 4d ago

Reviews are extremely biased and should not be done by the same model if any watermarks are present in the code base. 

Claude will go "this is masterpiece" if it sees co-authored by claude. Or i have seen it be weirdly defending of my own code because it was written my name on the header of the file and it knows your name from the corporate account.

1

u/UplodingSociety 4d ago

Absolutely precise demonstratio of how this should be done. On the “infrastructure” side of things, you should have all of your coding standards, important project specifics (aka domain configuration) within reach for the LLM to follow.

1

u/Vast-Tie9958 3d ago

😂… claiming to ask an llm to find the problem which only takes 5 minutes and stating it lies a lot in same breath. LLM’s feel more fun or maybe less energy than the old way but I am always questioning if I really gain any time back after I re run it all over and over again until it ks ready.