CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    6

    How to improve my efficiency of debugging?

    [Programmatically-psychological question]

    Hi,

    I am a programmer. I work in some computer science company and I finished Master of Science in Informatics on some rather good university. Since the beginning of my career I had some problems with debugging complex problems. It is no problem for me to create some rather simple program (for example I implemented Dijkstra algorithm in Unity 3D and I co-operated with some people to create some game-prototype during Global Game Jam few days ago).
    But when it comes to debugging I have much problems, especially in analysing the architecture of very big systems. Now I am working for 1,5 year in some computer science company. The application I maintain has about 5 000 classes of code - only talking about part of the application I maintain in my team and this app is written mainly in C#, so I use Visual Studio 2010 to debug code.
    I know basics of debugging in Visual Studio rather good:
    Debugging with Breakpoints: Step Over, Step Into, Step Out, Continue, Set Next Statement, Show Next Statement, Conditional Breakpoint, Watch Windows, I know how to use call stack to see how the code goes from one method to another.
    But anyway this whole application is so complex it is hard for me to fix issues I am assigned to. Other people in my team somehow fix defects in this application. It is rather long time and I am worried about my efficiency in debugging, which is very low, especially comparing to others. This causes stress that I sometimes try to reduce by meditation (very rarely, let's say 1 time for 2 weeks) and accepting my emotions, but still stress reduces my effectiveness very much (when I am stressed it it very hard to focus on work). I have also problem with concentration on my work (which other people from my team have too, because they sometimes for example use Facebook etc. - but they can focus on their job much better than me).
    Debugging in much simpler for me when I work on small projects - for example if I see a bug in my own rather-little project - I am able to debug defect in rather short time. But the complexity of application I now maintain and my knowledge about it is limited.

    Can you give me some advices how to deal with my low efficiency in debugging? You can of course talk about various ways to deal with this (psychological, computer science, diet etc.)

  2. #2
    Join Date
    Jun 2015
    Posts
    208

    Re: How to improve my efficiency of debugging?

    Quote Originally Posted by zygmuntix View Post
    [Programmatically-psychological question]
    But anyway this whole application is so complex it is hard for me to fix issues I am assigned to. Other people in my team somehow fix defects in this application. It is rather long time and I am worried about my efficiency in debugging, which is very low, especially comparing to others. This causes stress that I sometimes try to reduce by meditation (very rarely, let's say 1 time for 2 weeks) and accepting my emotions, but still stress reduces my effectiveness very much (when I am stressed it it very hard to focus on work). I have also problem with concentration on my work (which other people from my team have too, because they sometimes for example use Facebook etc. - but they can focus on their job much better than me).
    It's impossible to know whether you're as bad at debugging as you think. You may also have been assigned a too difficult debugging task too soon in your career. The application may even be a hopeless mess no one can debug efficiently.

    Maybe you should work together with someone who has a better knowledge of the application. Someone who can give you hints as to what probably is wrong and where to look. And of course you're entitled to a workplace where you can concentrate undisturbed. Also you must ask yourself whether debugging applications all day written by others is what attracted you to software development in the first place?

    You obviously aren't happy with your current situation but no amount of meditation or dieting will help because it's rather a management problem. You must make your predicament known or nothing will change. You must discuss it with your boss however awkward you may feel about it. There's no way around.

    Hopefully your situation improves, otherwise it's time to start looking for a new job.
    Last edited by tiliavirga; February 8th, 2016 at 06:11 AM.

  3. #3
    Join Date
    Jan 2010
    Posts
    6

    Re: How to improve my efficiency of debugging?

    Thank you for your answer tiliavirga.
    The program I maintain an application with 5 000 classes in C# which my team maintains (and there are more classes, but we don't debug them, it is another company responsibility). So it is really big project. It is not such big mess as it could be. We are refactoring classes that was created few or more years ago (and there is much more code that we use but from lower layers). However classes, methods and variables have good (meaning, understandable) names and there are comments in the code (but it could be more of them of course).

    Anyway the application is really huge and it is hard to know it fully. There are two 500-pages manuals about this applications. It is rather good, but it doesn't provide all informations of course. I had problems with asking many questions to my co-workers (because I was afraid that they will say, that "you should already know about that") but in last few months I started to ask more and more questions and because of this my skill is now a little better (because I know more about the app).

    The workplace is not the problem why I am not concentrating. It is rather some psychological problem that I cannot focus on one thing, not going with my thoughts to some another. And I am stressed rather often because I don't debug efficiently.

    Debugging applications that somebody else wrote wasn't my motivation to software development. I was studying Computer Science for 5 years. I like writing mainly new code - during studies I was doing it very often (creating computer games, writing some algorithms - it was fun). When I went to the IT company it appeared to me (as to many others I think) that software development isn't mainly about writing something new. It is mainly about debugging and fixing errors in existing applications. So yes, my current motivation to computer science isn't as good as in the past. As I see I rather like to 'create' than 'maintain'. However I don't know what to do with that. Rather whole computer science is about debugging 80% of the time (or more?).

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: How to improve my efficiency of debugging?

    Hopefully the code that you are trying to debug is modular and it has a well defined interface. If it is modular, then you can start improving in the code behind the interface boundary. You can add logging, parameter checks, asserts and whatever to help you during debugging. For a large application, error logging with stack traces and gathering of input parameters are a must.

    I frequently refactor legacy code to improve the architecture, reduce duplicated code, and bring the code up to newer, proven approaches. Fortunately, I'm in a company that allows this. If you are in a company where everyone is afraid to touch the code, then you are kind of screwed.

    Good luck.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured