High Quality C ++C Programming Guide (Preface)

zhaozj2021-02-17  58

Forehead

Software quality is hung by most programmers instead of putting things on your heart!

In addition to full outgoing lines and real programming masters, you will read this book, your first feeling will be panic: "Wow! How can I have so many problems with C / C procedures before?"

Don't be sad, the author is just a few more than you have been more panic.

Please spend more than two hours to read this paplial scriptures, you will be beneficial, this is the suggestion of the N-1 readers in front.

First, programming old hands and masters

Since the computer has been advent, the programming has become an enviable profession. The programmer is easy to develop into a group of problems that are often self-smelling after being favored.

The "real" programmer currently passed on the Internet is said to be like this:

(1) The real programmer does not have a progress table, and only the programs that have been led, and the real programmer will let the leadership tricks.

(2) The real programmer does not write instruction manual, and the user should go to the function of the program.

(3) The real programmer almost does not write the code, if the comment is difficult to write, it is hard to read.

(4) The real programmer does not draw a flow chart, the primitive and illiteracy will do this.

(5) The real programmer does not look at the reference manual, the novice and the ghost will see.

(6) Real programmer does not write documents, do not need documents, only you can't read the programs to use documents.

(7) Real programmers think that they know what users need more than users.

(8) The real programmer does not accept the concept of team development unless he is his head.

(9) The real programmer's program will not run correctly in the first time, but they are willing to keep the machine for several 30 hours of debugging.

(10) The real programmer will not work between 9:00 am to 5:00 pm, if you see him at 9:00 am, this shows that he has been doing it now last night.

......

The more the above features are, the more levels are high, and the qualifications are old. So don't be strange, many of the shortcomings of programmers can be appreciated as the advantages. Just like the martial arts novels, those who are alone, unconstrained, and a little evil master is the most worship. I used to believe in this, and I hope that I have become the "real" programmer, the result is not good.

I have been working hard from reading a college to doctors, and I have prepared hundreds of thousands of C / C code. Have such hardships and fatigue, should I be called the programming vetera?

The software I developed with scientific research (integrated circuit CAD and 3D graphics), tens of thousands of row procedures, complex technology, difficulty. These software frequently win, there is a software to get the first prize of the first China University Student Computer Competition. A set of graphics and software libraries developed in 1995, there are still people in 2000. Luo lists these "performance", you can explain that I am a programming master?

Unfortunately, this personal feeling does not mean the fact.

During the reading blog, I have developed a 3D graphics software product of nearly 100,000 lines of C code for a year, and I ask for a true software masters in my heart. Although he never involved in the 3D graphic field, he pointed out multiple major design errors in dozens of software. It feels that the software is a gorgeous dress with paper paste, pulling a piece, poke a hole. I was stunned to realize that this software has no practical value, a year's heart and blood, and killed his software company.

People's merits usually happen to the most painful moment, after depression and heartache, I made a deep reflection of "facial wall" for half a year, re-examining the basics of software design. After the supplement "internal strength", I feel that the waist is hard. In the first half of the year after graduation, I used to find a job to the Microsoft China Institute and accept a senior software engineer of Microsoft. He lets me write a function of Strcpy.

Too easy? wrong!

Such a small function, he examines these three aspects:

(1) Programming style;

(2) Error handling;

(3) Algorithm complexity analysis (for improved performance).

No one has been so strictly examined in the university. I have been in half an hour, revised several times, he is not satisfied, let me go home. I am in the spirit to enter the "examination room" and sweat the "examination". This "master" is too much. I will reflect again.

I wrote the reficed experience to write an article on the Internet to spread, causing a lot of software developers to resonate. I have so I am fortunate to have a wide exchange of comrades from China, large IT companies such as Huawei, Shanghai Bell, ZTE and other companies. Everyone believes that improving quality and productivity is the core problem to be solved by software projects. High quality programming is a very important link, after all, software is implemented by programming.

Can our vetets and masters to write high quality programs?

Can not be met!

As far as my experience and experience, the computer education of domestic universities did not instill the concept of high-quality programming, and teachers and students also consciously care about the quality of software. The procedure of diligence is long, and there is a lot of experience in the low quality program. After eating suffering, there are some experiences, and I am very slow, I am an example.

The software developers of bachelor, master, and doctoral diploma are now everything, but they will suddenly realize the quality of "innate" when they accept college education. How many software developers have quality attributes such as correctness, robust, reliability, efficiency, ease of use, readability (understandability), scalability, reuse, compatibility, portability, etc. ? And can it be used in practice? . "High quality" can be achieved without working care!

We have a full reason to doubt:

(1) Programming veterans may be programmed for a long time to use hidden mistakes (habits into nature), I don't want to believe that it is true after it is true!

(2) Programming master can write a very horizontal code in a certain field, but it is not necessary to grasp the square quality of the software quality.

It turns out that this is true. I went to Shanghai Bell for a year, one after another, interviewed or tested nearly 100 "new" "old" programmers programming skills, and the quality qualification rate is approximately 10%. Few people can write an IF statement that fully meets the quality requirements, many programmers have a semi-solving, memory management, and ......

The leaders can't believe this is true. I have done a live trial: There is a sector new 14 master student. I will conduct "C / C programming skills" to test the bottom test before opening the meeting. I ask everyone how difficult is it difficult? All people have answered difficult. The result is no one person, and half of people have zero. The friends of the competitor have also been experimenting, and they are equally alive.

It's really not that I "my heart," or high requirements, but many software developers are not high enough for their own requirements.

You must know that the employee quality of Huawei, Shanghai Bell, ZTE is more preceding in domestic IT companies. If their programming quality is so bad, what do we dare to expect SMEs to take high quality software? Even the program is not compiled, but also talk about the revitalization of the national software industry, don't worry.

I am going to define the programming veterans and programming masters, please don't know.

Definition 1: Programmer with a long-term stable programmer is called programming old hands.

Definition 2: Programmer with high-quality programs that can have long-term stable and high quality programs called programming masters.

According to the above definition, you will get the first inference immediately: I am neither a master is not an older.

Before writing this book, I read a lot of English writing works, the more shy. Because you find that you have the basic skills of our programming failure, you will have a second-class level, but also think about any old hands and masters. I hope to be like me, the domestic land growing programmer, you can do: (1) If you know the wrong;

(2) It is often known for normal temperature;

(3) Adhere to learning, every day.

Second, this book is guided

First, please make the C / C test questions (do not look at the answer), how to examine your programming quality. Then refer to the answer strictly score.

(1) If you have only dozens of points, please don't speak, don't be too sad. The difference between programming is often due to bad habits, with human intelligence, there is no major relationship, or has a medicine to save. The worse the results, the greater the space you can progress, is China not catching the developed capitalist country in the backward? As long as you can make a decision of bad program habits, the second exam will be able to comply.

(2) If you have a test, it indicates that your technical foundation is good, I hope you can learn, constantly progress. If you haven't found a suitable work unit, you may wish to try it in Shanghai Bel.

(3) If you have more than 85 points of good results, you have an obligation and qualification for your team as "C / C programming" training. I hope you can communicate with us and promote each other. I have found a good seedllar half a year ago, I dug him to our group.

(4) If you have a full point in the case where there is no tip, I hope you can accept me to be your apprentice.

After the programming exam is over, please read the text of this book.

Chapter 1 to Chapter 6 of this book mainly discusses C / C programming style. The difficulty is not high, but the details are more. Don't underestimate, improve quality is to start from these little bit. There is no best programming style in the world, and everything is done due to demand. The team has developed the style. If you have developed your programming style, then all team members must follow. If the reader feels that the programming style of this book is more working, then use it, don't just don't do it. When people talk about it, they are not pronounced, and they will say, if they don't change, there is always regret. Programming is also the same.

Chapters 7 to Chapter 11 is the topic discussion, technical difficulties are relatively high, and they should be actively thinking about reading. Especially Chapter VI, "Memory Management", reading does not understand, understanding, do not say it can be used correctly. One of her colleagues saw the seventh chapter, I felt that "wild pointer" was well written, and I took it with me. However, after two weeks, he told me that he was busy taking a bug for two days, and he wanted not to "wild pointers" out of the question, but he had to read the seventh chapter.

Light is limited to the quality of programming, it is recommended that you read this book's reference, those are classic famous.

If your programming quality is already too close, don't satisfy it. If you want to become an excellent software developer, I suggest you read and follow the CMMI specification to make your own level rise to a step. Shanghai Bell's employees can request CMMI information to the software engineering research team of the Network Appliances, it is best to participate in the training.

Third, copyright statement

Most of this book is made of books in the author's book (not yet published). It is now constructed as a standardized document for the Shanghai Bell Network Applied Division, as a training materials.

Since C / C programming is well known technique, there is no secret. Good experience in programming should be shared, and we are doing this. The author is willing to disclose the electronic document of this book.

Copyright statements are as follows:

(1) The reader can copy, modify the content of the book, but not to tamper with the author and the unit. (2) This book must not be published or issued without the license.

(3) If the staff of the competitor gets this book, please do not use it to avoid disputes.

It is estimated that by July 2002, we will establish a CMMI 3 solution for China's national conditions. For about 1000 pages, including this book, about 1000 specification will be strictly controlled.

Welcome readers to propose criticisms to this book.

Lin Rui, July 2001

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

New Post(0)