InfoQ translated an article about the "estimation" of the foreigner's tucao software, called "estimation", which is a very difficult thing, such ~ . This morning, my work was in a mess and I was in a bad mood. I watched the original article links and discussions on the forum.
The author first came up with a question: Write an algorithm, and print the full text of Lincoln's "gretiesburg speech" on a 1.5 inch * 8 inch bookmarks, 13 characters in each line are required to break the line (because the Mono font is 1 inch and 10 characters, each of the paper is left with 0.1 inch blank, so a line is 13 characters ).
Let's estimate the time to implement this algorithm and give three estimates: Worst, moderate, and best. Then, implement the algorithm by yourself and compare the actual completion time with your estimation.
The author found that the actual completion time falls within the scope of his estimation, So I lamented such a "simple" (manual 5 minutes can be done), clear demand, estimation is so difficult!
Like domestic posts, the comments focus on the following topics:
Uncertain Demand
"As a developer, I am often asked how long it will take to complete a piece of puzzle, but I haven't even seen it, and I don't know whether it can be combined !" -Beager
"I have estimated the time for deploying a WordPress blog from 5 minutes to 2 weeks, but when the manager finally gave me the demand, I found that there are more than 20 pages, a large number of custom functions and plug-ins need to be deployed and developed. Do I have to delay again ?!" -Skiwiger
Some people think that they can't sit down and take the initiative to explain to the Business Owner why they can't get an estimate: "to your Business Owner, it's like asking you how much the ticket costs, but I won't tell you when to fly, where to fly, or whether to use business class! "-TargetBoy
But now there will be a bitter master against TargetBoy, saying, "You're overestimating your Business Owner! The guys with functional disorder! "Next, I began to scold you.
"Soon, the estimation turned into a 'cutting progress 'game. What they cut down is often something that makes software maintainable ." -Beager
Arrogant demands
"My boss asked me: Is it difficult to develop something like Microsoft Word that is compatible with Word? I said: it is more cost-effective to let users buy Word directly. The boss was surprised: Why ?! Me: o. O "-angrystuff
Boss: "Why can't you write a browser version of Office Word in three months ?!"
Niloc132: "If it's so easy, you should be a Microsoft idiot! If I am so awesome, I will start my own company and listen to your nonsense here ?!"
"My general answer is: Ah, this will take (2 +/-12) months, depending on my work time and whether there are other work arrangements ." -Grotgrot
Developers' Countermeasures
It's forcing lz estimation, right ~~~!
"Don't forget * 3! "-Hyperforce
"Multiplied by 3 is not enough, multiplied by PI. "-Wlievens
Case-based discussion
Of course, after the discussion, we should carefully estimate the cause and then implement this algorithm. Next we will start.
Right away, mightye gave a piece of code and running results, written in 5 minutes, and looks pretty good. This algorithm takes 13 characters from the beginning each time, finds the first space backwards, returns a line break from the first space found backwards, and repeats the above operations on the remaining characters.
Algorithm: (PHP ?)
Result:
Soon someone came out and pointed out: This algorithm crashes when it encounters a word that is equal to or greater than 13 characters!
Mightye: The requirement does not contain more than 13 characters! So I am still right! (Amazing)
Of course, some people immediately pointed out that mightye is irresponsible. As a code farmer, It is shirking responsibility to ignore the fact that more than 13 characters are not taken into account due to lack of demand, in the end, it is certainly unable to meet user needs.
I think there is a philosophical question: What is demand? Do you want to do something that the customer has not said (although you can predict the customer's needs based on experience )?
Do you want to find a clear answer for "Yes/No? Then you lose. (Or) I think the smart part of agile thinking is that, instead of looking for a direct answer to a question, I think, "How can I implement it in a light way when a customer changes their needs? ", This bypasses the tangle of people. Of course, a team composed of a team of experts must be able to do well in a fully trusted environment.
Some people use the "wordwrap" function, which can be solved in 30 seconds.
I think this raises another question: it is hard to accumulate a few class libraries! Otherwise, each Estimation starts from "0.
Below we started the code competition in various languages:
Ruby: B = a. scan (/. {, 12} \ s |. + \ z /)
Python: 13 lines of code are used.
C: 24 lines of code
Shell: fold-sw 13 (this may be Winner)
Python: after the class library is introduced, the situation changes, two rows
import textwrap print('\n'.join(textwrap.wrap(st, width=13)))
C #: A foreach statement can extract 18 rows of words directly.
Vim: Ctrl + v,: set textwidth = 13, Shift-V, gq (this is awesome, This Is My Winner :)
I tried it. You can: Learn Vim, just like the suggestion for customers to buy Word.
Haskell: 11 rows. Without class libraries, there is no way to use the function language.
In addition, there is an image and intuitive article about software estimation, "travel from San Francisco to Los Angeles".