A, GitHub address
https://github.com/amazingyp/LineCount
Two, PSP form
PSP2.1 | Personal Software Process Stages | Estimated time consuming (minutes) | The actual time-consuming (minutes) |
---|---|---|---|
Planning | plan | 30 | 24 |
· Estimate | • Estimate how much time this task requires | 30 | 24 |
Development | Develop | 1210 | 1272 |
· Analysis | · demand analysis | 15 | 13 |
· Design Spec | Generate design documents | 40 | 40 |
· Design Review | · Design Review | 35 | 51 |
· Coding Standard | · Code Specification | 20 | 20 |
· Design | · Specific design | 100 | 108 |
· Coding | · Specific coding | 850 | 901 |
· Code Review | · Code Review | 30 | 28 |
· Test | · Test (self-test, modify the code, submit modifications) | 120 | 111 |
Reporting | report | 120 | 110 |
· Test Report | · testing report | 60 | 50 |
· Size Measurement | · Computing workload | 20 | 30 |
· Postmortem & Process Improvement Plan | · Hindsight, and propose process improvement plan | 40 | 40 |
total | 1360 | 1406 |
Third, the problem-solving ideas
1. Use what language
He said that the title of this project can be used in any language, but this topic will not be affected because of the difficulty of solving the language of choice, so I chose not familiar with python, as a practiced hand project.
2. Requirements Analysis
This question needs to function parameters and given a file path, to count the number of lines to develop, while also recursive folder, to implement a wildcard, visual interface requirements. Faced with this logic is clear, and independent functional needs, my approach is "bottom-up" design (there is no term ah 0.0), which would be the first not to consider how each function call how to interact, ask yourself, you can count the number of characters in the file do? You can count the number of words in the document it? Ask yourself every time, to achieve some functions, then these functions to realize, to consider the issue in the package call. Packaged as such? Packaged into a function? The title structure is clear and simple, they just packaged in a function that is called when you can achieve the corresponding functions.
3. functions to achieve
The function should be more difficult to count the number of words, and other students, after readline processing strings, and then to statistics, other features are also similar.
4. GUI
This is not the python's strengths, not my strong suit, I used the default python Tkinter gui library visualization interface development. First contact with this thing, so the effect is not pretty.
Fourth, the design and implementation process
Functional logic program is relatively simple, not here draw a flow chart 0.0
Program is divided into three modules
--wc.py for handling various command line arguments
--function.py store statistical function of the number of different types of line
--window.py gui program
Workflow: wc.py user to input parameters, wc.py function.py call different functions according to user input parameters, the results will be returned to print at the command line.
Prior to this assignment turned, I watch a lot of students work, the organization found that the program flow chart written in Java very well, all kinds of various abstract class inheritance, to strict than my toy program. This fully embodies the characteristics of the two languages of Java and python, Java-organized, large-scale projects for development; python fast track for development of small tools.
Fifth, functional testing
1. Statistics Number of characters
2. The number of statistical word
3. statistics the number of rows
4. Statistical complex data
5. Recursion
6. graphical interface
VI Summary Reflection
By completing this project, I learned some basic python syntax, but also the first time using the PSP table, hoping to more things in a future project development school.