Be a Better Programmer By Mastering Debugging

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 93

  • @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 4 года назад

      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

  • @simranthiara6616
    @simranthiara6616 4 года назад +30

    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”

    • @AndySterkowitz
      @AndySterkowitz  4 года назад +4

      Lol pretty accurate.

    • @mrschnider6521
      @mrschnider6521 Месяц назад

      debugging sucks, testing rocks. but who the hell has time to write good tests when your loaded over your head with so much technical debt?

  • @codestories
    @codestories 4 года назад +25

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

  • @raymondchen1294
    @raymondchen1294 4 года назад +41

    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 4 года назад +2

      This one needs to be on the top

    • @bozdowleder2303
      @bozdowleder2303 3 месяца назад

      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

  • @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 года назад +11

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

    • @mrschnider6521
      @mrschnider6521 Месяц назад

      no its not debugging sucks. unit tests are made to avoid debugging as much as possible because it can make a large codebase tottaly unmanagable if your not testing. people should be good at debugging but they should certainly not enjoy it.

  • @skhumbuzocele1330
    @skhumbuzocele1330 2 года назад +1

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

  • @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.

  • @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.

  • @jaredbowen827
    @jaredbowen827 4 года назад +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.

  • @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.

  • @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.

  • @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

  • @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 💯

  • @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! 👍👌

    • @AndySterkowitz
      @AndySterkowitz  4 года назад

      Nice! I know all about that haha. Cheers!

  • @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.

  • @SeamusMcMichael
    @SeamusMcMichael 3 года назад

    I appreciate Andy doesn't have adverts.

  • @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

  • @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?

  • @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.

  • @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.

  • @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.

  • @jaym4358
    @jaym4358 4 года назад

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

  • @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!

  • @Pareshbpatel
    @Pareshbpatel 3 года назад

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

  • @micahtrierweiler6823
    @micahtrierweiler6823 4 года назад

    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

  • @faye5108
    @faye5108 4 года назад

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

  • @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?

    • @ДеанДонков
      @ДеанДонков 4 года назад +1

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

    • @julianaburrow7131
      @julianaburrow7131 4 года назад

      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?

  • @wilbertvanbakel
    @wilbertvanbakel 2 года назад

    I was hoping for a demonstration

  • @rastemmilengephirchltechlte
    @rastemmilengephirchltechlte 4 года назад

    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.

  • @OMorningStar
    @OMorningStar 4 года назад +1

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

  • @ademineshat
    @ademineshat 4 года назад +2

    Thank you Andy 💪

  • @vaidhyanathansm7625
    @vaidhyanathansm7625 4 года назад +1

    Another great one from Andy!

  • @icarus33
    @icarus33 4 года назад +3

    Great video, bro

  • @sylver9547
    @sylver9547 4 года назад +1

    Thanks for sharing! It's really insightful :)

  • @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 🤭

  • @keifer7813
    @keifer7813 2 года назад

    9:41 Occams Razor right there.

  • @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.

  • @conchitafukunaga2607
    @conchitafukunaga2607 3 года назад

    Examples makes sense

  • @captainalpha4853
    @captainalpha4853 4 года назад

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

  • @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"

  • @Elmngh
    @Elmngh 4 года назад

    Great video Thanks Andy🌱

  • @joel9909
    @joel9909 4 года назад

    SUPER VIDEO
    I WANNA BE A MASTER DEBUGGER

  • @stevencwest
    @stevencwest 4 года назад +1

    Dude you rock!!!!!

  • @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.

  • @ab.dariefkhan1737
    @ab.dariefkhan1737 4 года назад

    Superb bro....
    Keep doing more videos 👍

  • @benoit.gerin-lajoie
    @benoit.gerin-lajoie Год назад

    IDA or OLLYDBG ?

  • @CatherineCollazo
    @CatherineCollazo Год назад

    Thank you❤😘

  • @njgamer69
    @njgamer69 3 года назад

    so it's like skyrim modding

  • @tanvirahmedsohag4086
    @tanvirahmedsohag4086 3 года назад

    How about using rust

  • @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" :)

  • @rayofsonshine
    @rayofsonshine 4 года назад

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

  • @protocode_227
    @protocode_227 3 года назад

    make 👏 few 👏 changes 👏 check 👏 often 👏

  • @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"?

  • @Rishabh-ev1fh
    @Rishabh-ev1fh Год назад

    assist alot

  • @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.

    • @ДеанДонков
      @ДеанДонков 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_ 3 года назад

    pretenders huh?