The path of advanced programming expert in refactoring

Source: Internet
Author: User

Definition of refactoring:

Refactoring is a kind of adjustment to the internal structure of software without changing the observable behavior of software.

The goal of refactoring:

1. The code is easy to read.

2. All logic is specified only in the only place.

3. The new changes will not be a crisis to existing behaviour.

4. Express the conditional logic as simple as possible.

The difference between refactoring and rewriting:

Refactoring does not change the external results, but only adjusts the internal structure;

Rewriting is a re-engineering, which may produce different external results.

Questioning about the death of refactoring:

Refactoring has its own historical conditions and scenarios, and we should not misuse refactoring.

The taste and refactoring of bad code mentioned in the refactoring book is a summary of many years of experience for others, and many good suggestions for improving the code are provided.

Refactoring is definitely a tool for beginners with code-style immaturity, and after several refactoring you are amazed to find that your code is becoming more and more prescriptive.

Attached Mind map:

For reference:

https://www.zhihu.com/question/19552812/answer/79635260

The path of advanced programming expert in refactoring

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.