Let you know in advance software development (41): first to arrive at the correctness of programming, second, to consider efficiency

Source: Internet
Author: User

Article 3 part of the summary of software development

Correctness is first achieved when programming, then efficiency is considered

In the actual software development project. There are often problems with very short product development cycles. In other words, developers need to weigh the " quality " and " speed ". Detailed to the program code, the existence is whether to consider the implementation function first ( that is to ensure the correctness of the program ), or to one step do things well ( Which guarantees the correctness of the program at the same time, taking into account its efficiency )?

There is also a lot of discussion on the internet about this. Microsoft Research Asia researcher Liu Weipeng wrote an article on the first principles of programming (http://mindhacks.cn/2009/03/09/first-principles-of-programming/) , in this post. The author " What do you think is the first principle of programming?" "discussions with netizens have given you a total of 5 answers, including: Getting the most agreeable answers, getting a second answer, some of the answers that are not necessarily well known, some of the most likely answers and the most humorous answers."

Among them, "KISS" is very interesting. It requires the program to be as simple as possible, the easier the better.

In the books on programming languages ( like "C programming ") and Algorithms ( like " algorithmic design and Analysis ") , Predecessors summed up some of the features that a good algorithm or program needs to contain: correctness , simplicity , efficiency , and optimality , and correctness is at the top of the line. Therefore, in any case, the "first principle of programming" is to ensure that the program is correct , non-simple.

For most software development project architects, programming is the first step to achieving correctness. Second, consider efficiency. This is also the basic principle of software development .

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

first. The market situation is changeable. The product development cycle is very short . The so-called "world Martial arts, only fast not broken." For the rapid development of the IT industry, want to not be eliminated. You have to launch the product before others.

The company has the pressure to survive. will be passed on to the employees.

When the product is set up, the product manager will determine the delivery date of the product. At the level of the research and development manager, in order to prevent the product rework, it will be compressed on the date previously determined. At the end of each development, the development time is very short. You want to finish the program in such a short time. is already quite not easy, it is impossible to further consider the efficiency of the program, simplicity and so on. Therefore, very often, the company's big environment does not agree with developers to write very perfect code.

second, for the developers themselves, in addition to writing code to achieve product requirements, but also to do a lot of other things, including: solve the problem of field procedures, participate in project meetings. Write the development documentation. Unit test and integrated test of the program . Except for these times, there is less time to write code. It is almost impossible to write very perfect code in a very short time, so there are several versions of a product ( such as the 1.0 version number, the2.0 version number, and so on ). This is in fact a version number in the revision of the program before the error or consideration is not entirely in place. So. It is important to use correctness as the primary purpose of programming.

third. Companies do whatever the product. is to consider the cost . Assuming that the basic functionality of the product has been fulfilled, and the customer has already accepted it, it is almost unnecessary to allow the developer to re-modify the program to achieve high efficiency and as simple as possible. If you want to do this, you need to invest considerable material, financial and human resources, and its effect is not so obvious.

So. Most of the product's programs are just right. There is also a very big gap from the best. For graduates who are pursuing perfection, it may be very disappointing to assume that you have just seen the program code. But once in the company to stay long. You will be clear about the truth.

What is the tradeoff between " quality " and " speed "? Presumably you already know the answer.

(My Weibo:

Topnav=1&wvr=5 ">http://weibo.com/zhouzxi?topnav=1&wvr=5, No.: 245924426, welcome attention!


Let you know in advance software development (41): first to arrive at the correctness of programming, second, to consider efficiency

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.