---
title: 'ChatGPT vs. DeepSeek Which AI Gives Better Coding Help?'
source: 'https://youtube.com/watch?v=R6UZZrnRp6I'
video_id: 'R6UZZrnRp6I'
date: 2026-06-18
duration_sec: 0
---

# ChatGPT vs. DeepSeek Which AI Gives Better Coding Help?

> Source: [ChatGPT vs. DeepSeek Which AI Gives Better Coding Help?](https://youtube.com/watch?v=R6UZZrnRp6I)

## Summary

This video compares the coding assistance provided by ChatGPT and DeepSeek AI. The creator presents a piece of buggy code to both AIs and analyzes their responses, focusing on error handling and JWT token management.

### Key Points

- **Introduction to the comparison** [0:00] — The video compares ChatGPT and DeepSeek AI for coding assistance.
- **Code presented for analysis** [0:06] — A buggy API endpoint calling function is presented to both AIs.
- **Prompt for AI analysis** [0:30] — The same prompt and code are given to both ChatGPT and DeepSeek.
- **DeepSeek access issue** [0:45] — DeepSeek requires login, unlike ChatGPT which can be used in incognito mode.
- **DeepSeek's detailed response** [1:26] — DeepSeek provides a detailed, step-by-step analysis of the code.
- **ChatGPT's response** [1:36] — ChatGPT suggests modifying error handling logic and adding a try-catch block.
- **DeepSeek's precise solution** [2:50] — DeepSeek identifies the exact problem: the else block removes JWT tokens on any error.
- **Problem identified by DeepSeek** [3:08] — DeepSeek correctly points out that JWT tokens should only be removed for authentication errors (401 or 403).
- **Solution from DeepSeek** [4:01] — DeepSeek's solution is to only remove JWT tokens on 401 or 403 errors, not other types.
- **DeepSeek's code modification** [4:17] — DeepSeek's modified code uses a simple if condition instead of a nested try-catch block.
- **Comparison of solutions** [5:04] — The creator prefers DeepSeek's solution as it is cleaner and more direct.

## Transcript

everybody is talking about deep seek AI
compared to chat GPT so I thought to
give it a try as well I have a piece of
code here this code is basically one of
the function for our one of the project
in our course and this is a API end
point calling function that is basically
used by entire API calling method within
the application so this is a functional
code but it is not fully completed and
it has some BG to fix and I have written
some prompt here for ai2 analyze it and
give me some feedback or provide me the
solution and I want to give this exact
same instruction and the code to the
both charity and then dips and then see
how it works so I have a Char open here
in Incognito and I tried to open the
dips into the Cognito but it won't allow
so this is a really smart way to kind of
saving the server cost I hope they are
not doing that but yeah going back to I
have to log in so I log in here so I
haven't done any really much use of
deeps so what I like to do is let's copy
this out entire code and then I'm going
to go to a platform here and then I'm
going to pass that to GPD first hit
enter or submit it and then give to the
dsck as well and let's see what happens
all right still processing it
and let's analyze it which one doing the
good job here this see is bit slow so oh
looks like he's writing very detailed
information so while it's just doing its
job let's go and look into GPT and then
see what it says so here are few Su
modify the error handling logic here in
the logic check for the user should be
logged out should only be trigger for
the authentication error like 44 should
be based on the S and condition I.E non
expir okay yeah so additionally better
code handling is implementing status
code 400 verify that it is actually
correct XO doesn't have the status
property directly blah blah blah and
doesn't really give you detail there so
scrolling down here I want to see so
basically it has written another TR
catch
block inside my catch block and which I
already don't like it and um nesting
more cord here I don't really enjoy this
approach and also of course uh doing
other few check okay guys if you are
quer you know what's going on here I got
enough information what he's trying to
give me and which is I'm not really
happy here now I'm going to go back to
this deep sick and then very first time
I'm literally using this for cord
analysis let's see what it has to say
okay this is exactly the issue it has
given very like to the point problem
which I did not really see here did we
see that so I do not see GPT giving me
the exact location or the exact message
where the issue is like here it has
saying the behavior likely to doe to the
else Block in the cat section of your
API processor the function which removes
the JWT token from the storage whenever
an error occurs regardless of the error
type yeah that is the actual problem
here so if you look into this Cod
whenever we have the server site 400
error and then only that comes up with
the just JWT expired then we are
basically rerunning the code after
fetching the new token other than that
we are just deleting the token that was
the problem so that was smart now
looking into the error handle link okay
here the code now only removes the JWT
token and logs out user uh if the error
is 44 on authorize 043 error basically
it locks out every anything okay it has
given to the point Point solution here
you should only remove the JWT tokens
and log the user out when the error is
specifically related to the
authentication that's correct but 401
authorized or 43 forbidden and not for
other type of yeah that's the solution
kind of we are looking for but here is
the modified code I'm going to go
straight away and then look into the
catch section at least it's not putting
another try catch here inside the catch
which I'm okay it looks for the message
okay it's just checking if condition so
it's going to run this cord only when
that condition pass if the cord goes
inside here it will stop here so it this
will not run so if that doesn't pass
through then it's going to check 401
error response status s is
43 then you can delete this I think yeah
honestly the solution comparing to I'm
going to go back to chat JP quickly one
more time to see the solution it's do
pretty much similar thing but this is
way messy Cod I would say honestly I do
like the way the Deep SE has given the
solution here comparatively the chat GPT
solution okay that's my opinion over
these two different tools guys what do
you think let me know in the comment
