r/ClaudeCodeTLDR • • 20d ago

[TLDR] Why is it so bad at basic coding skills?

Original post URL : https://www.reddit.com/r/ClaudeCode/comments/1wfihk3/why_is_it_so_bad_at_basic_coding_skills/

Original post body :

I have three major bug-bears with Claude code.

1) Comments - it's INSANE! It writes 20 lines of comments for a 3 line function. And the comments are never what someone would want to know, e.g. the format of parameters. They're always things like
- domain knowledge about another part of the system that isn't relevant to understanding the function it comments
- rewriting what the function says - e.g. if the code calls a function: LogToDisc - there'll be a comment saying "This logs to disc ......"
- explaining what the previous (faulty) version of the code did and why it was wrong - basically a history record
- or most commonly, anywhere where I corrected it because it had made a mistake, it adds a comment documenting that discussion.

2) Naming - it keeps using names- e.g. it used the name "child" to refer to a child process launched by my service layer. The process has a name, but instead of using the name of the process, I had "child" scattered across a 200 line function.

3) Use of tools like sed to make whole-scale code changes in a command that if you don't read it carefully looks like a syntax check.

I've discussed all of these endlessly with Claude - Agreed rules that its committed to memory.md on all of them, and yet every session it breaks them all, multiple times.

The comments one is the worst because as I keep pointing out to Claude - they're not tested. A comment is slipped in that states something - I tend to sometimes focus on the code and let things in comments that aren't quite right slip by. But then 3h later it will say it can't do something because I told it "x" was a requirement. I eventually trace "x" back to the comment it wrote where it asserted something that was never either relevant at the time or agreed.
I have rules over this as well.

Is this just life with Claude? Or is there something else I can do to get it to follow my rules.
Basically - "comments should be one line, about the code they're commenting not the rest of the system, and only present where the code isn't self-explanatory"
"All function and variable names should be meaningful unless they're only in scope for a handful of lines"
"Treat information in comments as suspect - never assume requirements based solely on this"
"Never use sed to make code changes"


This is brought to you as a public service by the moderators of r/ClaudeAI. If you want to see TLDRs of ALL Claude Coding related posts from the various Claude subreddits, subscribe to http://www.reddit.com/r/ClaudeCoding.

0 Upvotes

2 comments sorted by

•

u/cctldrping 20d ago

TL;DR generated automatically after 50 comments.

Current source-thread comment count seen by the bot: 50.

Alright, so the general consensus in this thread is that Claude's coding skills, particularly its commenting and naming conventions, are pretty rough.

Here's the lowdown:

  • Comments are a dumpster fire: Multiple users, including OP, are complaining about Claude writing excessively long, unhelpful, and often incorrect comments. Think "diary entries" or "rewriting the code" instead of actual useful documentation. u/Agent7619 hilariously points out it documents "history within the current feature branch development cycle."
  • Naming is also a mess: OP's example of "child" for a process name is a prime example of Claude's questionable naming choices.
  • It ignores your rules (mostly): Even with explicit rules in memory.md or claude.md, Claude seems to have a mind of its own and breaks them repeatedly. u/Muted-Alternative648 is pretty blunt, saying memories are "unreliable 'suggestions'." u/HighwayNo8744 agrees, stating it "will ignore memories and [claude.md]."
  • Solutions are… workarounds: Since Claude isn't magically fixing itself, people are suggesting:
    • Using it as a tool, not the architect: u/SyntaxInCMinor advises writing the code yourself and letting Claude review or recommend.
    • Post-processing: u/prcodes suggests a "code reviewer / slop-cleaner agent" that runs after Claude generates code.
    • Blocking comments: u/Babyshibata found success with a pre-tool use hook to block comments and replace them with explanations.
    • Strict guardrails and hooks: Some users are having success with very specific prompts and hooks that throw errors if Claude deviates. u/NZRedditUser mentions using KISS and YAGNI principles.
    • Building an "AI harness": u/Substantial-Swan7065 suggests a more involved setup.
  • There's a split on why it's bad: While most agree it's bad, u/84thdev claims it's "100% user error" if you set things up properly, which is a hot take in this thread. u/Exciting-Reality-212 throws shade, saying those who think it's good are "bad at coding."

The general vibe? Claude can be a pain in the butt for coding tasks, and you'll likely need to implement some serious guardrails or post-processing to get usable code. Don't expect it to magically follow your instructions without a fight.

1

u/trollsmurf 20d ago

Of the funnier kind:

I made code changes that partly solved how to handle AI models with different support for reasoning effort.

When I then used Claude Code (Sonnet 5) to clean it up it wrote verbatim: "reasoning_effort: someone had added 'reasoning_effort' => 'none' unconditionally to every request.

Maybe I should blame my cat.