• Question: When you are programming , how do you react when you find a bug in the code and how do to attempt the debugging procedure?

    Asked by n3rdy to Gopal on 25 Jun 2013.
    • Photo: Gopal Ramchurn

      Gopal Ramchurn answered on 25 Jun 2013:


      I usually look at the bug trace to see where the bug is. Then, I use different inputs to check things are working as I expect them to – I basically try to force it to do something I want. If it doesn’t I can quickly understand where the mistake is.

      I also use a debugger if the behaviour of the app is very complex – that helps me walk through the code step by step as the program executes. That’s the standard way of debugging code.

Comments