< reading notes > The way to debug software: an Empirical approach

Source: Internet
Author: User

Effective debugging is not just about removing defects, it includes the following steps

    • Figure out why the software is running wrong
    • Fix this problem
    • Avoid breaking other parts
    • Maintain or improve the overall quality of your code
    • Make sure that the same problem doesn't happen elsewhere, and it won't happen again.

Build experiments, observe results

    • Dependence on observation and experience rather than theory and pure logical reasoning
    • Reading the source code, reasoning about the health of the software, usually inefficient and dangerous
    • To carefully build an experimental environment and observe the health of the software

A few questions to be clarified

Do you know what's going on?

    • Know exactly what's going on and what happens.
    • Do not rely entirely on defect reports, and the bug report itself will not be less error
    • If there is no defect report, it should be done after understanding the whole procedure.

One question at a time

    • It is difficult to debug a flaw, so do not correct several at the same time, making the situation more complicated
    • After the fix, each time you make a logical change, you check in once, if you have multiple modifications at one time, it is difficult to implement
    • Sometimes you think that a defect is caused by a cause, which is actually caused by multiple reasons.

Check the simple stuff first.

    • Many defects are caused by seeing your omissions, so don't overlook simple things.
    • Developers should avoid the NIH (not invented here, I invented the disease) and think they have to do everything themselves, even if there is a good solution
    • Ask other people on the team if they have encountered similar problems, can greatly reduce costs, save energy

< reading notes > The way to debug software: an Empirical approach

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.