Let you know software development in advance (41): correctness is first achieved during programming, and efficiency is second to consideration.

Source: Internet
Author: User

Part 1 software R & D work summary

Correctness is achieved first in programming, and efficiency is also considered.

 

In actual software development projects, product development cycle is often short. That is to say, developers need toQualityAndSpeed. Specific to the program code, there is exactlyFirst consider implementing functions(That is, to ensure the correctness of the Program), orGet things done in one step(That is, while ensuring the correctness of the program, taking into account its efficiency )?

On the Internet, there are many discussions about this. Liu weipeng, a researcher at Microsoft Asia Research Institute, wrote an article titled 《The first principle of Programming(Http://mindhacks.cn/2009/03/09/first-principles-of-programming/), in this article, the authorWhat do you think is the first principle of programming?"Discussed with netizens.5Answers, including: answers that are most recognized, answers that are second recognized, answers that are not necessarily accepted by some people, answers that are likely to be followed by the most humorous answers. Where,"Kiss"It's interesting. It requiresThe program should be as simple as possible, the simpler the better.

In the relevant programming languages (such 《C Program Design) And algorithms (like 《Algorithm Design and Analysis") In this type of books, the predecessors summarized several features required by good algorithms or programs, including:Correctness,Concise,EfficiencyAndOptimum, AndCorrectnessIs at the top of the list. Therefore, in any case, the "first principle of programming" is to ensure that the programCorrectness, Non-simplicity.

For most software development engineers, correctness is first achieved in programming, and efficiency is second considered. This is alsoBasic Principles of Software Development.

In actual software development projects, the following factors require developers to ensure the correctness of the program first, and then consider efficiency.

First, the market is changing and the product development cycle is short.. For the rapidly developing IT industry, to avoid elimination, we must launch products before others. If the company is under pressure to survive, it will be transferred to its employees step by step. When the product is approved, the product manager determines the delivery date of a product. At the R & D manager level, in order to prevent product rework, some data will be compressed on the specified date. At last, the development time was very short for every developer. It is quite difficult to write the program in such a short period of time, so it is impossible to further consider the efficiency and simplicity of the program. Therefore, developers are often not allowed to write perfect code in the company's big environment.

Second, for developers themselves, in addition to writing code to meet product requirements, they also need to do many other things, including solving on-site program problems, attending project meetings, and writing development documents, unit testing and integration testing for Programs. In addition to this time, it takes less time to write code. It is almost impossible to compile perfect code in a very short period of time, so there will be several versions of a product (such as version 1.0 and Version 2.0 ), in fact, this is where errors in previous versions or incomplete considerations are corrected one by one. Therefore, correctness should be the primary purpose in programming.

Third, the company should consider the cost for any product.. If the basic functions of the product have been implemented and the customer has accepted the product, there is almost no need for developers to repeatedly modify the program to achieve high efficiency and simplicity. To do so, it requires considerable material resources, financial resources, and manpower, and the effect is not that obvious. Therefore, most product programs are only correct, and there is still a big gap from the optimum. For graduates who are pursuing perfection, if they just see the program code, they may feel very disappointed. But once you have been in the company for a long time, you will understand the truth.

"QualityAndSpeed"How to weigh between them? You already know the answer.

 

 

 

 

(My microblogging: http://weibo.com/zhouzxi? Topnav = 1 & WVR = 5, No.: 245924426, welcome !)
Related Article

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.