Be a Better Programmer By Mastering Debugging

Поділитися
Вставка
  • Опубліковано 24 сер 2024

КОМЕНТАРІ • 91

  • @AndySterkowitz
    @AndySterkowitz  4 роки тому +18

    How are your debugging skills at this point? Did this video give you any valuable tips on how to improve them moving forward?

    • @meetthereqs
      @meetthereqs 3 роки тому

      I work as a product support analyst looking to grow into a full-time SE role and working on independent projects can be discouraging. I even had the impostor syndrome at times, this was very reassuring! Lots of these tips I can apply to my day job too.
      I appreciate this video. thanks @Andy

    • @SeamusMcMichael
      @SeamusMcMichael 3 роки тому

      Mine are non-existent.

    • @lizzymichaels
      @lizzymichaels 3 роки тому

      Very helpful.. thank You

    • @mr.fanstastic9010
      @mr.fanstastic9010 Рік тому

      @@lizzymichaels this video would be so much better if there was a practical side of it

  • @codestories
    @codestories 4 роки тому +23

    Being able to debug is a good sign that you understand the logic behind your code. Great advice, Andy!

  • @simranthiara6616
    @simranthiara6616 4 роки тому +29

    I saw a funny quote on reddit that said, “debugging is like being a detective in a crime movie where you’re also the murderer”

  • @AllyrionWW
    @AllyrionWW 4 роки тому +7

    I’m still very new to coding but debugging is actually one of the attractive parts of coding to me. I love trying to find small problems and looking at things from different angles. This might not be the case when it’s actually my job but hopefully it’s not too painful since I like it from the start.
    Great video Andy!

  • @mikaeljacobsson1437
    @mikaeljacobsson1437 4 роки тому +10

    Debugging is one of the fun and interesting parts of programming.

  • @raymondchen1294
    @raymondchen1294 4 роки тому +39

    The 7 Fundamentals To Be A Better "debugger"
    1. Mindset Change
    2. Read Error Message
    3. Using Debugging Tools
    4. Double Check Logic
    5. Assume Human Error
    6. Small Changes
    7. Take Mental Break

    • @TheOscarJB
      @TheOscarJB 3 роки тому +2

      This one needs to be on the top

    • @bozdowleder2303
      @bozdowleder2303 17 днів тому

      I think the most important thing is that you don't assume your code works because there were no compilation or runtime errors. The really bad errors are where the code doesn't do what it's supposed to, maybe in just one isolated corner case. So test your code over a range of data, especially corner cases and satisfy yourself as to the logic. One other point. Make a point of deleting all temporary variables when you're done with it(In Java, C etc, this can be done using codeblocks} But always do that, expressly deleting variables if necessary. Temporary variables that held on to values from a different part of the code are a big source of errors in a lot of code. At the same time, use temporary variables rather than the main variables with long names in the process-heavy parts of the code. The final assignment to the main variable can be done in the end. Reduces the chances of the misspelling errors he talks about in the video. Finally if you are going to use print statements or whatever to debug the code, it's a good idea to save the file with a separate name first. This way you don't have to worry about adding further bugs by your experiments. And it's good to list the lines where you've made changes in a temporary comment as you go on

  • @deonrich3149
    @deonrich3149 4 роки тому +7

    Haha, its really funny you made this! I was just sitting at my desk with pen and pad trying to find the root of a problem in some code (I found it yay :) ) and my phone was sitting beside me and gave me a notification of your video lol. Good timing Andy! And great video! 👍👌

  • @agentm83
    @agentm83 4 роки тому +1

    I've actually recently gotten to the point where I'm debugging my code in my project. I've definitely been Googling for solutions. Useful video, thanks.

  • @dhumar
    @dhumar 4 роки тому

    Perfect topic and dead on right about it. It is so easy to make a minor mistake while coding learning the debugger is an requirement. Reading and understanding the errors and stepping though the code is extremely important.

  • @AmelynnHisham
    @AmelynnHisham 2 роки тому

    I never heard of diffused thinking before and this is so true for me! I thought it was just me who always get problems figured out when I step away from doing code and I always wondered why it happened. Thanks for the new info. All your points are very relatable 💯

  • @jaredbowen827
    @jaredbowen827 3 роки тому +1

    Check the number and order of (), [], and {}. For example : Add the number of the first ( and subtract the number of last ). If this is 0 then the number of them is correct. Anything else and you got an ()s error.

  • @SeamusMcMichael
    @SeamusMcMichael 3 роки тому

    I appreciate Andy doesn't have adverts.

  • @markfactor5952
    @markfactor5952 4 роки тому

    For some of us beginners we also need this video so as to b very careful while writing codes and to know first hand the task at hand and be prepared for it

  • @skhumbuzocele1330
    @skhumbuzocele1330 2 роки тому

    Debugging without actually showing any examples or actual real life example of debugging. Great it is an honor to to you.....

  • @frog42
    @frog42 4 роки тому

    As a puzzle-loving gamer, I can really attest to the diffusive thinking. By giving your mind a break, you give it time to cool down and a good chance to refresh and tackle the problem(s) in a new way. One time I had a dream on how to beat a level I struggled for, for days and it was exactly what I needed.
    Bone headed mistakes will happen. I try my best to mitigate them but I'll still somehow skip over that semi colon key. Take it slow. I have a mental checklist of simple issues I look for in my code first like missing semi colons.

  • @sree1149
    @sree1149 4 роки тому +1

    Thank you Andy, this was useful and one of its kind ☺️ please do a video on testing the solutions we develop

  • @jaym4358
    @jaym4358 4 роки тому

    Great advice! Your videos actually help. Thank you for posting this and please keep posting videos like this.

  • @ademineshat
    @ademineshat 4 роки тому +2

    Thank you Andy 💪

  • @faye5108
    @faye5108 4 роки тому

    I love you. Thank you so much for your content. I’m tuned-in for the night.

  • @vaidhyanathansm7625
    @vaidhyanathansm7625 4 роки тому +1

    Another great one from Andy!

  • @keifer7813
    @keifer7813 2 роки тому

    9:41 Occams Razor right there.

  • @carlosquinones7560
    @carlosquinones7560 3 роки тому

    THIS. THIS. THIS. ABSOLUTELY THIS.
    The FIRST thing you want to learn about programming at all is LEARN HOW TO DEBUG.
    Everything you said in the video is 100% spot on you can't miss any of this stuff. But definitely the most important lesson here is DON'T ASSUME, EVER. Your assumptions are going to be challenged at every step of the design process and it is important to SLOW DOWN and learn how to diagnose the problem. I personally like to systematically remove the most recent thing from a program and return to the most recent functioning version and slowly add everything back until I find out what the problem is. Then I take a closer look, replace, remove, fix etc. whatever the problem is and then run test after test after test to make sure the programming is rock-solid and your issue is 100% fixed.
    I think the most important thing you can learn in programming is learn how to slow down and carefully write your code and have a roadmap prior to writing this code. Keep a notepad to write down your concepts and re-examine it as you program and debug your code until you have achieved your vision or at least the closest you can to your vision.

  • @KGcodes
    @KGcodes 4 роки тому

    Debugging and researching skills are critical! Great video!

  • @ThunderSlav
    @ThunderSlav 4 роки тому +7

    I need to learn how to debug my brain..

    • @ademineshat
      @ademineshat 4 роки тому +1

      It's the same thing with code 😂

    • @deonrich3149
      @deonrich3149 4 роки тому +1

      Meh too

    • @ThunderSlav
      @ThunderSlav 4 роки тому

      @@ademineshat im gonna need more than that.. A wrench in the head, couple of times, a slavic way of fixing things.. Hopefuly, that will do, and then ill reboot..

    • @RamLaska
      @RamLaska 4 роки тому +1

      Metacognition. Thinking and analyzing the way you think. It's super powerful.
      Pump the brakes on an emotional rise or depressive mood and vivisect it as it attempts to take over.
      Nothing quite like it.

  • @icarus33
    @icarus33 4 роки тому +3

    Great video, bro

  • @PandasInMoscow
    @PandasInMoscow 4 роки тому +1

    Hey Andy, great video! I might have missed it, but I was wondering if you would cover what type of projects that you feel are the best to have on your portfolio? I’ve heard from so many different sources/videos varying opinions on projects. Some say that to be a developer all you need is to have something kinda challenging like a bug-tracker, while others say that it doesn’t hurt to have smaller projects like tic-tac-toe or sudoku solvers on your portfolio. What do you think? I’d love to hear your thoughts on this.

  • @sylver9547
    @sylver9547 4 роки тому +1

    Thanks for sharing! It's really insightful :)

  • @Pareshbpatel
    @Pareshbpatel 3 роки тому

    Great background video on Debugging. Thanks, Andy.
    {2021-08-04}

  • @conchitafukunaga2607
    @conchitafukunaga2607 3 роки тому

    Examples makes sense

  • @wilbertvanbakel
    @wilbertvanbakel Рік тому

    I was hoping for a demonstration

  • @OMorningStar
    @OMorningStar 4 роки тому +1

    Working on a semi team. My rule is: if something is not working, it is the humans fault.

  • @user-rd2sx9eq5n
    @user-rd2sx9eq5n Рік тому

    Thank you❤😘

  • @SyedAli-bq4rc
    @SyedAli-bq4rc 4 роки тому +2

    The biggest mistake I've made in my life that I wasn't learning, I was memorizing. That's how I couldnt do anything . I can't even solve programming challenges. Guys please give me some tips . What do I do ?

    • @preciousadedibu1821
      @preciousadedibu1821 4 роки тому +1

      try taking all these coding challenges or try using hackerrank or leetcode to upgrade your problem solving skill. These challenges will force you to improve your ability to learn because you will constantly have to do research on your own from several sources and pool all these information you get to solve those problems.

    • @youcandothis11
      @youcandothis11 4 роки тому

      Maybe start some simple programming project.

    • @JanJeronimus
      @JanJeronimus 4 роки тому +1

      When learning do not only repeat the programming examples on your computer. Also make little changes to check if you did understand it and test it on tour computer. Also think about similar things you can do with items you have learned and try them.

    • @SyedAli-bq4rc
      @SyedAli-bq4rc 4 роки тому

      @@JanJeronimus Thanks man

    • @veer5787
      @veer5787 4 роки тому +1

      Stop memorizing stuff and take your time to complete coding challenges....also there will be times you will not understand anything but it just happens and it's OK!

  • @Elmngh
    @Elmngh 4 роки тому

    Great video Thanks Andy🌱

  • @stevencwest
    @stevencwest 4 роки тому +1

    Dude you rock!!!!!

  • @pierreabbat6157
    @pierreabbat6157 4 роки тому

    Which do you prefer, gdb or lldb?
    Once your code is working properly, you may want to make it run faster. You'll need to see which part of the code is taking the most time; Valgrind is a good tool for this.

  • @logixindie
    @logixindie 4 роки тому

    I used to see the term debugging and debug mode here and there but wasn't sure what it is. Anyone who just starts coding would already be debugging a few times.

  • @weaver3636
    @weaver3636 4 роки тому

    You landed your first job after 1 year of teaching yourself how to program. Did you follow any roadmap or did you come up with your own study pattern?

  • @joel9909
    @joel9909 3 роки тому

    SUPER VIDEO
    I WANNA BE A MASTER DEBUGGER

  • @ab.dariefkhan1737
    @ab.dariefkhan1737 4 роки тому

    Superb bro....
    Keep doing more videos 👍

  • @beeah1193
    @beeah1193 4 роки тому +8

    Debugging is like the last hope you can have when your code doesn't work lol. Once you get hands on debugging it becomes a habit.
    Also looks like I have a crush on Andy 🤭

  • @micahtrierweiler6823
    @micahtrierweiler6823 3 роки тому

    The other day I was trying to make a api call based on the some logic and it wasn't throwing any errors and it was doing what I wanted it to do just not when I wanted it to do it... So I spent quite a bit of time working through my api and working through the way I was fetching it and storing it on the font end but everything was looking correct... So I was like I need to go do somthing else for a minute... When I came back I immediately noticed that I just put the the call I wanted to perform if the if statement was false inside the if statement 🤦🏻‍♂️. Some times you just need to step away haha

  • @esteller5127
    @esteller5127 4 роки тому +1

    Very nice video :).
    What I'm going to say is not really related to the video, but I still hope I'll get some help.
    I'm in the beginning of my learning and I already saw that my biggest problem is my way of learning. It's too academic. I tend to just learn the lessons and try the given examples but that's all...
    It's like I'm too afraid to actually code and try things (maybe I'm too afraid to see that I still suck at coding?). What's very frustrating is that I do know that learning code like that is not the best...but I can't let my academic habits go...
    Did that happen to some of you? How did you overcome this?

    • @user-nk1om2tr4y
      @user-nk1om2tr4y 4 роки тому +1

      It'll get better with time. Try to be consistent about coding.

    • @julianaburrow7131
      @julianaburrow7131 3 роки тому

      Do the tutorials then use what you have learned to write your own application.
      How about an application to manage ‘Manufacturers’ and the ‘Widgets’ that they make?
      Think about ALL the potential issues: what happens to the widgets if you delete a manufacturer (which should never happen - you should make the manufacturer ‘inactive’)? Can you transfer a widget from one manufacturer to another? What about duplicate names etc?

  • @rastemmilengephirchltechlte
    @rastemmilengephirchltechlte 3 роки тому

    Thanks for this video I have 1.6 year experience I don't know is I have ability to work on another company or project but I works on Linux on SET TOP BOX software where i do 90% bug resolve and debugging in java, and I can say I have command on debugging So I want to know answer all my IT seniors who reading this comment is I can work on another company or not
    Thanks Waiting for your reply.

  • @Rishabh-ev1fh
    @Rishabh-ev1fh Рік тому

    assist alot

  • @limitess9539
    @limitess9539 Рік тому

    Also blame someone else in a joking manner, makes it more fun and easier:
    Examples in C:
    "Looks like Ritchie is ddosing my code again"
    "Ritchie WILL pay for that"
    "That Ritchie bastard is spamming packets again"
    "I knew it! It wasn't me, it was this compiler all along. It's specifically programmed to ruin my code, recognizes the style and then doesn't run it on purpose"
    "This compiler has a grudge against me I swear, I need to see who programmed this compiler, investigate those people"

  • @tanvirahmedsohag4086
    @tanvirahmedsohag4086 3 роки тому

    How about using rust

  • @KatRollo
    @KatRollo 4 роки тому +1

    "You are going to reference the variable in the wrong time. That's software development."
    Nope that's JavaScript. Because it let's you fail silently. :))
    Jokes aside, great video Andy.

  • @benoit.gerin-lajoie
    @benoit.gerin-lajoie Рік тому

    IDA or OLLYDBG ?

  • @rayofsonshine
    @rayofsonshine 4 роки тому

    Every time I see your blue bullet points it makes me hungry for cheeto puffs xD

  • @zacharypeterson4178
    @zacharypeterson4178 4 роки тому +2

    I should probably learn how to open the IDE first

    • @deonrich3149
      @deonrich3149 4 роки тому +1

      lmao I believe in u man

    • @RamLaska
      @RamLaska 4 роки тому +2

      Or don't. Learn coding with nothing more than a text editor. It slows things down, but helps you learn as well.
      Some times I enjoy getting away from the IDE. It helps to actually be so wrong that the program won't even start. You learn a ton that way, vs. fixing the error as soon as the IDE flags it in red.

  • @daniel71626
    @daniel71626 4 роки тому

    Im usually debugging when i write php code, but mostely console.log() in javascript.

  • @captainalpha4853
    @captainalpha4853 4 роки тому

    Hey! what are you thoughts on someone who wanna be an Android app developer?

  • @protocode_227
    @protocode_227 3 роки тому

    make 👏 few 👏 changes 👏 check 👏 often 👏

  • @joaoparis2852
    @joaoparis2852 4 роки тому

    so you're in the shower thinking about your dirty code han?! hahah jk great video ! the part about bringing some creativity to solve your code's problems is really true ! there's allways another way of doing things, and we should allways remeber that the system is never wrong (we are xD)...

  • @fullViewJay
    @fullViewJay 2 роки тому

    Fundamentals 1 - 4 === "CRUD" :)

  • @projectzeus7894
    @projectzeus7894 2 роки тому

    so, yeah sorry, a quick one, are you saying you learnt programming in one year, like you literarily 'self-taught' yourself in 2014 and landed your first job in 2015? and please how was that like really possible...and yeah i know that you don't need to be a total expert to land a job, so the question was actually, ''is that really possible to self-learn in just one year and land a job"?

  • @njgamer69
    @njgamer69 2 роки тому

    so it's like skyrim modding

  • @soheal3674
    @soheal3674 4 роки тому +2

    andy I give up, 6 years of trying to become a programmer and still no job. I am nothing

    • @RamLaska
      @RamLaska 4 роки тому +3

      You're a hell of a lot better than nothing. Give yourself some credit.

    • @Chapz725
      @Chapz725 4 роки тому

      Try finding a mentor.

    • @user-nk1om2tr4y
      @user-nk1om2tr4y 4 роки тому

      A very small fraction of the population knows how to code.

  • @KiethLemon
    @KiethLemon 4 роки тому

    if (debugger === true) {
    🤯
    }

  • @yytambaya3120
    @yytambaya3120 4 роки тому

    The way I debug is "I refocus"

  • @helloww_
    @helloww_ 2 роки тому

    pretenders huh?