Debugging: 95% Of Software Engineers Are Lacking In This Skill

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

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

  • @RahulPandeyrkp
    @RahulPandeyrkp  Год назад +28

    My actual advice for debugging is to play 'Everything Has Changed' by TSwift on repeat

  • @gdthegreat
    @gdthegreat Год назад +5

    Just started video, not yet completed, but can say - 100% right - debugging is best skill as you said.

  • @patrickglinski329
    @patrickglinski329 11 месяцев назад +1

    Yea brotha, your RUclips channel is gonna blow up. Very high quality content here. Thanks

  • @mnchester
    @mnchester Год назад +11

    Great video!
    Unfortunately in some companies it's not allowed to input company code into ChatGPT or similar software

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

      True, although this will certainly change over time as companies start to leverage AI more and more

  • @michaelalls8230
    @michaelalls8230 Год назад +1

    I love debugging. It’s like being a detective or figuring out a puzzle

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

      Few things match the elation of fixing a challenging bug :)

  • @Sanyu-Tumusiime
    @Sanyu-Tumusiime Год назад +3

    nobody talks about how painstakingly diffuclt it is to truly debug. you have no idea how much pain it is

  • @aldrinseanpereira140
    @aldrinseanpereira140 Год назад +8

    I cant stop thinking about how amazing your advice and Taro is. Its unimaginably helpful. (Although tough to implement practically in this case so far but its still the best)

  • @Reavenk
    @Reavenk Год назад +2

    Not 100% relevant to debugging others' code, but when *writing* debuggable code:
    - Don't duplicate similar code (DRY), all relevant logic should run through a single bottleneck in functionality. A bug for a single thing should happen consistently, should expose itself fast, and should be fixed everywhere by only fixing it once.
    - Don't do declarative programming on complex things with many side-effects. Gratuitous declarative programming is a fast way to launder bugs with working code by mixing them all together on the same debug line-step (and a way to make it easy to gloss over using the wrong algorithms and data structures).
    - Break out code into multiple lines instead of having functions nested in functions (nested in ternaries, nested in linq calls, nested in linq calls).
    - Feel free to put temporary data into temporary variables. You get to describe it with a variable name (self-commenting code), a debugger step to see its value, and it'll be optimized away when the time comes to release build.
    - Asserts and defensive programming. And prefer static asserts when possible.
    These make stepping through code with the debugger (breakpoints, conditional breakpoints, watchlist, callstacks) an order of magnitude easier.

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

    Would like to see a video explaining bottom up and top down debugging

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

    Pretty well explained. ChatGPT might not always work due to two reasons:
    1. Overall complexity is too much to explain it to an AI.
    2. Its simply proprietary information.
    But other than that chatgpt can surely help to understand some basic flows. Like you could say the function executed like this, what could have possibly gone wrong

    • @RahulPandeyrkp
      @RahulPandeyrkp  Год назад +1

      True, although #1 will almost certainly get resolved over time as AI becomes more advanced

  • @TimilehinOlowu-m2y
    @TimilehinOlowu-m2y Год назад

    Thanks for the video Rahul i love it ❤

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

    Are there some good books/tutorials/courses to learn the art of debugging ?

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

      Even more so than learning to code, learning to debug is best done by doing the act. Just start debugging (if you're totally new, start with pair programming/debugging)

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

    good advice

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

    what was the step 1 before chat gpt?

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

      Understand the relevant part of the codebase, and ideally be able to repro the issue.

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

    I'd be careful pasting in your companies code to chatgpt for interpretation. InfoSec at your company may not like that

    • @TimilehinOlowu-m2y
      @TimilehinOlowu-m2y Год назад

      Yeah that's true

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

      There are probably 10+ startups that are working to solve this problem!

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

      @cmg575 this is a paranoid statement, they can't make the next Facebook based off 0.00002% of the code in it. Infosec has other actual problems to worry about

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

    Solid

  • @Abelmengesha-sp6lv
    @Abelmengesha-sp6lv Год назад

    I love you man

  • @robbie1290
    @robbie1290 Год назад +1

    Haha, I'm glad I saw the original thumbnail 😂

  • @Han-ve8uh
    @Han-ve8uh 2 месяца назад

    3:36 mentions bisect then revert. Wouldn't this make the commit history really dirty if every bug fix requires adding a revert commit? Is this revert commit later editted/renamed to be the actual fix?
    Also are such reverts done on local copies of the system, or on dev/staging environments? What if the bug only happens on production and is not reproducible on dev/staging (does this ever happen?), how do you integrate locally running services, with production during the bug fix process?

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

    wow the production value of these videos has gone up dramatically. super sick!