T
20

Compared Claude Sonnet and GPT-4o for drafting code, one was way faster and cleaner

I spent a week using Claude Sonnet for my Python scripts at work in Austin and then switched to GPT-4o for the second week. Claude gave me less debugging and better comments on the first try every time. Has anyone else noticed a clear winner between these two for coding tasks?
3 comments

Log in to join the discussion

Log In
3 Comments
elizabethtaylor
Claude gave me less debugging and better comments" - well la-di-da, look who got the perfect AI assistant. I tried both for a weekend project. GPT-4o wrote me a beautiful mess. Like a toddler drew a masterpiece with crayons. Sure it looked good at first glance. Then it fell apart the second I tried to run it. Claude was boring and got the job done. No drama. No rewriting the same function three times. Honestly I think it depends on what you're building. If you want flashy code that might explode, go with GPT. If you want something that actually works and you can go home on time, Claude is your guy. I've been burned too many times by GPT's confident wrong answers.
0
tarar27
tarar2712d ago
My buddy tried this exact thing last week. Asked GPT to write him a script to rename files, ended up with 200 lines and a class structure like he was building a bank. Claude did it in 30 lines, flat code, no drama. Ran first try. He was so mad about the wasted time with GPT. But I guess some people like the extra sauce on their code.
9
davis.noah
davis.noah12d ago
Wait, Claude wrote you comments that were actually good? Every time I've tried Claude for anything beyond basic code it gives me these weirdly formal comments like "This function performs the operation of..." instead of just saying "this does x." But you're right about GPT though. Last week I asked it to write me a simple API endpoint and it gave me 400 lines of code with error handling for scenarios that literally cannot happen. Then when I pointed out a bug it apologized and rewrote the whole thing with a different approach that introduced three new bugs.
3