Thursday, April 23, 2009

Structured debugging process

Debugging should never be done chaotically. Below you can find instructions how to debug in a structured way.

  1. Duplicate the Bug
    The most important, no repro no fix
  2. Describe the Bug
    Keep it in database – easier to track changes
  3. Always assume that the Bug is yours
    If bug is in your code you can fix it, if not = trouble; eliminate any possibility before looking elsewhere
  4. Divide and conquer
    Hypothesis and elimination, look into code, like a binary search.
  5. Think creatively
    Version mismatches, operating system differences, problems with program binaries or installations, external factors
  6. Leverage Tools
    Helps to investigate e.g. Error detection tools (invalid memory accesses, parameters to system APIs and COM interfaces)
  7. Start Heavy Debugging
    Much time on exploring program's operations
  8. Verify that the Bug is fixed
    Easy when isolated module, harder in critical code – verify for all data conditions, good and bad & regression. Changes to critical code => inform the team!
  9. Learn and Share
    Summarize what you have learned and share with colleagues – helps eliminate the bug faster.

Of course there is no need to follow all the steps. If the bug is found and fixed just go directly to the step no.8

The steps are taken from an excellent book "Debugging Applications for .Net and Microsoft Windows" by John Robbins.

Wednesday, April 1, 2009

Windows Developer .Net 3.5

I have upgraded MCPD Windows Developer .Net 2.0 to .Net 3.5 by passing following exam 70-566: Upgrade: Transition your MCPD Windows Developer Skills to MCPD Windows Developer 3.5

The exam has two parts, the Technology Specialist part, with 20 questions and the second one, the Pro, with 25 questions. From 'upgrade' exam I expected more questions strictly about .NET 3.5 features but actually there were plenty of general Windows Development questions, many similar to those from both TS and Pro .Net 2.0 exams. The main benefit is that in order to get .Net 3.5 certification you have to, instead of passing two exams with about 45 questions each, pass one two parts exam with 45 questions.

I have been thinking about next step and decided not to extend skills with other technologies (e.g. ASP.NET), but rather specialize and improve skills in my current domain, which is .Net Windows Development.