"The Law of Construction" reading notes - week8

  What I read this time is the first and second chapters of the construction method. Although I used some methods and accepted some concepts in the previous programming assignments, I did not have an in-depth understanding. This reading is a theoretical review and mastery of this knowledge, and an in-depth understanding of its system, which is confirmed by what has been done before.

Chapter 1: Introduction to Software

  In Chapter 1, Introduction, the book addresses the crux of the concept of software. What is software? Software is equivalent to program plus software engineering. After reading the first chapter, I feel that software development and program writing are important, but for its engineering, it also takes effort to overcome. First, from a program perspective, program values ​​refer to the source program, the code, that operates on data and obtains the corresponding expected results. At the same time, it is also necessary to take into account the problem of source code structure and management, so that the quality of the software can be guaranteed. In terms of software engineering, it is more necessary to face the needs that are closely related to reality, such as the needs of customers, software maintenance needs, project management, and user experience needs, and even more, software marketing strategies , the choice of means of competition.

  What kind of software is considered "good enough"? Common metrics are, user satisfaction, reliability, quality of software processes, maintainability. The book also discusses how to tell when a piece of software is "good enough" to be released. I think the focus is actually on the choice of users. There is no software in the world that has practical application and is perfect at the same time, that is, software that meets all needs. However, for some users, although it is not perfect, it just solves the urgent needs of a certain aspect and meets the main needs of customers. , it should be good enough to publish.

Chapter 2: Testing

  The second chapter mainly talks about how to perform various tests. My takeaways are as follows:

For unit testing:

  ①The earlier the unit test is carried out, the better, and it often takes more time to fix the bug in the later stage.

  ②Write the specification of the technical module with the unit test trial example. At the same time, the process of unit testing can also help

Help programmers document the history of this module and the rationale for design changes.

  ③ A good unit test should have the following standards: The unit test should verify the correctness of the program in the most basic aspects. Unit tests must be written by the people who are most familiar with the code (the writers are best when they write unit tests at the time of design). After unit testing, the state of the machine remains unchanged. Unit tests need to be efficient. Repeating unit tests for the same data multiple times yields the same results (try not to test with random numbers). By considering fake data, the results of unit tests do not depend on other tests, maintaining independence. Unit tests should cover all code paths (thereby optimizing complex code, performance issues, synchronization issues, issues related to external conditions). Unit tests should be integrated into an automated testing framework. Unit tests must be kept and versioned along with the production code (easy to source in case of bugs).

Regression testing:

   Regression test, that is, on the newly released module version, test the unit test passed by the previous version again to confirm whether there is a "degradation" of this module, that is, from a stable state of normal work, to a non-normal work. stable state. This process is necessary to improve test case benchmarks, or to fix additional bugs that were not accounted for during the release of a new version. At the same time, regression testing is best to be automated, because it can improve efficiency, identify problems as early as possible, and solve them as soon as possible. Generally, in the final stabilization stage of a project, the previously discovered and repaired BUGs will be found out, and a comprehensive regression test will be carried out to ensure that all the repaired BUGs have indeed been repaired without recurrence.

In terms of performance testing:

   There are two main methods of performance analysis. One is sampling, which runs fast and does not need to change the program. It is easy to find bottlenecks, but it is difficult to obtain accurate data. The second is code injection, which can accurately measure the data of each performance, but it will greatly lengthen the running time of the program, increase the data analysis time, and sometimes even affect the actual operation of the program.

   But in any case, the improvement in performance must be carefully considered and analyzed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324853762&siteId=291194637