Be a Better Programmer By Mastering Debugging

Поделиться
HTML-код
  • Опубликовано: 30 июн 2024
  • The ability to debug, or methodically find the source of problems in your code, is one skill that makes or breaks most new programmers. In this video I explain what debugging is, why it's important and 7 fundamentals to be a better "debugger".
    👥 ** JOIN MY GROUP **
    Looking for a high-quality group of software developers where you can discuss your ideas and not be bombarded by spam? Then come join my free Facebook group! You can access it by going to: andysterkowitz.com/group
  • НаукаНаука

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

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

    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

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

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

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

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

    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

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

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

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

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

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

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

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

    Another great one from Andy!

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

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

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

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

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

    Debugging and researching skills are critical! Great video!

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

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

    Thanks for sharing! It's really insightful :)

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

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

    Great video Thanks Andy🌱

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

    Thank you Andy 💪

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

    I appreciate Andy doesn't have adverts.

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

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

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

    Dude you rock!!!!!

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

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

    Great video, bro

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

    Superb bro....
    Keep doing more videos 👍

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

    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.

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

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

  • @user-rd2sx9eq5n
    @user-rd2sx9eq5n Год назад

    Thank you❤😘

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

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

    I was hoping for a demonstration

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

    Examples makes sense

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

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

    9:41 Occams Razor right there.

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

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

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

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

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

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

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

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

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

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

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

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

    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

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

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

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

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

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

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

    How about using rust

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

    IDA or OLLYDBG ?

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

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

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

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

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

    make 👏 few 👏 changes 👏 check 👏 often 👏

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

    if (debugger === true) {
    🤯
    }

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

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

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

    The way I debug is "I refocus"

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

    pretenders huh?