Hey guys, I recommend 1.25x or 1.5x speed if you want to get through the video quickly. Also, here’s the source code I used today: github.com/ykdojo/editdojo
But if you succeeded to reproduce the issue locally, why not just run it through a debugger instead of the hassle of littering the code with print statements?
Hmm I think that's what I would've done if I was more comfortable with pdb. Since I wasn't that used to using it, I just went with printing this time - which took less learning up front.
1. Come up with hypothesis and test it. Repeat. 2. Reproduce the problem locally. 3. Read the source code carefully. 4. Read print statement effectively. 5 Read a debugger effectively.
Similar techniques were taught to me by my senior developer for php. Instead of importing and checking in command line you can use print_r or var_dump in php to print out every single thing a variable holds.
kkkkkkkkkkkkkkk 90% of the problems a programmer faces are of this type. It was just hilarious when you said "ah.. turns out it was just a typo" xDDDDD
This was a very valuable video! I literally said "when debugging use print statements effectively" in an interview a got the job lol... Thanks for sharing!
This is great! I would also say, you can get some insight from the Http Status Codes you received from printing your response variable. I think you had 403 and 401 show up, if you Google those codes I believe 403 (from your local environment) means access was forbidden, and 401 (from the server) means unauthorized. It can help you identity what's going wrong sometimes if you check out what code you're getting :)
I have a very hard time reading other people's codes in Python. Could you make a video of you reading a brand new python code that you haven't seen before? And while you read it, you would say out loud how you think, and understand it. Would be very useful for me ! :) Do you use the debugger to understand the code? If so, that you could include that too in the code reading tutorial vid :) Or any other tool that is helpful for the purpose.
That just comes from experience and seeing a lot of code. You will get it. Python language was created with readability as one of the main focuses so it shouldn't be a too much of an issue.
@@kwii22789 yeah, Python is even easier to understand than other languages, yet I still struggle reading, and understanding others code. When I need to implement a feature from zero, its not a big deal for me. But when I need to add a feature to an existing project, that someone else wrote, and its quite large already, thats a problem.. I dont even know where to start, and what to modify. So a code reading tutorial would be very nice!
@@Chaosman88 Unless there is a reason you want to modify how a framework or library works, the only thing you should care about is what input you need to have and what is the expected output. Both of which should be in the doctring/comments if the original developer was organized enough.
@@MinecraftMasterNo1 No, I want to modify my colleague's code to add a new feature. Its a large repo with partly legacy code, and partly written by my colleagues. Nor the legacy part, nor my colleague's part is documented, and its written in such a way that is hard to decode for me. Like there is a function that does nothing but to wrap another function, that does something and call an API function, etc..
@@Chaosman88 Yeah, the two tools of the trade that I use are: 1) git blame to see the context of why a line of code was written (to fix a bug, or part of a feature, when, by whom) and 2) IDE with debugger so you could step through the code line by line while looking at all the values of all the variables (raw pdb is good, but it doesn't have a UI, too toxic to use in large code base).
I would say that having a duck or a buddy to talk about it with, is the most effective way. how many times Ive went to a friend, told him about it and before he was able to respond I was like "OH RIGHT" went back and solved it. Thank you for everything you post here. youre a gem!
I would also recommend seeing following logs to understand the bug better, such as 1. Application log 2. Web server log (Apache/Tomcat/Anything?) 3. Database log (if relevant) 4. In this case it can be API Provider official error documentation page. For info on error code and its description. Which can also pinpoint what can be the issue exactly. 5. Last but not least I may be checking server logs(linux/Anything?). For instance, memory allocation issue or disk space or anything. I hope it helps
*@CS Dojo* In PHP there are some "magic constants" ( php.net/manual/en/language.constants.predefined.php ) and my preferred logging method is: *print( 'Line: ' . **__LINE__** . ', in function: ' . **__METHOD__** . '(), in file: ' . **__FILE__** );* The output looks like this: *"Line: 42, in function: my_class::my_function(), in file: C:/full/path/to/file.php"* The best part is that it's super easy to remove, just search & replace with an empty string, because all these debug functions looks exactly the same but prints the information you need. Check if your preferred language also have any similar "magic constants" that you can use like this, it's super convenient.
Nice tips. But, the last 2 tips can be entirely replaced by using an IDE debugger (for example PyCharm), to save your time to write (+rollback) print() statement and pdb commands. IDE usually have nice features like watch variables, or even "backward step into" when stopped in a breakpoint.
I think another way can also be to think of something different we have done in two same code base on two different environments. If we can answer to this question then it will be a lot easier to trace the issue at the very early stage. btw great video CS DOJO :)
it's really a good thing for us that you missed one letter when you copying the keys because this video you create after that little accident is so inspiring
I had a lot of issues on my iOS project with the google and facebook auth... Looks easy when you get this libraries that are already for this purpose but the effort for putting everything in your project.. This is the real deal! Great video :))))
If yes. I have an idea. Creating an app for phone or video call. But people not use direct address, they choose theme of discussion or tips of it. For example: " students want to practice their speaking skills. Their choose an issue. let's say - crisis in cold war. They write the name of issue and write some tips like - 1. Why cold war is crisis 2. Which countries were involved. 3. ... . And if somebody interests then can join to conversation. Video call (for example) for art, painting ... And also need background with already given issues for suggestion.
Print statements are the X factor. It works like a charm! I just spam prints at functions or if checks I suspect are the problem. BINGO problem solved.
Great video. Just a few comments coming to minds. 1. I don't think putting in a whole bunch of logging statement is good. Firstly, it clutter your code, secondly, it's just wasteful computations that you force the software to do just to figure out an error and bring no real benefit to clients, not to mention more code == less readibility. Logging is great to keep track of what went wrong in production, then use as a starting point for trouble-shooting production issue that happened in the past. In very rare case, when you cannot reproduce locally, pushing logging statement to production so that the next time it happens, you can have a starting point. 2. The raw pdb is good if you want to debug something quick and simple (again, I dislike putting code into source code just for debugging purposes). I think the best way to debug is to use a proper IDE where you could set a break point, step through the code line by line (some debugger can allow you to go backwards, rerun a block of code multiple times, so you can see what happens), examine values of all variables on a GUI at all times. Some thing like this will do: ruclips.net/video/w8QHoVam1-I/видео.html. The advantage of using a break point is that you don't have to put extra code to debug production code. In my line of work, I deal with a large C++ code base, where a full compilation takes 40 mins, partial compilation of a project might take 1-2 mins. Recompiling every-time you need a new logging statement seems inefficient. 3. Use unittest can also help keep track of bugs, if new implementation can break something already working and save you time from looking at wrong places. 4. You should also mention the legendary stackoverflow somewhere :P
I love your videos so much for the past 1 1/2 years you've helped me a lot thank you so much man you're the best and keep up the fantastic work 😃😃😃😃😃😎😍😍😍😍😋😋😋😃😃
My last tough bug was due to not being familiar with the difference between shallow copies and deep copies in Python. I thought new_list = list(old_list) will ensure that old_list will not change when mutating new_list. Wrong! That line makes a copy of the top-level elements of old_list, but if old_list has elements that are themselves lists, those lists will still be aliased! I used print statements to zero in on the line that was behaving in an unexpected way. I may have used some assert statements too. old_list = [1, 2, [3, 4], 5] print('old_list = {}'.format(old_list)) new_list = list(old_list) # If you think this means old_list is safe, it's not! new_list[0] = 66 # old_list is not affected print('old_list = {}'.format(old_list)) new_list[2][0] = 77 # old_list IS affected! print('old_list = {}'.format(old_list))
Uf. I've had this happen to me on Heroku. Environment variable misspellings strike again! Good job tracking that one down, and after it takes hours it's certain to be the first thing a lot of folks check now when something similar happens. We learn our lesson the hard way sometimes, and that's okay. :)
1 - Understand how the program should work 2 - read the documentation, source code 3 - Get the list of normal errors (sometimes developers write warning messages like fatal errros, but it is just a warning). Errors that seems to be errors, but they are not errors. 4 - Find a good tool (debugger) 5 - Learn how to use the tool correctly 6 - Reproduce the problem locally and force it to happen whenever you want just to examine it with the debugger. In case the problem happened in a remote system, debug the problem locally. It will help you to proof you fixed the problem correctly after you create a patch. 7 - Create a hypotesis about the possible root cause of the problem
Hi, one of friend had google onsite interview last week. He's been asked interesting problem for which I am not able to find solution:- Find element in tree without visiting all nodes. So if you have root as 1 and child are 2, 3 and again there are two child of 3 which are 4 and 5. Now if you have to find element 5 in tree your algorithm should not go to left subtree with node 2. It should directly come to 3 and find 5. You can not use extra space like storing all elements in array and find element.
Or you could just use assertions. Most of the bugs I used to run into were just because of some data somewhere not being set/reset/sent correctly. I almost don't have to debug anything since I've been asserting what I know should always be true everywhere, and when it's not I get a nice trace log as well to help me understand the specific case that breaks my program
I am not kidding. I got the exact same bug while using google oauth in one of my personal projects. Missed the last "k" in the api key(I couldn't find the difference since it had a horizontal scroll to it :x). Finally found it and was so pissed off. Took me not 4 hours but almost 2 days.
haha awesome, thank you for the video! Quick question, what's your recommendation for the best Python Debugger if your IDE is VSC? I realized your using the built-in debugger, but is that your recommendation? Thank you!
I have been ur follower for years...and never found a useless video in your channel....keep Up ThE GoOD work......and pls do a video about kali linux vs parrot if u can
If I might add _one more thing_ ... I like to do: print("Hello World") ### Then I can search for the triple pound, and delete those lines; easy to identify debugging print statements vs "real" print statements.
I would have looked into the Chrome network tab from the beginning then cleared it, reproduced it and examined which endpoint was getting rekt. Then examine request payload and response would have likely been "Could not authenticate you"
thank you so much for this effort sir, but I wanna know if i follow the code will the program executes well? I mean is it ready to use if I copy & past your code? I am planning to make the same thing in my software engineering course project & I wanna be sure that it is working completely fine, coz I read the source code but could not understand =(
Hi! I really enjoy your video as a freshman cs/math student. I was wondering if u were an international student like me. If that was the case, is it extra ordinarilly hard to find a sponsor for your visa as a data scientist or software engineer? Anyways thanks for the great tips man !
Dear brother I had a very hard time in learning and understanding Django framework of python though I know python very well and I have made some good projects on web scrapings, so can u suggest any resources to clear my fear of Django coz I have followed many tutorials but failed to grasp the Django framework.
Great vid! Quick question, if you have a rule about print statements in production do you know of any tools that can get rid of uncommitted print statements when you commit but keep them locally so you can keep debugging?
It’s a great video to learn how to debug in Python. But I already knew that the issue has something to do with the API keys right after you said what the issue is. The website works locally so it has nothing to do with the code.
So, 1. Come up with several hypothesis to test. 2. Reproduce error locally. 3. Read The Source Code carefully. 4. Use Print Statements effectively. 5. Use a Debugger effectively. I would say start with 1, 2+4, 5 then 3. You will spend lesser time debugging.
Hi.... I am 14 and i just discovered your channel so i started the python coarse you have on your channel(just started it.... And I'm a TOTAL beginner) so i just wanted to ask am i starting too soon or too late? And do you have any tips for me?
I test the codes that I 100% think causing the issue in the interactive shell..and it helps me.. If you use other packages in your code, when it runs when you last run it, and then you install it again in the future..propably the pckage version is causing the problem..so need to check that too, try to test downgrade the package version
My first step when debugging is always assume the dumbest/simplest hypothesis first. I've experience SQLServer pw expirations that bubbled up into JSON validation exceptions at the API level before, and the first time it happened I was digging for hours on the Newtonsoft JSON nuget package that was used. Which is also another tip: Login failures can masquerade as something much more complicated/obfuscated. P.S.: Is pdb in the terminal the only debugger tool available to py devs? Is there no good IDE that has this functionality built in?
Thank you. I mostly get suck while coding. In the beginning I thought it is ok because of is a part of growth but now,. I think that is too much wattage of time. Can you further tell me.
Hey guys, I recommend 1.25x or 1.5x speed if you want to get through the video quickly.
Also, here’s the source code I used today: github.com/ykdojo/editdojo
Love u sir
How much seconds do take to solve Rubik cube
haha I haven't solved it in a while, so no idea
But if you succeeded to reproduce the issue locally, why not just run it through a debugger instead of the hassle of littering the code with print statements?
Hmm I think that's what I would've done if I was more comfortable with pdb. Since I wasn't that used to using it, I just went with printing this time - which took less learning up front.
1. Come up with hypothesis and test it. Repeat.
2. Reproduce the problem locally.
3. Read the source code carefully.
4. Read print statement effectively.
5 Read a debugger effectively.
Thanks! , I was about to rewatch the video to make notes.
6 flip out and call the computer stupid
@@ditsokar4168 Yoooo wtf I do that all the time 😅😅🤣🤣
Thanks for the recap
The silliest bugs are usually the most frustrating.
ai4k
A native English speaker understands my statement.
ai4k
Ok 👍
Same as farts
The ones that can make you go "this is the correct code, why is it not working?" type of bugs
@@zerosandones7547 oh boy, that feels frustrating.
Similar techniques were taught to me by my senior developer for php. Instead of importing and checking in command line you can use print_r or var_dump in php to print out every single thing a variable holds.
kkkkkkkkkkkkkkk 90% of the problems a programmer faces are of this type. It was just hilarious when you said "ah.. turns out it was just a typo" xDDDDD
João Victor Feijó We need Grammarly for programming
@@xCaleb create one.
:)
This was a very valuable video! I literally said "when debugging use print statements effectively" in an interview a got the job lol... Thanks for sharing!
Easiest way is
to copy the error
Paste it in google
Open most similar stackoverflow links.
Boom done!
This is for the people who answer at stackoverflow :p
@MANISH SHARMA bhai jo bhi errors aati hain unhe bugs kehte hain. Errors/bugs ke removal wali process ko debugging
@MANISH SHARMA hn bhai.
This is great! I would also say, you can get some insight from the Http Status Codes you received from printing your response variable. I think you had 403 and 401 show up, if you Google those codes I believe 403 (from your local environment) means access was forbidden, and 401 (from the server) means unauthorized. It can help you identity what's going wrong sometimes if you check out what code you're getting :)
I have a very hard time reading other people's codes in Python. Could you make a video of you reading a brand new python code that you haven't seen before? And while you read it, you would say out loud how you think, and understand it. Would be very useful for me ! :)
Do you use the debugger to understand the code? If so, that you could include that too in the code reading tutorial vid :) Or any other tool that is helpful for the purpose.
That just comes from experience and seeing a lot of code. You will get it. Python language was created with readability as one of the main focuses so it shouldn't be a too much of an issue.
@@kwii22789 yeah, Python is even easier to understand than other languages, yet I still struggle reading, and understanding others code.
When I need to implement a feature from zero, its not a big deal for me. But when I need to add a feature to an existing project, that someone else wrote, and its quite large already, thats a problem.. I dont even know where to start, and what to modify. So a code reading tutorial would be very nice!
@@Chaosman88
Unless there is a reason you want to modify how a framework or library works, the only thing you should care about is what input you need to have and what is the expected output.
Both of which should be in the doctring/comments if the original developer was organized enough.
@@MinecraftMasterNo1 No, I want to modify my colleague's code to add a new feature. Its a large repo with partly legacy code, and partly written by my colleagues. Nor the legacy part, nor my colleague's part is documented, and its written in such a way that is hard to decode for me. Like there is a function that does nothing but to wrap another function, that does something and call an API function, etc..
@@Chaosman88 Yeah, the two tools of the trade that I use are: 1) git blame to see the context of why a line of code was written (to fix a bug, or part of a feature, when, by whom) and 2) IDE with debugger so you could step through the code line by line while looking at all the values of all the variables (raw pdb is good, but it doesn't have a UI, too toxic to use in large code base).
I would say that having a duck or a buddy to talk about it with, is the most effective way. how many times Ive went to a friend, told him about it and before he was able to respond I was like "OH RIGHT" went back and solved it.
Thank you for everything you post here. youre a gem!
I also look at Chrome's Network tab in the dev tools to inspect the responses. Just make sure to preserve logs there and you're ok.
Napoleon M. I was coming in, to comment this very thing. Usually auth failures are caught by Chromes Dev Tools! Great Video tho.
I would also recommend seeing following logs to understand the bug better, such as
1. Application log
2. Web server log (Apache/Tomcat/Anything?)
3. Database log (if relevant)
4. In this case it can be API Provider official error documentation page. For info on error code and its description. Which can also pinpoint what can be the issue exactly.
5. Last but not least I may be checking server logs(linux/Anything?). For instance, memory allocation issue or disk space or anything.
I hope it helps
Thanks YK, your videos help me not only to get better at programming, but also to improve my english listening skills!
I always enjoy CS DOJO vids; I learn a little something every time.
1 missing letter and a few hours debugging made you create this awesome video. Perfect!!!
*@CS Dojo* In PHP there are some "magic constants" ( php.net/manual/en/language.constants.predefined.php ) and my preferred logging method is:
*print( 'Line: ' . **__LINE__** . ', in function: ' . **__METHOD__** . '(), in file: ' . **__FILE__** );*
The output looks like this: *"Line: 42, in function: my_class::my_function(), in file: C:/full/path/to/file.php"*
The best part is that it's super easy to remove, just search & replace with an empty string, because all these debug functions looks exactly the same but prints the information you need.
Check if your preferred language also have any similar "magic constants" that you can use like this, it's super convenient.
This is a nice topic, learning new things and debugging are the 2 important things for any software developer.
Pro debugging tip: use emoji such as 😃when doing console logs!
Loppy2345 I’m gunna do that now! 😀😀😀
Is it because it will be easier to spot it in the logs? Sorry I'm new 😅
nice
I end up logging curse words..due to the level of frustration while debugging...
It works!
This is great! Drilling deep and not giving up is the key to being a bug fixing ninja.
Wow! So It's like to be a detector! I haven't known about debugging correctly, but you spot it on to me. Thank you Dojo!
Nice tips.
But, the last 2 tips can be entirely replaced by using an IDE debugger (for example PyCharm), to save your time to write (+rollback) print() statement and pdb commands. IDE usually have nice features like watch variables, or even "backward step into" when stopped in a breakpoint.
When I debug, I usually insert like a dozen breakpoints around the suspected area of the bug and step through them lol
Sorry what's a break point? Thanks
@@FelixAVargasA Place where you want your code to pause while running, so that you can inspect values.
I think another way can also be to think of something different we have done in two same code base on two different environments. If we can answer to this question then it will be a lot easier to trace the issue at the very early stage. btw great video CS DOJO :)
it's really a good thing for us that you missed one letter when you copying the keys because this video you create after that little accident is so inspiring
I had a lot of issues on my iOS project with the google and facebook auth... Looks easy when you get this libraries that are already for this purpose but the effort for putting everything in your project.. This is the real deal! Great video :))))
Nice video quality, lighting, well decorate background and sound quality😃
If yes. I have an idea.
Creating an app for phone or video call. But people not use direct address, they choose theme of discussion or tips of it. For example: " students want to practice their speaking skills. Their choose an issue. let's say - crisis in cold war. They write the name of issue and write some tips like - 1. Why cold war is crisis 2. Which countries were involved. 3. ... .
And if somebody interests then can join to conversation.
Video call (for example) for art, painting ...
And also need background with already given issues for suggestion.
Print statements are the X factor. It works like a charm!
I just spam prints at functions or if checks I suspect are the problem. BINGO problem solved.
My absolute favourite solution. Function not working? no problem, print/alert/echo. Not entering in the loop, no problem just do the bloody print 😂😂😂
Great video. Just a few comments coming to minds.
1. I don't think putting in a whole bunch of logging statement is good. Firstly, it clutter your code, secondly, it's just wasteful computations that you force the software to do just to figure out an error and bring no real benefit to clients, not to mention more code == less readibility. Logging is great to keep track of what went wrong in production, then use as a starting point for trouble-shooting production issue that happened in the past. In very rare case, when you cannot reproduce locally, pushing logging statement to production so that the next time it happens, you can have a starting point.
2. The raw pdb is good if you want to debug something quick and simple (again, I dislike putting code into source code just for debugging purposes). I think the best way to debug is to use a proper IDE where you could set a break point, step through the code line by line (some debugger can allow you to go backwards, rerun a block of code multiple times, so you can see what happens), examine values of all variables on a GUI at all times. Some thing like this will do: ruclips.net/video/w8QHoVam1-I/видео.html. The advantage of using a break point is that you don't have to put extra code to debug production code. In my line of work, I deal with a large C++ code base, where a full compilation takes 40 mins, partial compilation of a project might take 1-2 mins. Recompiling every-time you need a new logging statement seems inefficient.
3. Use unittest can also help keep track of bugs, if new implementation can break something already working and save you time from looking at wrong places.
4. You should also mention the legendary stackoverflow somewhere :P
OMG, that was so funny to look at now. But I can feel the pain of going through it. I am very happy you cracked it.
insted of thinking i waist 4 hours debugging it would be i spend four hors learning something new.
Great Video i learn a lot too
Cool.
Thanks.
Just learning.
Continue don't give up, respect your history first.
I love your videos so much for the past 1 1/2 years you've helped me a lot thank you so much man you're the best and keep up the fantastic work 😃😃😃😃😃😎😍😍😍😍😋😋😋😃😃
The print statement tip is very useful.
My last tough bug was due to not being familiar with the difference between shallow copies and deep copies in Python. I thought new_list = list(old_list) will ensure that old_list will not change when mutating new_list. Wrong! That line makes a copy of the top-level elements of old_list, but if old_list has elements that are themselves lists, those lists will still be aliased!
I used print statements to zero in on the line that was behaving in an unexpected way. I may have used some assert statements too.
old_list = [1, 2, [3, 4], 5]
print('old_list = {}'.format(old_list))
new_list = list(old_list) # If you think this means old_list is safe, it's not!
new_list[0] = 66 # old_list is not affected
print('old_list = {}'.format(old_list))
new_list[2][0] = 77 # old_list IS affected!
print('old_list = {}'.format(old_list))
Your front end design looks super nice. You did it yourself or what library did you use?
That was a pretty nice video, well done. Being a fresher in software development this can help me when I face frustrating bugss.
Uf. I've had this happen to me on Heroku. Environment variable misspellings strike again! Good job tracking that one down, and after it takes hours it's certain to be the first thing a lot of folks check now when something similar happens. We learn our lesson the hard way sometimes, and that's okay. :)
1 - Understand how the program should work
2 - read the documentation, source code
3 - Get the list of normal errors (sometimes developers write warning messages like fatal errros, but it is just a warning). Errors that seems to be errors, but they are not errors.
4 - Find a good tool (debugger)
5 - Learn how to use the tool correctly
6 - Reproduce the problem locally and force it to happen whenever you want just to examine it with the debugger. In case the problem happened in a remote system, debug the problem locally. It will help you to proof you fixed the problem correctly after you create a patch.
7 - Create a hypotesis about the possible root cause of the problem
Thanks. Showing your thought process is so helpful.
Loved the session. ❤️ And the ending.😀👍
A single simple mistake made this whole knowledge for you and us, thanks for sharing your experience !
Thank you so much for this useful data ! Greatly appreciated.
Super useful information how to start debugging. Thanks
Hi, one of friend had google onsite interview last week. He's been asked interesting problem for which I am not able to find solution:-
Find element in tree without visiting all nodes. So if you have root as 1 and child are 2, 3 and again there are two child of 3 which are 4 and 5. Now if you have to find element 5 in tree your algorithm should not go to left subtree with node 2. It should directly come to 3 and find 5. You can not use extra space like storing all elements in array and find element.
i learn from this video today thank you cs dojo
Thank you so much for your debugging strategies.
haha, this is so true, a lot of times the hardest bugs are caused by dumb programmer mistakes. But great video, your debugging logic is spot on.
Or you could just use assertions. Most of the bugs I used to run into were just because of some data somewhere not being set/reset/sent correctly. I almost don't have to debug anything since I've been asserting what I know should always be true everywhere, and when it's not I get a nice trace log as well to help me understand the specific case that breaks my program
so intersting!good job!
I am not kidding. I got the exact same bug while using google oauth in one of my personal projects. Missed the last "k" in the api key(I couldn't find the difference since it had a horizontal scroll to it :x). Finally found it and was so pissed off. Took me not 4 hours but almost 2 days.
I took python las semester and the upcoming semester will be debugging.... this was extremely helpful thank you
haha awesome, thank you for the video! Quick question, what's your recommendation for the best Python Debugger if your IDE is VSC? I realized your using the built-in debugger, but is that your recommendation? Thank you!
That's insane i remember watching one of your videos when you had about 20k and now you have 700k wow
Nice video. Just curious what IDE are you using?
Nice video regarding debugging, but the error is funny😀
Well like in life we miss the obvious solutions sometimes. Cool videos as always man look forward to more.
I think the stack trace gives you a good idea on where the code is breaking
Hey YK, loved your videos from the Python playlist. Could you please make a same playlist on Java, JavaScript or C++
Thanks
I have been ur follower for years...and never found a useless video in your channel....keep Up ThE GoOD work......and pls do a video about kali linux vs parrot if u can
Great! But please post the key points in the description next time. I liked the first and print yk1 ideas a lot.
I prefer to comment some lines 🌷
Hala akhi
Thank you this was a super clean video!
If I might add _one more thing_ ...
I like to do:
print("Hello World") ###
Then I can search for the triple pound, and delete those lines; easy to identify debugging print statements vs "real" print statements.
wow pdf is blowing my mind. Thanks a lots :)
Thank you,i will always like your videos. I will learn lots of basic and tip,tricks.
Another Helpful video from a great man...
You are the man inspired me
Is this the last video for this playlist? Will you be uploading more...dying to see what you do as a next step!
Subbed since 1k can't believe how much you progressed ^^
Thank you!!
thanks cs dojo.. its very good tips for debugging
I would have looked into the Chrome network tab from the beginning then cleared it, reproduced it and examined which endpoint was getting rekt. Then examine request payload and response would have likely been "Could not authenticate you"
thank you so much for this effort sir, but I wanna know if i follow the code will the program executes well? I mean is it ready to use if I copy & past your code? I am planning to make the same thing in my software engineering course project & I wanna be sure that it is working completely fine, coz I read the source code but could not understand =(
Pdb was new for me . Great video yk
Hey, you told in your previous videos that you did a machine learning project. You mean you implemented a research paper about machine learning?
Awesome!! A similar type of problem appeared in the online coding test yesterday, but I couldn't solve it!!! I guess I'm an idiot...
No. , you're given your best, thats all, no one is fool and genius, matters what is how they train
Hi! I really enjoy your video as a freshman cs/math student. I was wondering if u were an international student like me. If that was the case, is it extra ordinarilly hard to find a sponsor for your visa as a data scientist or software engineer? Anyways thanks for the great tips man !
sir , you are a great teacher
Dear brother I had a very hard time in learning and understanding Django framework of python though I know python very well and I have made some good projects on web scrapings, so can u suggest any resources to clear my fear of Django coz I have followed many tutorials but failed to grasp the Django framework.
Great vid! Quick question, if you have a rule about print statements in production do you know of any tools that can get rid of uncommitted print statements when you commit but keep them locally so you can keep debugging?
It’s a great video to learn how to debug in Python. But I already knew that the issue has something to do with the API keys right after you said what the issue is. The website works locally so it has nothing to do with the code.
Grammarly for Programmers - let’s start a GoFundMe to make it happen
Damn it....
That's an idea man
@@temitopeoyeyemi899 It already exists, for a long time
@@TheF4talgamer wanna give us some insight or.....?
So,
1. Come up with several hypothesis to test.
2. Reproduce error locally.
3. Read The Source Code carefully.
4. Use Print Statements effectively.
5. Use a Debugger effectively.
I would say start with 1, 2+4, 5 then 3. You will spend lesser time debugging.
0. Google the error
i think dir() function usefull too, you can get list of valid attributes of the object
Damn Edit Dojo has come a long way
Hello Sir, please make videos about uploading website in Internet or recommend me personally...
Love from Nepal !
I Just discovered ur channel, it's a good mine
What have you been using for front-end? Which framework/template...
Hi.... I am 14 and i just discovered your channel so i started the python coarse you have on your channel(just started it.... And I'm a TOTAL beginner) so i just wanted to ask am i starting too soon or too late? And do you have any tips for me?
I you're willing to put in the time and effort necessary to learn programming, age don't matter.
I test the codes that I 100% think causing the issue in the interactive shell..and it helps me.. If you use other packages in your code, when it runs when you last run it, and then you install it again in the future..propably the pckage version is causing the problem..so need to check that too, try to test downgrade the package version
I'm going to start my career as an App Support Engineer. So please give me some tips how to start debugging.
Quite a thriller from programmers perspective. Kind of hangover movie, look everywhere and then realise there is just a letter/keyword issue.
Relatable. Just the other day I spent 3 hours resolving a bug only to discover wrong variable was being passed in as arg.
Hey YK. This is an amazing video. But why no more coding interview problems?
great tips! thank you!
Wow, I didnt know about Pdb. EDIT, one letter really ? 😂, btw good content
My first step when debugging is always assume the dumbest/simplest hypothesis first. I've experience SQLServer pw expirations that bubbled up into JSON validation exceptions at the API level before, and the first time it happened I was digging for hours on the Newtonsoft JSON nuget package that was used. Which is also another tip: Login failures can masquerade as something much more complicated/obfuscated.
P.S.: Is pdb in the terminal the only debugger tool available to py devs? Is there no good IDE that has this functionality built in?
PyCharm is an amazing IDE with a fantastic debugger.
Thank you. I mostly get suck while coding. In the beginning I thought it is ok because of is a part of growth but now,. I think that is too much wattage of time. Can you further tell me.
Thank you very much for sharing! ;)
please make a video on how can we understand a programming language deeply so that we can develop alogrithms easily
Yes bro