Hey everyone,
I've been having a tough time getting Claude (Sonnet) to generate any decent long-form code for my project. It does fine with small functions, but when it comes to larger pieces, it tends to cut off halfway or keep repeating the same section over and over again.
Has anyone else experienced this? I've tried a bunch of different prompts, including letting Claude ask me questions first, which has helped a bit but not a ton. I even adjusted the system prompt to specify the coding style, but that hasn't worked either.
I'm beginning to think I might need to look for other options, especially when I need to generate bigger code segments from the terminal. I've heard about Codex but I'm hesitant about the API fees. Are there any good free alternatives out there? Or maybe even some offline tools I could use?
On top of that, I've been looking into voice coding tools to speed things up, but I'm struggling with the right commands. The built-in dictation on Mac leaves a lot to be desired. I heard of WillowVoice, which supposedly does a better job with coding, but I haven't had the chance to try it yet.
Any suggestions would be greatly appreciated! I'm feeling a bit stuck and could really use some help.
2 Answers
I've been able to write some pretty long code files using Claude, like around 2000 lines! If you're finding it struggles, I recommend breaking your requests down into smaller parts, as that usually helps.
I usually opt for Gemini since it has a much larger context window compared to Claude. It definitely reduces those annoying cutoff issues when generating code.
Totally agree! The larger context window with Gemini makes a huge difference. Might be worth the switch!
For sure, breaking it down is definitely a solid approach. Also, speaking of voice tools, my friend tried WillowVoice and said it's pretty decent when it comes to handling code syntax.