Software Engineering Thought 1 - Software Engineering Basic Concept

xiaoxiao2021-03-06  65

This chapter describes the basic concepts of software engineering, and is about software engineering macro discussion. If you are the boss of the software company, you don't need to work in the first line, then this chapter is enough. But you must let employees believe that work is the greatest happiness, and let them read this book.

After reading this chapter, it is necessary to establish such a belief: Chankan in the software development process, as if it is just a face of unevenness, it can be smooth with a hot water towel. Let us hide the big banner of proceduralism, software engineering ideology, closely united around Software companies with Microsoft, along Bill Gates' live wealth, regardless of daytime, black night, and build software with Chinese characteristics The great cause of the industry is fully introduced to the 21st century.

1.1 Software Engineering Goals and Common Models

The goal of software engineering is to improve the quality and productivity of software, and ultimately realize the industrial production of software. Quality is the most concerned issue of software demand, and users are required to be genuine. The productivity is the most concerned issue of software suppliers, bosses and employees want to earn more money with less time. There is an inherent connection between quality and productivity, and high productivity must be premised on quality. If the quality is unqualified, both supply and demand are bad. From short-term benefits, pursuit of high quality will extend software development time and increase costs, which seem to reduce productivity. From long-term benefits, high quality will ensure that software development is more standardized, which greatly reduces the maintenance cost of software, essentially improve productivity, and obtains good reputation. There is no fundamental opposition between quality and productivity, and a good software engineering method can increase quality and productivity.

The representative of the software supply and demand can talk about laughter in the table, attributed to the hard work of the first-line developers. The improvement of quality and productivity is destroys programmers and program managers. For developers, if it is not possible between mass and productivity, it should be the first, productivity of the second. This is because: (1) Quality is directly reflected in each program of software, high quality is naturally the technical pursuit of developers, and also the requirements of professional ethics. (2) High quality is valuable to all users, while high productivity is only meaningful to the development side. (3) If you pursue high productivity at the beginning, it is easy to urge people to have an urgent work, leaving a hidden danger. Ning Ke can progress, but also to ensure the quality of each link, with a long-term interest.

There are many quality factors of software, such as correctness, performance, reliability, fault tolerance, ease of use, flexibility, scalability, understandability, maintenance, and more. Some factors overlap each other, some of which are in contact with each other, and it is not easy to improve the quality!

The main links of software engineering are: personnel management, project management, feasibility and demand analysis, system design, program design, test, maintenance, etc., as shown in Figure 1.1.

Personnel management

Project management

Feasibility

demand analysis

system

design

program

design

Measurement

test

dimension

Guard

Figure 1.1 Software Engineering

Software Engineering Models It is recommended to connect all links with a certain process and operate the whole process in a specification, such as the production line of the factory. Common software engineering models are: linear model (Figure 1.2), gradual modulation model (Figure 1.3), spiral model, rapid prototype model, formal description model, etc. [Pressmam 1999, Sommerville 1992].

Feasibility

demand analysis

system

design

program

design

Measurement

test

dimension

Guard

Figure 1.2 Linear model of software engineering

time

Feasibility and demand analysis

system design

programming

Measurement

test

dimension

Guard

Feasibility and demand analysis

system design

programming

Measurement

test

dimension

Guard

schedule

Figure 1.3 Asymptovic model of software engineering

The earliest software engineering model is a linear model (also known as a waterfall model). Linear model is too ideal, too simple, no longer suitable for modern software development models, almost abandoned by the industry. Even, it was filed, and it belongs to the object being derecianted. But we should recognize that "linear" is the most important way to master and skilled the application. When people encounter a complex "non-linear" problem, they always decompose or convert them into a series of simple linear problems, and then solve them one by one. The overall software system may be complicated, while a single subroutine is always simple, can be implemented in a linear way, otherwise it is too tired. Let's quote Albert Einstein as a creed - "Anything should be as simple as possible." Linear is a simple, concise is beautiful. When we understand the linear spirit, we should not use the appearance of the linear model, but should use it. For example, the substantial of the progressive model is the linear model of the segmentation, as shown in Figure 1.3. The spiral model is a linear model that is connected. The shadow of the linear model can be found in other models.

Set of fixed models is not the smart move of programmers. For example, the relationship between "program design" and "test", habits always think that the program is designed first, after testing, as shown in Figure 1.4 (a). For some complex procedures, the test is divided into synchronous tests and total tests, as shown in Figure 1.4 (b).

programming

Test

programming

Synchronous test

Total test

(A) (b)

Figure 1.4 (a) program design is divided into synchronous test and total testing in the first test in the first test.

No matter what software engineering model, there is always less than the various links in Figure 1.1. This book opens the specific software engineering model, order telling personnel management, project management, feasibility and demand analysis, system design, program design, testing, and maintenance and regeneration projects. The program design sections take C / C language as an example.

1.2 Basic strategy for software development

People have their own world outlook and methodology, which can naturally be used in life and work. Similarly, the software engineering concept in the brain of the programmer will invisibly dominate how to do things. The development of software engineering has accumulated considerable approach, but these methods are not a strict theory. Practicers should not teach the way to use methods, more importantly, learn "choose the right way" and "new ways to produce". There will be good tactics with strategy. Thousands of years ago, our ancestors wrote a lot of experience in the truth, and was used by modern people to use industrial and commercial. This section describes three basic strategies in software development: "Reuse", "Separates", "Optimization - Compromise".

1.2.1 multiplexed

Recognition refers to "using ready-made things", the literati is called "broughttee". The multiplexed object can be a tangible object or an intangible result. Rehabilitation is not a manifestation of human laziness but the performance of wisdom. Because humans always inherit the results of the former, they will continue to use, improve or innovate. So when we celebrate the National Day, we must figure out that the motherland is far less than 50 years old, and the wealth we enjoy today has the contribution of the people and the five thousand people. Advances are just what it should be, and it is possible to make it.

The connotation of multiplexes includes both increasing quality and productivity. It is understood by experience, in a new system, most of the content is mature, only small part of the content is innovative. Generally, maturity is always relatively reliable (ie, high quality), while a large number of mature work can be quickly implemented (ie, having a high productivity). Hardworking and smart people should use most of the time in a small proportion of innovation work, and the small part of the time is used in a large proportion of mature work, so you can do your work and fast. Use multiple ideas for software development, called software multiplexing. According to statistics, there have been more than 100 billion rows of procedures in the world, and countless functions have been rewritten thousands of times, which is really wasteful. Object oriented scholar's manner is "Please do not invente the same wheel". "

Software component units with a certain integration and reusable are called software components. Software multiplexing can be expressed as: Constructing a new software system can do not have to start from zero, directly using existing soft components, which can be assembled (or rationally modify) into a new system. The multiplexing method rationalizes and simplifies the software development process, reducing the total development workload and maintenance cost, which reduces the cost of software and increase productivity. On the other hand, since the soft member is repeatedly verified, it has high quality. Therefore, new systems consisting of soft components also have high quality. The process of using a soft member production application is shown in Figure 1.5.

Software multiplexing is not only to make themselves, but also let others take it convenient, it is "taken to take it". Object-oriented methods, Microsoft's COM specification [Rogerson 1999] can be used to achieve large-scale software multiplexing.

application

software

system

break down

Query Soft Software Library

Use

Piece of construction

Make new

software

definition

Required

member

set

Extracting member

exist

Create a new component

Components do not exist

Figure 1.5 Process of using a soft component production application

1.2.2

Separately, refers to the decomposition of a complex problem into a number of simple questions and then resolves one by one. This simple idea comes from the experience of people's lives and work, is fully suitable for technical fields. When the software personnel are executing, they should focus on: After complex problems are decomposed, can each problem implementation? Can all programs eventually set into a software system and effectively solve the original complex problem?

Software system

Complex problem

Solve the original problem

Sub problem 1

Program 1

Decomposition integration

Sub Question 2

Program 2

Sub-problem N

Program n

Figure 1.6 Separation of Software

Figure 1.6 shows the strategy of subdivision in the software field. The architecture design, modular design, is divided into specific performance. Software division can not be "hard to rule". Unlike the N-block in order to eat a watermelon or a chicken, the knife is smashed into n, and then pulverally stir it into the mouth, then pay the gastrointestinal to digest and absorb, symbolizes the complex problem, the chicken will disappear. .

1.2.3 Optimization - Comfort

Software Optimization refers to the quality factors of optimization software, such as improving operational speed, increasing the utilization of memory resources, user interface is more friendly, making the three-dimensional graphics of the real feeling. Want to do optimization, first let developers have the right understanding: Optimization work is not possible, but must do things. When optimization works a responsibility, programmers will continue to improve the algorithms, data structures, and program organizations in the software, thereby improving software quality.

The famous 3D game software Quake, can draw a highly realistic complex scene in real time on the PC. Quake's developers can play a lot of mature graphics technologies, such as raising the speed of BRESENHAM line, polygon cut, tree traversal, etc.. I first saw Quake felt shake, but also a blow. The technical level of this PC game software is much better than the domestic leading graphics related research results I have. This is really ironic for our growing point-to-foregoing research and development. So when we developed software exhibits a lot of non-salad, do not complain. Really, we didn't take your work well, and it's not a penny. In order to assume that after we think about ideological education, you will be ready to work for the optimization work for six or seven nights. But willing to do things don't mean things well. The complexity of optimization work is a lot of objectives, which can be described as unclear. When it is not possible to optimize all the goals, it is necessary to "compromise" strategy.

The compromise strategy in the software refers to the optimal quality of the overall quality by coordinating each quality factor. Just like some bureaucrats and character: "... In order to make the entire organization have the best combat power, we have to reuse a few people, take care of some people, and batch people in the case."

The important principle of software trade-off is to abandon one party like a matter of loss of a certain party. For example, the bottleneck of 3D animation software is usually speed, but if the speed is canceled in the program in the program, the scene will no longer meaning in the program, and 3D animation is no longer meaningful (if human is all color blind, computer graphics Learning is very simple).

People are inert, if they are allowed to abuse, then they have encountered difficulties, people will use the way to make the Western wall to make a compromise, no longer do their sense of optimization. So we need to make a strict position for compromise: make certain factors becomes better under the premise of ensuring other factors.

Let us solve the problem of "fish and bear paws" with "Optimization-Compromise" strategy.

The problem is proposed: assume that the fish is 10 yuan per kilogram, and the bear's own is 10,000 yuan per kilogram. There are only 20 yuan of people, I don't have to eat a beautiful "Bear", what should I do?

Solution: 9 yuan 9-point 9 points to buy 999 grams of fish, 10 yuan to buy 1 gum of bear, you can make a "beet fight fish". The rest of the money can also establish a reward fund.

1.3 Some incorrect concepts

This section will analyze some incorrect software engineering concepts, which can help beginners have less than a similar error.

One of the concepts: We have a set of books to develop software, and the book is full of standard and examples, which can help us solve any problems encountered in software development.

Objective situation: Good reference books undoubtedly guide our work. Take advantage of methods, techniques, techniques, techniques and techniques in books, can effectively solve a large number of common problems in software development. However, practitioners do not depend on books, because: (1) In the real work, because the conditions are very different, even if a quite mature software engineering specification, it is often unable to use. (2) Software technology has different new months, no software standard can grow up. The ancestral secret recipe is very fragrant in some areas, and in the field of software means backward.

Second: We have the best development tools, the best computer, will make excellent software.

Objective situation: Good development environment is just the necessary conditions for output results, not sufficient conditions. If you have a good environment, it is a group of mediocrity, it is difficult to protect the things that they don't do.

Third: If we lag behind the plan, you can add more programmers to solve.

Objective situation: Software development is different from traditional agricultural production, people are not necessarily powerful. If you add novices to the project behind the plan, you may be more delayed. Because: (1) Novice will produce a lot of new mistakes to make the project confusing. (2) The old man explains the work to the newbie and spending time, making the actual development time less. So scientific project plans are very important, don't care how much it is, it is right. If you run to communism in a "big leap forward", you will only have fallen consequences. The four concepts: Since the demand analysis is very difficult, no matter how three seven twenty-one first put the software, anyway, the software is flexible and can be modified at any time.

Objective situation: The more accurately grasp the demand, the less the software is repaired. Some needs are difficult to determine at the beginning, and it is constantly correcting during the development process. The soon the software changes, the less expensive, the more the price of the revision, the greater the cost, just as the treatment of disease.

1.4 Some controversial concepts

This section explores some controversial concepts, the purpose is not to get the "correct" or "wrong" assessment, but the contextual thinking of more rational thinking.

One of the controversies: If the software is slower, it is a faster computer or a faster algorithm?

Author's point of view: If the purpose of development software is to learn or study, you should design a faster algorithm. If the software has been used for business, you need to carefully consider: If you change a faster computer to solve the problem, it is the fastest solution. Although improved algorithms can fundamentally improve software running speed, it may introduce errors and delay processes. Technology is unbelieve that the latter will choose, because they feel that any opportunity to optimize is equal to crime.

Similar controversies also: Is it a buying outgoing procedure, or develop itself? Technicians and business people often have different options.

Two Controversies: Is there a best software engineering method, is the best programming language?

Author's point of view: There is no best in the field of software, only better. It is a good way to solve the problem or a good language. The programmer will feel better when learning Basic, Fortran, Pascal, C, C and other languages, and it is not awkward. Today's Visual Basic, Delphi, Visual C , Java and other languages ​​have their own strengths and are really difficult. Developers should choose the methods and languages ​​of their familiarity according to objective conditions, to ensure qualified quality and productivity.

The programming is a free and happy thing, don't swear to be loyal to a certain or self-satisfaction.

Third dispute: Is it possible to use more skill?

Author's point of view: In terms of software development, the advantage is that some problems can be solved separately, and the shortcomings are not well known. If there are too many techniques in the program, you may leave a hidden danger, and others are also difficult to understand the procedure. Given that a partial advantage is slightly negligible to the entire system, and an error may be fatal. The author is recommended to use natural way, less skill.

The story of "Three Wolves" tells us that "the skills of failure are usually technical." When we cannot judge when programming, it is useful to use the skills, then use less. The story of "selling oil" tells us "Songsheng", indicating that skills are natural, not sold out. The stunt of selling oil is to be performing to CCTV, and his old man said modestly: "Nothing is nothing, it is famible."

Dispute 4: Is the error in the software can be divided according to severity?

Author's point of view: When quantitative analysis, the wrong level can be classified to facilitate management. Some of Microsoft's development teams divide the errors into four levels [Cusumano 1996], as shown in Table 1.1. The first level is serious: the error causes the software to crash. Secondary severity: Error leads to a feature that cannot be running and there is no alternative. Three levels of serious: Error leads to a feature that cannot be running but alternative. The four levels are serious: the error is surfaced or tiny.

Table 1.1 Error four levels

The above classification is very technical and is not universal. Assuming a financial software has two errors: Error A causes the software to die, error B causes a salary calculation error. According to Table 1.1, the error A is a serious level, and the error B is a secondary level. But in fact, B is more than being a. The wage is much or less, which will cause economic losses to the boss or employees. The error a only causes the operator to be bored and does not cause economic losses. Another example is that the operating manual is wrong, according to the class 1.1 classification is a four level, but this error may cause the machine to die.

Developers should be aware that all errors are serious, there is no shortcomings. This will make less mistakes.

1.5 small knot

Software engineering disciplines have developed to today, have many methods and norms, and learning is endless. This chapter only discusses some ideas of software engineering in macro, and more specific content will be discussed later. Whether it is a good way, expensive and flexible use, and cannot be used as a panacea, not like "eating brain gold or brain gold, can make 100 million people". "

转载请注明原文地址:https://www.9cbs.com/read-119244.html

New Post(0)