Change the order and there may be new discoveries.

Source: Internet
Author: User
In the process of system development, or buildingProgramIn the process of development, the traditional software engineering provides a "Waterfall" development process, and in the development of specificCodeThere are also some habits of the process.

For these methods and procedures that have been passed down for a long time, sometimes trying to change the order of them will have some unexpected results.

One: test first

The traditional software engineering coding and testing sequence is: Coding-> testing. Another method mentioned in the book test-driven development is to write the test code first, and then write the code that implements the function based on the test code, that is to say, convert the sequence to: Test-> encoding. In this way, all codes are very purposeful, and the test code is a unit test code that can be executed automatically, future modifications and tests are also very convenient.

2. pseudocode

Generally, our coding habits are to write code first, then comments, or write comments while writing code. But the pseudocode method is: write comments first, and then write code. The comments completed at this time are natural languages that can accurately describe the functions to be implemented. Using these texts can help us sort out our ideas and clarify all the implemented functions, then, based on these annotations, you can complete the actual code work without ignoring the overall process because you pay attention to the implementation Language details.

In short, we cannot think that all the things in textbooks are truth, or there are many things that can be changed. Maybe they are suitable for ourselves.

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.