One, estimated time-consuming and actual time-consuming
PSP2.1 |
Personal Software Process Stages |
Estimated time/h |
Actual Time/h |
Planning |
Plan |
1 |
1 |
Estimate |
Estimate how long this task will take |
1 |
1 |
Development |
Development |
14 |
28.5 |
Analysis |
Demand analysis (including learning new technologies) |
2 |
3 |
Design Spec |
Creating a design Document |
0.5 |
0.5 |
Design Review |
Design Review (and colleagues review design documents) |
0.5 |
0.5 |
Coding Standard |
Code specification (to develop appropriate specifications for current development) |
1 |
0.5 |
Design |
Specific design |
1 |
3 |
Coding |
Specific code |
5 |
10 |
Code Review |
Code review |
1 |
3 |
Test |
Test (self-test, modify code, commit changes) |
3 |
8 |
Reporting |
Report |
4 |
5 |
Test Report |
Test report |
2 |
3 |
Size Measurement |
Computational effort |
1 |
1 |
Postmortem Process Improvement Plan |
Summarize afterwards and propose process improvement plan |
1 |
1 |
|
Total |
19 |
34.5 |
Second, improve the performance of the program
Since the beginning of the program design without a good planning process of the specific structure, many modules are in the code at the time of writing, which has a lot of cross-section of the function, which makes later in the performance of improving the workload is relatively large and has some difficulties.
For example, when I first completed the program, I put the computational function in the main function, which makes the modularity of the code less characteristic, and to a certain extent, reduce the efficiency of the operation. After thinking, I decided to integrate the computational steps into the random number class (Randomnumber Class) with the following code:
public void Add (Randomnumber E2) {
int LCM=LCM (Deno,e2.deno);
Ele=ele*lcm/deno+e2.ele*lcm/e2.deno;
DENO=LCM;
int gcd = GCD (Deno, ele);
Ele/= gcd;
Deno/= gcd;
if (Deno = = 1)
Isint=true;
SetValue ();
}
public void Sub (randomnumber E2)
{
int LCM = LCM (Deno, E2.deno);
Ele = ele * Lcm/deno-e2.ele * LCM/E2.DENO;
Deno = LCM;
if (Deno = = 1)
Isint = true;
SetValue ();
}
public void multi (randomnumber E2)
{
Deno *= E2.deno;
Ele *= E2.ele;
int gcd = GCD (Ele, Deno);
Ele/= gcd;
Deno/= gcd;
SetValue ();
}
public void Dev (randomnumber E2)
{
Deno *= E2.ele;
Ele *= E2.deno;
int gcd = GCD (Ele, Deno);
Ele/= gcd;
Deno/= gcd;
SetValue ();
}
After such improvement, the efficiency of the program in the calculation is improved obviously.
Third, the Code test
Because I used the console input for this job, there was a big difference between the input and the original requirements at the time of the test. In the test, the program satisfies the requirement of generating up to 10000 questions, and also satisfies the requirement that the denominator and integer parts do not exceed range. The overall compliance with this job requirements.
Iv. Impressions and gains
As you can see, I still have a large discrepancy between the estimated time and the actual times of this assignment. After this job, I think the root of the problem lies in the design of this piece, because of their own slack in designing, many specific details of the problem has not been fully to understand the urgency of writing code, many functions and classes are in the writing process of arbitrary design, This leads directly to the logical confusion of the late programming code and the crossover of functions between the different classes. In the future software development process, I must pay attention to the initial design of the software, fundamentally eliminate the mistakes of this operation.
Personal project Summary