News for hackers. Stuff that matters.
Re:Claude 3.7 Sonnet and Claude Code by epistasis on Monday February 24, 2025 @03:02PM (#43164232)
It's pretty fascinating to refresh the usage page on the API site while working [0].

After initialization it was up to 500k tokens ($1.50). After a few questions and a small edit, I'm up to over a million tokens (>$3.00). Not sure if the amount of code navigation and typing saved will justify the expense yet. It'll take a bit more experimentation.

In any case, the default API buy of $5 seems woefully low to explore this tool.

[0] https://console.anthropic.com/settings/usage

Re:Claude 3.7 Sonnet and Claude Code by koakuma-chan on Monday February 24, 2025 @03:02PM (#43164249)
It also produces terrible code even though it's supposed to be good for front-end development.
Re:Claude 3.7 Sonnet and Claude Code by trekkie1024 on Monday February 24, 2025 @03:07PM (#43164305)
Could you share an example?
Re:Claude 3.7 Sonnet and Claude Code by koakuma-chan on Monday February 24, 2025 @03:21PM (#43164474)
TLDR: told it to implement a grid view as an alternative to the existing list view, and specifically told it to DRY the code. What it did? Copy and pasted the list view implementation (definitely not DRY), and tried to make it a grid, and even though it is a grid, it looks terrible (https://i.imgur.com/fJiSjq4.png).

I don't understand how people use cursor and all that other shit when it cannot follow such simple instructions.

Prompt (Claude Code): Implement an alternative grid view that the users can switch to. Follow the existing code style with empty comments and line breaks for improved code readability. Use snake case. DRY the code, avoid repetition of code. Do not change the font size or weight.

Output: https://github.com/mayo-dayo/app/compare/0.4...claude-code-g...

Re:Claude 3.7 Sonnet and Claude Code by koakuma-chan on Monday February 24, 2025 @03:27PM (#43164549)
It also keeps adding aspect-ratio to every single image it finds in my code base.
Re:Claude 3.7 Sonnet and Claude Code by koakuma-chan on Monday February 24, 2025 @03:33PM (#43164621)
Also this: `grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6` (https://github.com/mayo-dayo/app/blob/463ad5aeee904289ecc7d4...).

Even though my Layout clearly says `max-w-md` (https://github.com/mayo-dayo/app/blob/463ad5aeee904289ecc7d4...).

Re:Claude 3.7 Sonnet and Claude Code by sensanaty on Monday February 24, 2025 @04:39PM (#43165259)
In any moderately sized codebase it's basically useless indeed. Pretty much all the praise and hype I ever see is from people making todo-list-tier applications and shouting with excitement how this is going to replace all of humanity.

Hell, I still have to remind it (Cursor) to not give me fucking React a few messages after I've already told it to not give me React (it's a Vue application with not a single line of React in it). Genuinely maddening, but the infinite wisdom of the higher ups forces me into wasting my time with this crap

Re:Claude 3.7 Sonnet and Claude Code by pityJuke on Monday February 24, 2025 @05:28PM (#43165699)
There's a middle ground, I find.

Absolutely, when tasked with something quite complex in a complex code base, it doesn't really work. It can get you some of the way there, and some of the code it produces gives you great ideas on where to go from, but it doesn't work.

But there are certainly some tasks where it excels. I asked it to refactor a rather gnarly function (C++), and it did a great job at decomposing it. The initial decomposition was a bit naive: the original function took in a vector, and would parse what the function & data from the vector, and the decomposition split out the functions, but the data still came in as a vector. For instance, one of the functions took a filename, and file contents, and it took it as element 0 and element 1 from a vector, when it should obviously be two parameters. But some further prompting and it took it to the end.

Re:Claude 3.7 Sonnet and Claude Code by epistasis on Monday February 24, 2025 @05:24PM (#43165650)
Claude's predilection and evangelism for React is frustrating. Many times I have used it as search with a question like "In the Python library X how do I do Z?" And I'll get a React widget that computes what I was trying to compute.
Re:Claude 3.7 Sonnet and Claude Code by mrcwinn on Tuesday February 25, 2025 @10:28AM (#43173133)
I have the opposite experience. I'm incredibly produce with 3.5 in Agent/Composer mode. I wonder if it's something to do with the size of the Vue community (and thus the training data available) versus React.
Re:Claude 3.7 Sonnet and Claude Code by fragmede on Tuesday February 25, 2025 @04:28AM (#43169840)
Points for being specific with it's shortcomings! Expecting it to get it in one shot isn't how to work best with them. It takes some cajoling and at this point in time, sometimes it is still faster to do it the old fashioned way of you already know what you're doing.
Re:Claude 3.7 Sonnet and Claude Code by epistasis on Monday February 24, 2025 @05:22PM (#43165625)
Update: Code tokens appear to be cheaper than 3.7 tokens, looks like it is around $0.75/million tokens for code, rather than the $3/million that the articles specifies for Claude 3.7
Re:Claude 3.7 Sonnet and Claude Code by hectormalot on Monday February 24, 2025 @07:13PM (#43166537)
Likely because it is blended with cached token pricing, which is at $0.30/million. You can use ‘group by’ in the usage portal to see the breakdown.
Re:Claude 3.7 Sonnet and Claude Code by epistasis on Tuesday February 25, 2025 @12:20AM (#43168454)
Thanks, that's it. It's almost entirely "Prompt caching read."
Re:Claude 3.7 Sonnet and Claude Code by ChrisRob on Monday February 24, 2025 @07:26PM (#43166632)
I second that. Did a little bit of local testing with Claude Code, mostly explaining my repository and trying to suggest a few changes and 30 minutes later whoosh: 5$ gone.