Live data from Hacker News

Claude Code: Best practices for agentic coding

anthropic.com

251–260 of 268 posts

Re: Claude Code: Best practices for agentic coding

#251

Earlier quoted context omitted.

That's awesome, and almost certainly an Unreal Tournament reference (when you chain enough kills in short time it moves through a progression that includes "megakill" and "ultrakill").

Ultrakill is from Quake :)

It is not. Quake had "Excellent" for two kills in short succession, but nothing else if you chained kills after that.

Re: Claude Code: Best practices for agentic coding

#252
post #204

Earlier quoted context omitted.

Don’t be a dismissive dick; that’s not appropriate for this forum. The above post is clearly trying to engage thoughtfully and offers genuinely good advice.

The above post produces some vague philosophical statements, and equally vague "juts google it" claims.

I’m thinking you might be a kind of person that requires very direct feedback. Your flagged comment was unkind and unhelpful. Your follow-up response seems to suggest that you were justified in being rude?

You also mischaracterize my comment two levels up. It didn’t wave you away by saying “just google it”. It said — perhaps not directly enough — that your comment was off track and gave you some ideas to consider and directions to explore.

Re: Claude Code: Best practices for agentic coding

#253

Earlier quoted context omitted.

Damn that's interesting. How much of the code do you provide? I'm guessing when modularity is high you can give specific files.

Gemini's context is very long, so I can feed it full files. I do the same with Claude, but I may need to start from scratch various times, so Gemini serves as memory (and is also good that Gemini has almost no hallucinations, so it's great as a code reviewer for Claude's edits).

Yeah right now I just dump entire files at it too. After 100-200k tokens I just restart. Not because the LLM is hallucinating (which it is not) but I like the feeling of treating each restart as a new feature checkpoint.

Re: Claude Code: Best practices for agentic coding

#254
post #150
post #56

Earlier quoted context omitted.

Oh wow. Reading your comment guarantees I'll never use Claude Code. I use Aider. It's awesome. You explicitly specify the files. You don't have to do work to limit context.

With Claude Code you can at least type "/code" at any point to see how much it's spent, and it will show you when you end a session (with Ctrl+C) too. The output of /cost looks like this: > /cost ⎿ Total cost: $0.1331 Total duration (API): 1m 13.1s Total duration (wall): 1m 21.3s

Aider shows how much you've spent after each command :-). It shows the cost of the command as well as the session.

Re: Claude Code: Best practices for agentic coding

#255
post #127
post #56

Earlier quoted context omitted.

Oh wow. Reading your comment guarantees I'll never use Claude Code. I use Aider. It's awesome. You explicitly specify the files. You don't have to do work to limit context.

>I use Aider. It's awesome. What do you use for the model? Claude? Gemini? o3?

Currently using Sonnet 3.7, but mostly because I've been too lazy to set up an account with Google.

Re: Claude Code: Best practices for agentic coding

#256

Why do people use Claude Code over e.g. Cursor or Windsurf?

I have not yet used Claude Code personally, but I believe that Cursor and Windsurf both optimize token usage by limiting how much of your code each prompt analyzes.

With Claude Code, all bets are off there. You get a better understanding of your code in each prompt, and the bill can rack up, what, 50x faster?

If I got really stuck on a problem involving many lines of code, I could see myself spinning up Claude Code for that one issue, then quickly going back to Windsurf.

Re: Claude Code: Best practices for agentic coding

#257
post #127

Earlier quoted context omitted.

>I use Aider. It's awesome. What do you use for the model? Claude? Gemini? o3?

Currently using Sonnet 3.7, but mostly because I've been too lazy to set up an account with Google.

Get an Openrouter account and you can play with almost all providers, I was burning money on Claude, tried V3 (blocked Deepseek provider for being flaky, let the laypeople mock them) and experimental and GA Gemini models.

Re: Claude Code: Best practices for agentic coding

#258
post #56

Surprised that "controlling cost" isn't a section in this post. Here's my attempt. --- If you get a hang of controlling costs, it's much cheaper. If you're exhausting the context window, I would not be surprised if you're seeing high cost. Be aware of the "cache". Tell it to read specific files (and only those!), if you don't, it'll read unnecessary files, or repeatedly read sections of files or even search through f…

Oh wow. Reading your comment guarantees I'll never use Claude Code. I use Aider. It's awesome. You explicitly specify the files. You don't have to do work to limit context.

After switching to Aider, I realized the other tools have been playing elaborate games to choose cheaper models and to limit files and messages in context, both of which increase their bills.

Re: Claude Code: Best practices for agentic coding

#259
post #252
post #204

Earlier quoted context omitted.

The above post produces some vague philosophical statements, and equally vague "juts google it" claims.

I’m thinking you might be a kind of person that requires very direct feedback. Your flagged comment was unkind and unhelpful. Your follow-up response seems to suggest that you were justified in being rude? You also mischaracterize my comment two levels up. It didn’t wave you away by saying “just google it”. It said — perhaps not directly enough — that your comment was off track and gave you some ideas to consider and…

> There is high quality writing on this to be found. I recommend reading literature reviews on evals.

This is, quite literally, "just google it".

And yes, I prefer direct feedback, not vague philosophical and pseudo-philosophical statements and vague references. I'm sure there's high quality writing to be found on this, too.

Re: Claude Code: Best practices for agentic coding

#260
post #132

Earlier quoted context omitted.

So, AIs are overeager junior developers at best, and not the magical programmer replacements they are advertised as.

The grandparent is talking about how to control cost by focusing the tool. My response was to a comment about how that takes too much thinking. If you give a junior an overly broad prompt, they are going to have to do a ton of searching and reading to find out what they need to do. If you give them specific instructions, including files, they are more likely to get it right. I never said they were replacements. At be…

> If you give a junior an overly broad prompt, they are going to have to do a ton of

> they're tools that are incredibly effective when used on the correct type of problem with the right type of prompt.

So, a junior developer who has to be told exactly what to do.

As for the "correct type of problem with the right type of prompt", what exactly are those?

Post reply on HN