GPT vs Claude
Which AI language model is better in case of code generation?
Purpose
I have been resisting using coding agents for a long time. But finally I gave in to temptation and installed GitHub Copilot. At the early roll-outs of this tool it was used GPT language model developed by OpenAI. But today you are allowed to choose different ones like: Claude or Gemini. So now I have a dilemma: which one I should pick.
Comparison
To make this decision I’ve followed up the steps of tutorial provided in the VSCode docs. Where you are building a task management web application while discovering Copilot’s core capabilities: intelligent code completions, autonomous feature development with agent mode, precise editing with inline chat, integrated smart actions, and powerful customization options.
Contenders
GPT-4.1
“Reliable default for most coding and writing tasks. Fast, accurate, and works well across languages and frameworks.“
– docs.github.com
I see it as a general purpose tool, I was familiar with it mainly through ChatGPT chatbot. Arguably current leader in the AI race.
end-result: pythonsway.github.io/task-manager-gpt

Project size: 42kB
Claude Sonnet 3.5
“Produces clear, structured output. Follows formatting instructions and maintains consistent style.”
– docs.github.com
When used as a chat. it was presented to me as a better solution for code related tasks.
end-result: https://pythonsway.github.io/task-manager-claude

Project size: 48kB
The future
I should say that the future is bright. That coding is becoming more and more effective and productive, that new tools help at every step. But when you take step back you will see that something isn’t quite right. Think about it: language models are fed by code generated by language models…
For example when I asked both agents to code review their own work, they pointed out the whole list of issues and areas of improvement. If it was so obvious why they haven’t applied that knowledge in the first place? My another rant is that AI is fucking overconfident, I should even say it’s cocky. I’ve experienced this a couple of times. Even when it made some mistakes or false assumptions, it admitted to it only after I directly pointed it out. To be honest I’m really envious of that social skill, because in real life I always have some grain of doubt when I was giving some advice as an authority.
PS Probably this post won’t age well, because many powerful personalities are making big bets about this AI thing. Anyway I think that we’ll be OK.
No, this post was not generated by any AI agent!