Winter operations (2/2) - Statistics epidemic

Winter operations (2/2) - Statistics epidemic Deadline: 2020/2/18 23:00:00

This work belongs courses https://edu.cnblogs.com/campus/fzu/2020SpringW
Where the job requires https://edu.cnblogs.com/campus/fzu/2020SpringW/homework/10281
The target job <Development of the epidemic statistical procedures, learning to use github, github desktop, IEAD, Jprofiler>
Text of the job Underneath
Other references github, CSDN, rookie tutorial

Github repository address

PSP table

PSP2.1 Personal Software Process Stages Estimated time consuming (minutes) The actual time-consuming (minutes)
Planning plan 120 60
Estimate Estimate how much time this task requires 1680 1860
Development Develop 700 800
Analysis Needs analysis (including learning new technologies) 120 90
Design Spec Generate design documents 60 80
Design Review Design Review 30 10
Coding Standard Code specifications (development of appropriate norms for the current development) 30 20
Design Specific design 60 30
Coding Specific coding 400 600
Code Review Code Review 30 20
Test Test (self-test, modify the code, submit modifications) 30 15
Reporting report 40 60
Test Report testing report 60 45
Size Measurement Computing workload 60 45
Postmortem & Process Improvement Plan Later summarized, and process improvement plan 60 45
total 1800 1920

Description of problem-solving ideas

  • 1. procedures substantially concepts

    After reading the title, the content can be roughly divided into the following elements:

1. To read the log file, so we need to read a class file of the package, can be given all information transfer path to the file's attribute class.

2. To the output file, so we need to write a package file for the class, such properties can be obtained to read class files, all of the obtained information to a file in a specified path.

3. To obtain the parameters of the command line, it is possible to build a command line-based interpretation, the main function of the string class attributes passed args [] str. And then treated by the method of analysis of the class str array, which ultimately determine the output file information, which should not be output.

  • 2. Access to relevant information

    1. First, first determine what language to use to complete this job, I chose to use the JAVA language. So I'll review some of the basic grammar of JAVA, a relatively comprehensive review.

2. After the review, we can begin to review some common api need to use this assignment, such as the date turn into a string, date format, date, and size contrast, etc., as well as sort ordering custom class, etc.

  • 3. Unit Testing

    This section need to write more than ten test cases, I fabricated a dozen test cases by means of the control variables, make sure I finish the program can substantially without errors.

Design and implementation process

  • 1. Create a class People used to store information read the contents of the file, the class program from start to finish should always existed.

  • 2. Create a Read class for log files, all log files in the specified path to be patient, suspected patients, cure, death, and statistical provinces.

  • 3. Create a class cmdlist, for processing a user input command line, the user input is decomposed into a date type and province and those data are stored in the class of people.

  • 4. Create a write class, according to the class of people cmd parameter and provinces, the data is written to the specified file to the specified path among.

  • 5. The above types of link together to form a complete program.

Code Description

Unit test shots and described

  • 1. All the time spent testing and successful.

  • 2. Test 1, with no other parameters of input and output

  • 3. Test 2 with -date parameter and enter the correct date format

  • 4. Test 3, -date parameters, but without the date, defaults to the current date

  • 5. Test 4, -date parameters, but the date format error, the current date will be treated to

  • 6.测试5,带参数-date并且日期正确,带参数-type以及ip格式正确

  • 7.测试6,带参数-date并且日期正确,带参数-type以及ip sp cure dead格式正确

  • 8.测试7,带参数-date并且日期正确,带参数-type以及ip sp cure dead格式正确,并且调换顺序

  • 9.测试8,带参数-date并且日期正确,带参数-type以及ip sp cure dead格式正确,带参数-province

  • 10.测试9,带参数-date并且日期正确,带参数-type以及ip sp cure dead格式正确,带参数-province

  • 11.测试10,带参数-date并且日期正确,带参数-type以及ip sp cure dead格式正确,带参数-province,并且出现日志中没有的省份

  • 12.测试11,带参数-date并且日期正确,带参数-type以及ip sp cure 格式正确,带参数-province,并且出现日志中没有的省份

  • 13.测试12,带参数-date并且日期正确,带参数-type以及ip cure 格式正确,带参数-province

  • 14.测试13,带参数-date并且日期正确,带参数-type以及ip cure 格式正确,带参数-province,并且出现日志中没有的省份

单元测试覆盖率优化和性能测试

  • 1.单元测试覆盖率

在覆盖率方面,可能是测试单元没有一部分输入错误的样例,所以覆盖率没能到百分百,但对于其他正确代码以及单元测试用例,能够基本覆盖

  • 2.性能测试优化

在性能优化方面,我应该多考虑一些数据结构,减少循环次数,降低时间复杂度,并且减少数组的创建,降低空间复杂度

代码规范的链接

心路历程与收获

  • 1.培养分析能力

此次作业刚拿到题目时,心情是复杂的,因为题目篇幅太长,细节多,第一遍看下来,看到结尾时开头的内容就都忘光了,
反正活是来了,再矛盾,也得干。于是我拿起笔和纸,将网页上的作业需求分成了好多个部分,一个部分一个部分的看,
并且认为重要的地方就用笔先写在纸上,最后通过脉络将他们联系起来,这样题目看起来就简单易懂了,没有一开始那么复杂。

  • 2.加强了我的编码能力

在完成了分析后,便开始编码,一开始不出意料,自己写了很多的bug,踩了很多的坑,也许也留了很多的坑,但是经过非常久的
学习和思考,不断地完善自己的代码,不断地减少bug,这个过程虽然是辛苦的,但却是快乐的,每一次的恍然大悟都伴随着对错误以及
知识点的重新认识,这个过程是值得记录的,是编码能力变强的点点滴滴。

  • 3.加强了我的自学能力

这次作业需要用到github desktop以及github的fork等相关操作,从来没接触过的我一开始看到要求时是头皮发麻的。
加上又是全英文的软件,一开始看不懂的地方只能慢慢的百度,等知道了github desktop大致是什么模样后开始查阅资料,
学习github的一些操作例如这次作业的commit以及ignore,经过许久的查阅以及实践,我现在对于github已经有了初步的认识
所以此次作业使我的自学能力加强了。

  • 4.加强了我的改bug能力(重要)

这次作业的最后,我通过ide传参的方式以及cmd传参的方式得到程序的结果不同,一开始找不出原因,但找了许久并没有找出来,后来通过输出读取文件的内容才发现
原来是编码格式的问题,后来修改了编码格式,cmd和ide传参的输出结果一样了,才明白有时微小的细节将会是影响整个工程的重要因素,因此注重细节,仔细找出原因
才是我们需要真正掌握的。

技术路线图相关仓库

  • 1.java-bible

链接:https://github.com/biezhi/java-bible

简介:这里记录了一些技术摘要,部分文章来自网络,本项目的目的力求分享精品技术干货,以Java为主。

  • 2.advanced-java

链接:https://github.com/doocs/advanced-java

简介: 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务等领域知识,后端必看,前端也可学习。

  • 3.technology-talk

链接:https://github.com/aalansehaiyang/technology-talk

简介:汇总java生态圈常用技术框架、开源中间件,系统架构、项目管理、经典架构案例、数据库、常用三方库、线上运维等知识。

  • 4.CS-Notes

链接:https://github.com/CyC2018/CS-Notes

简介:技术面试必备基础知识、Leetcode 题解、后端面试、Java 面试、春招、秋招、操作系统、计算机网络、系统设计。

  • 5.JAVAWeb-Project

链接:https://github.com/muxiao167/Heart-First-JavaWeb

简介:本仓库存放的是Java Web 入门开发教程。面向新手友好,容易上手。

Guess you like

Origin www.cnblogs.com/An1ess/p/12319708.html