I have read such an article on CSDN. "Only 10% of professional programmers can write this applet completely correctly." the applet here actually refers to a binary search.
A paragraph in the book:
For example, 3.4 Bently [1986] requires more than 100 professional programmers to write the following brief description about the bipartite process as a program, the language is chosen by themselves .............
He reported, "I was very surprised to give them plenty of time, and only 10% of professional programmers can write this small program completely correctly ".
Determine whether the element T is included in an sorted array X [1... N. The solution to the problem by using the bipartite method is to maintain traces of areas that may contain T in the array (if element T is indeed somewhere in the array ). The starting area is the entire array. By comparing element T with the intermediate element of the array, you can narrow down the range and lose half of the array. This process continues with T being found, or the possible range of T is null.
Berntley put forward the following suggestion: "Most Programmers think that as long as the above section has
It is easy to write code by describing the binary method. However, they are wrong. If you put this article aside now, manually write the code and try it. You will believe this ."
I thought it was a bit incredible, so I tried it for a moment. The C # console program has a data source input process of three hours (two hours in this article ), I wrote this program completely correctly. :(. I thought I could do it within two hours. Alas ....
Self-deprecation: If I can concentrate more, or if I am in a good mental state, it may be done within the specified time, but it is also difficult to ask myself faster.
But this reminds me of other things. How many things can a programmer do?
There are many algorithms in a system, such as binary search, which are difficult and have a low number of codes. (The program I tried to write on the weekend evening looked like more than 100 lines.) compared with this, I completed a binary search in two hours, so I completed another algorithm in six hours. More than 200 lines of code are completed. If two hours are used for testing and integration with the system. (Maybe it is not enough to work for two hours. Normally, I think it should be four hours. Even if I work overtime.) A very professional programmer, the workload of one day is 200 rows. 20 days × 200 lines = 4000 lines of code. I don't know how much discount I should pay for it, but I know it is too efficient.
I do not know the final amount of code in the system. I am playing games, and a finished code is about lines ~ 30 thousand rows. A team can release a test version within 4-8 months (or longer. Different Development Scenarios and teams may be difficult to explain. However, I still think there is a comparability. We still complete an algorithm in six hours. During development, an architecture may be constructed, and more architectures may be combined. However, in short, the architecture will not be too complex. I don't think there will be more than three architecture combinations, the division of several modules on the basis of the architecture is not too complicated, and should not exceed 10 modules. The division of functions will continue under each module. here may be more, count as 20, function continue to divide ....
If we calculate 1x10x20x5 = 1000 algorithms, the algorithms here will be simple and complicated. At this time, you can refer to the above hours to roughly consider the development progress, you can also assign tasks to programmers.
Of course, everything is built on the foundation of your team's 10% professional programmers. I know you want to laugh. Quote one sentence: the best of luck, saving your mind.