Evaluating Component Generation: ChatGPT vs. Claude - Which One Fits Developer Needs Better?

Evaluating Component Generation: ChatGPT vs. Claude - Which One Fits Developer Needs Better?

I've been using Claude and ChatGPT for a while now and often switch between the two. However, lately, I’ve noticed that I’ve been using ChatGPT more frequently than Claude. This made me start wondering why. Consciously, I decided to stop using ChatGPT for a while to see what Claude was offering. That’s when I began to understand why I was gradually leaning away from it.

From my perspective as a developer, I typically use these tools to generate guides on how to accomplish tasks, modify existing code, or create components based on other code, among countless other things. So, I decided to run an experiment with a scenario that often saves me time.

I frequently search for components, either for inspiration or to use directly, by googling them based on the frameworks I’m using so I can regenerate them accordingly. Let’s dive directly into an example:

This is the component I want to regenerate in this particular case to be used with Vue.

https://codepen.io/Shyam-Chen/pen/qdQLvp/

So, I’m going to ask both Claude and ChatGPT using the same prompt, something like:

i have this CSS:
<css> 
</css>

and this html:
<html> 
</html>

use those to generate a vue component        

It’s in the same way that I’ve been using it all along.

I created a project on Stackblitz to showcase the results. In the project, you can see the components MenuGPT and MenuClaude with the content exactly as it was generated. The project is as follows:

https://stackblitz.com/edit/vitejs-vite-guwakr?file=src%2FApp.vue


The live result is as follows:

https://vitejsvitecragur-jb5w--5173--60a75bde.local-credentialless.webcontainer.io/


Ultimately, the component wasn’t generated correctly by either model, but from my perspective, it’s easier to work with the version generated by ChatGPT. This is because we can use the animation and include the icons. On the other hand, with Claude, we would have to recreate the entire animation, which doesn’t make sense given my expectations.

But what do you think?

Lou Biancaniello

Fractional CTO | Solution Architect | Strategist | Entrepreneur | Chief Wizard at GVW

1 个月

Agree! AI is a massive accelerator for coding but doesn’t replace my knowledge and experience with the craft

Lou Biancaniello

Fractional CTO | Solution Architect | Strategist | Entrepreneur | Chief Wizard at GVW

1 个月

I’m in the same boat where I use Claude and GPT for coding tasks. I’ve not done a specific bake-off os such but often find I start on one platform, hit a wall and take my progress to the other to complete my task. Often though for things that are very new or not typical use cases I find that they seem to wing it or makeup syntax.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了