Feelings of reading "Code Encyclopedia"

This week, I started to read the book "Code Encyclopedia", and I will share with you the gains and experiences of my reading this week.

Chapter 1 Welcome to the world of software construction

This chapter starts with an introduction to what a build is, which in my opinion consists of a number of different activities:

■Defining the problem

■Demand analysis

■Planning and building

■Software architecture or high-level design

■Detailed design

■Coding and debugging

■Unit test

■Integration testing

■Integration

■System test

■Guaranteed maintenance

Why is software building so important? The author gave a series of reasons, but I think the main reason is that the construction activity is the only work that is guaranteed to be completed. We all know that an ideal software project requires requirements analysis and architectural design before construction, and in After the project is built, it also requires a lot of system testing and maintenance to make the project truly close to perfection. However, some programmer teams often do not have enough reasons for various reasons when developing projects. , so they will choose to skip some preparatory work in the early stage, such as requirements analysis and architecture design, and start coding and debugging directly. In this regard, I have a deep experience. In the last semester's electronic design practice 2-1 course, our team did not carry out architecture design for some reasons, but directly entered the link of programming and debugging, although it seems that this kind of The way is not to be advocated, but in the end the project can still be completed. At the same time, the link of system testing and maintenance can also be omitted, but there is no way to ensure that the developed project can survive for a long time, and it may only survive for a few days before completely losing users. However, software construction cannot be omitted anyway, because the failure of this link means the failure of the entire project.

Chapter 2 uses metaphors to understand software development more fully

I have little insight into the content of this chapter, mainly because I do not have much understanding of the concept of metaphor, so I can only briefly talk about my understanding. If there is any mistake, I hope you can correct me. The Code Encyclopedia proposes the concept of metaphor. A suitable metaphor is to create a suitable model, which is the process of modeling. The right model can be one where you pay more attention to the most important aspects and ignore the rest of the lesser aspects, it is instructive.

Chapter 3 Think Before You Act: Preliminary Preparation

Early preparation is very necessary, because if there is no sufficient preliminary preparation, the final result is likely to fail. This is not sensational, but a conclusion based on the experience of predecessors, so Mr. Deng has been emphasizing that we Be prepared in advance - the first step is demand analysis, because if the needs of users are not accurately analyzed, it means that the website or app made does not capture the pain points of users, so the number of users will not be particularly large. , and it is possible to give up using the product after just experiencing it.

In addition to the requirement analysis prepared in the early stage, there is also the link of architecture design. If the programmer has defects in this link, it will cause great trouble in the maintenance of the code in the later stage, because if the designed architecture is compared Confusion, if you want to add code to it to achieve more functions or fix bugs, it will become extremely complicated, because the chaotic architecture often leads to coupling between certain parts of the code, and it will be very big work if you want to add it. The amount of time, programmers can only spend a considerable amount of time modifying or even redesigning the architecture (which will take even more time). I have had such an experience. Once when I was programming, I did not design the architecture carefully in order to pursue speed, which also led to the coupling of the code I wrote. It was very troublesome when I debugged and added code. It took three or four hours to fix a small problem with the output order.

So how can we design a better architecture? Before programming, programmers can think about the following questions in their minds: How is the program organized, how does each module communicate, and what is each module responsible for? Have the main classes been defined, and what are the main data? What data structures are needed? Has the general user interface been designed? Have you considered security issues? Is there any way to check whether the data entered by the user is legitimate? ...I think if programmers can answer all these questions before programming, they can design better products.

Guess you like

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