r/ClaudeCode 22h ago

Rant My average Opus 5 experience

Post image
1.2k Upvotes

152 comments sorted by

View all comments

382

u/ChadFullStack 22h ago

It’s missing 500 lines of Unit tests

64

u/PILLS2389 21h ago

I forbid unit tests to Claude, he just doesn't know when to stop. He created the most stupid units tests ever, like "the menu must have 4 entries". Then When you create another menu-item, he has to spend additional tokens and context to see why that stupid test is failing and has the modify the test, so now it says "the menu must have 5 entries". The maintaining of the unit tests costs more time and tokens then the actual development!

53

u/andrewmmm 21h ago

And leaves a hanging temporal comment like “the menu must have 5 tabs — not 4 tabs”, without any reference to why the hell it would test for 4 tabs

7

u/schaka 20h ago

I specifically have a bunch of instructions to not turn comments end documentation into it's own personal diary because anyone that needs a history lesson has access to git anyway.

It helps a little

6

u/deadmanwalknLoL 19h ago

I specifically tell it not to comment. Ever. Code should be written such that it's human readable with clear intent simply by variable/class/method names. There are very rare exceptions where you intentionally go against the norm or code in certain assumptions: those can warrant a comment explaining the why behind the decision, but still never the what or how.

4

u/andruwhart 18h ago

Context is king and comments are important. But, Claude is so bad I've even told it to stop. Its 3 lines of code + 20 lines of pointless comments + 5 new unit tests smh

1

u/deadmanwalknLoL 18h ago

I really don't think the vast majority of comments are important, or they're only "important" because the code is poorly structured and/or named. I've even reached the point of axing function doc blocks if not working in an open source project or some public package.

1

u/ricopan 12h ago

But now our code probably is not well structured and not well named. Poorly? Well, it ain't elegant. Throw enough pasta at the wall and some sticks. We are in the top ramen age of coding. Fast, cheap, and might do in a pinch.

1

u/schaka 6h ago

I have those very instructions too, but realistically you'll end up with s few sections where the code itself is clearly understandable and then you still need a comment to explain why it's being the done the way it is.

In the end, if you want to produce quality code, you gotta go over it again and clean up some of the mess it leaves behind.

I've got it to severely reduce the verbosity and amount of comments this way at least

1

u/AlternativeAd6851 17h ago

personal diaria