Live data from Hacker News

Claude Sonnet 4 now supports 1M tokens of context

anthropic.com

381–390 of 706 posts

Re: Claude Sonnet 4 now supports 1M tokens of context

#381

Earlier quoted context omitted.

What kind of security issues are you thinking about? I'm generating UI components like Selects for certain data types or Charts of data.

User input is a notoriously thorny area. If you aren't sanitizing and checking the inputs appropriately somewhere between the user and trusted code, you WILL get pwned. Rails provides default ways to avoid this, but it makes it very easy to do whatever you want with user input. Rails will not necessarily throw a warning if your AI decides that it wants to directly interpolate user input into a sql query.

Well in this case, I am reading through everything that is generated for Rails because I want things to be done my way. For user input, I tend to validate everything with Zod before sending it off the backend which then flows through ActiveRecord.

I get what you're saying that AI could write something that executes user input but with the way I'm using the tools that shouldn't happen.

Re: Claude Sonnet 4 now supports 1M tokens of context

#382

Earlier quoted context omitted.

My workflow is to use Claude desktop with the filesystem mcp server. I give claude the full path to a couple of relevant files related to the task at hand, ie where the new code should hook into or where the current problem is. Then I ask it to solve the task. Claude will read the files, determine what should be done and it will edit/add relevant files. There's typically a couple of build errors I will paste back in…

I've been using it the same way. One approach that's worked well for me is to start a project and first ask it to analyse and make a plan with phases for what needs to be done, save that plan into the project, then get it to do each phase in sequence. Once it completes a phase, have it review the code to confirm if the phase is complete. Each phase of work and review is a new chat. This way helps ensure it works on m…

I find that sometimes this works great and sometimes it happily tells you everything works and your code fails successfully and if you aren’t reading all the code you would never know. It’s kind of strange actually. I don’t have a good feeling when it will get everything correct and when it will fail and that’s what is disconcerting. I would be happy to be given advice on what to do to untangle when it’s good and when it’s not. I love chatting with Claude code about code. It’s annoying that it doesn’t always get it right and also doesn’t really interact with failure like a human would. At Least in my experience anyways.

Re: Claude Sonnet 4 now supports 1M tokens of context

#383

Earlier quoted context omitted.

My workflow is to use Claude desktop with the filesystem mcp server. I give claude the full path to a couple of relevant files related to the task at hand, ie where the new code should hook into or where the current problem is. Then I ask it to solve the task. Claude will read the files, determine what should be done and it will edit/add relevant files. There's typically a couple of build errors I will paste back in…

Any particular reason you prefer that over Claude code?

I'm on windows. Claude Code via WSL hasn't been as smooth a ride.

Re: Claude Sonnet 4 now supports 1M tokens of context

#384

My experience with the current tools so far: 1. It helps to get me going with new languages, frameworks, utilities or full green field stuff. After that I expend a lot of time parsing the code to understand what it wrote that I kind of "trust" it because it is too tedious but "it works". 2. When working with languages or frameworks that I know, I find it makes me unproductive, the amount of time I spend writing a goo…

I'm not a programmer, but I need to write python and bash programs to do my work. I also have a few websites and other personal projects. Claude Code helps me implement those little projects I've been wanting to do for a very long time, but I couldn't due to the lack of coding experience and time. Now I'm doing them. Also now I can improve my emacs environment, because I can create lisp functions with ease. For me, this is the perfect tool, because now I can do those little projects I couldn't do before, making my life easier.

Re: Claude Sonnet 4 now supports 1M tokens of context

#385

Earlier quoted context omitted.

> it's not clear if the value actually exists here. Having spent a couple of weeks on Claude Code recently, I arrived to the conclusion that the net value for me from agentic AI is actually negative. I will give it another run in 6-8 months though.

For me it’s meant a huge increase in productivity, at least 3X. Since so many claim the opposite, I’m curious to what you do more specifically? I guess different roles/technologies benefit more from agents than others. I build full stack web applications in node/.net/react, more importantly (I think) is that I work on a small startup and manage 3 applications myself.

On the right projects, definitely an enormous upgrade for me. Have to be judicious with it and know when it is right and when it's wrong. I think people have to figure out what those times are. For now. In the future I think a lot of the problems people are having with it will diminish.

Re: Claude Sonnet 4 now supports 1M tokens of context

#386

My experience with the current tools so far: 1. It helps to get me going with new languages, frameworks, utilities or full green field stuff. After that I expend a lot of time parsing the code to understand what it wrote that I kind of "trust" it because it is too tedious but "it works". 2. When working with languages or frameworks that I know, I find it makes me unproductive, the amount of time I spend writing a goo…

For enterprise software development CC is definitely there. 100k Go code paas platform, micro services architecture, mono repo is manageable.

The prompt needs to be good, but in plan mode it will iteratively figure it out.

You need to have automated tests. For enterprise software development that actually goes without saying.

Re: Claude Sonnet 4 now supports 1M tokens of context

#387
post #154

Earlier quoted context omitted.

> Having spent a couple of weeks on Claude Code recently, I arrived to the conclusion that the net value for me from agentic AI is actually negative. > For me it’s meant a huge increase in productivity, at least 3X. How do we reconcile these two comments? I think that's a core question of the industry right now. My take, as a CTO, is this: we're giving people new tools, and very little training on the techniques that…

It's not just about the programmer and his experience with AI tools. The problem domain and programming language(s) used for a particular project may have a large impact on how effective the AI can be.

But even on the same project with the same tools the general way a dev derives satisfaction from their work can play a big role. Some devs derive satisfaction from getting work done and care less about the code as long as it works. Others derive satisfaction from writing well architected and maintainable code. One can guess the reactions to how LLM's fit into their day to day lives for each.

Re: Claude Sonnet 4 now supports 1M tokens of context

#388

What I've found with LLMs is they're basically a better version of Google Search. If I need a quick "How do I do..." or if I need to find a quick answer to something its way more useful than Google and the fact that I can ask follow up questions is amazing. But for any serious deep work it has a long way to go.

I feel exactly the same way. why skim and sift 15 different stackoverflow posts when an LLM can pick out exactly the info I need?

I don't need to spin up an entire feature in a few seconds. I need help understanding where something is broken; what are some opinions o best practice; or finding out what a poorly written snippet is doing.

context still v important for this though and I appreciate cranking that capacity. "read 15000 stackoverflow posts for me please"

Re: Claude Sonnet 4 now supports 1M tokens of context

#389
post #243

Earlier quoted context omitted.

Well put. It really does come down to nuance. I find Claude is amazing at writing React / Typescript. I mostly let it do it's own thing and skim the results after. I have it write Storybook components so I can visually confirm things look how I want. If something isn't quite right I'll take a look and if I can spot the problem and fix it myself, I'll do that. If I can't quickly spot it, I'll write up a prompt describ…

It is not really a nuanced take when it compares 'unassisted' coding to using a bicycle and AI-assisted coding with a truck. I put myself somewhere in the middle in terms of how great I think LLMs are for coding, but anyone that has worked with a colleague that loves LLM coding knows how horrid it is that the team has to comb through and doublecheck their commits. In that sense it would be equally nuanced to call AI-…

Oh nuanced the comparison seems also depends on whether you live in Arkansas or in Amsterdam.

But I disagree that your counterexample has anything at all to do with AI coding. That very same developer was perfectly capable of committing untested crap without AI. Perfectly capable of copy pasting the first answer they found on Stack Overflow. Perfectly capable of recreating utility functions over and over because they were to lazy to check if they already exist.

Re: Claude Sonnet 4 now supports 1M tokens of context

#390

My experience with the current tools so far: 1. It helps to get me going with new languages, frameworks, utilities or full green field stuff. After that I expend a lot of time parsing the code to understand what it wrote that I kind of "trust" it because it is too tedious but "it works". 2. When working with languages or frameworks that I know, I find it makes me unproductive, the amount of time I spend writing a goo…

It also steps right over easy optimizations. I was doing a query on some github data (tedious work) and rather than preliminarily filter down using the graphql search method, it wanted to comb through all PRs individually. This seems like something it probably should have figured out.
Post reply on HN