20145326 Cai-yi Experiment Three "agile Development and XP Practice" program design process experiment content
Uploading code using GIT
Use Git to change code with each other
Implementing overloading of Code
One, git upload code
First I upload a code called "Shiyansan" via Git.
Set permissions:
Then my partner downloaded the document to his computer from the Internet.
Then modify, and then upload:
My partner:-[20145211 Huang Zhiyuan Open Source managed code] (Https://git.oschina.net/nostalgia_)
second, Agile development and XP
- Software engineering is the process of applying the systematic, orderly and quantifiable methods to the development, operation and maintenance of the softwares. Software engineering covers the following areas: Software requirements analysis, software design, software construction, software testing and software maintenance.
- People have many technologies, practices, habits and ideologies in the process of developing, operating, and maintaining software. Software engineering unifies these related technologies and processes into one system, called the "development process". The purpose of the software development process is to improve the efficiency of software development, operation and maintenance, and improve the quality of software, customer satisfaction, reliability and maintainability of software.
- It is not enough to have ideas of all kinds of processes, and we have a series of tools to ensure that these ideas can operate efficiently in practice. The important point of software development is not to see how many theories you can talk about, but also how you apply the relevant tools, such as the combination of the application of unit tests in Java and the
JUnit
application of modeling to and Umbrello
StarUML
from. Programming learning is a process that is learned.
A common formula is:软件工程=开发流程+工具
Xin Zou two formulas given by the teacher: 软件=程序+软件工程
and软件企业=软件+商业模式
The common development processes are:
- RUP (Rational Unified Process)
- PSP (Personal software Process)
- TSP (Team software Process)
- Agile Process
......
What is XP software development like?
Use XP guidelines to express:
- Communication: XP believes that communication between project members is key to the success of the project and regards communication as the main driver of coordination and cooperation in the project.
- Simple: XP assumes that the future cannot be reliably predicted, and it is economically unwise to consider it now, so you should not think too much about the future but should focus on the urgent needs.
- Feedback: XP considers the system itself and its code to be a reliable basis for reporting on the progress and status of the system development. The feedback of system development status can be used as a means to determine the progress of system development and determine the next development direction of the system.
Courage: It represents XP's view that people are one of the most important aspects of software development. In the development of a software product human participation throughout its entire life cycle, is the courage to eliminate the dilemma, let the team to the local optimal left behind, to achieve more significant goals. Demonstrates XP's basic trust in "people make projects successful".
A practical basis for successful use in XP environments is through XP的法则
presentation, including: Quick feedback, hypothesis simplicity, incremental changes, advocacy for change, and quality of work.
XP software development is the cornerstone of XP activities, including: coding, testing, listening, design.
The technology for project member users to successfully execute XP activities is presented through XP practices, including 12 practices related to programming, teamwork, and process.
Coding Standard:
An important understanding of writing code is that "most of the time the program is for people to see", the programming standard makes the code easier to read and understand, and can even guarantee fewer errors. Programming standards include: Descriptive names, clear expressions, straightforward control flow, readable code and annotations, and the importance of consistently using certain rules and idioms when pursuing these content.
The layout in the coding standard is a good example, although the layout does not affect the function of the program, but it can affect the readability. The process of the layout of the pursuit of clear, beautiful, is a procedural style important factors.
Here the teacher gave a foreign game, there is a C language format error demonstration, the code inside this can be run, but the format does not match the format of a programmer. (Here's a link you can take a look at.) )
-a demonstration of the mistakes of the C Language Confusion code contest
Although there are problems with their format, they are code that can be run, which in another way shows that their C language level is really high, which is what we should try to get close to.
Pair Programming:
Pairing programming is an important practice in XP. In pair programming mode, a pair of programmers work side-by-shoulder, equally, and in complementary way. They sit in front of a computer, facing the same monitor, working with the same keyboard and the same mouse. They analyze together, design together, write test cases together, encode together, do unit tests together, do integration testing together, write documents together, and so on.
There are two roles in pairing programming:
- The driver (Driver) is the person who controls the keyboard input.
The Navigator (Navigator) plays the role of pilotage and reminding.
How to pair programming, why to pair programming, we refer to pair programming and two people cooperation, the focus is:
- Drivers: Write design documents, conduct coding and unit tests, and other XP development processes.
- Navigator: Review the driver's documentation, the driver's implementation of the development process such as coding, consider the coverage of unit tests, think about the need for and how to refactor, and help drivers solve specific technical problems.
- Drivers and pilots constantly rotate their roles and do not work for more than an hour, and take 15 minutes off each hour of work. The navigator has to control the time.
- Active participation. Any task is the responsibility of the two people, and the responsibility of all. There is no "My Code", "Your Code" or "his/her code", only "our code".
There are only horizontal gaps, and there is no level difference. They are pairs, and although they may have different levels of seniority, both sides have equal decision-making rights in terms of analysis, design, or coding.
Teamwork is a spirit that is emphasized in many places, and the smallest team is a one-to-two team, and the team spirit starts with pairing programming. The most important thing for people to get along with in social life is honesty, empathy and mutual benefit. There will be differences in pairing programming, how to cooperate more effectively to do things wrong, to master these can be a lifelong benefit.
Version control:
- The collective ownership of XP means that everyone is responsible for all the code, which in turn means that everyone can change any part of the code. Pair programming contributes a lot to this practice: by working in different pairs, all programmers can see the full code. One of the main advantages of collective ownership is to increase the speed of the development process, because any programmer can fix it once there is an error in the code.
This means that the code is placed in a place where everyone can easily get it, and we call it a code repository. This leads to another topic called versioning (version control).
Versioning provides a number of benefits for both teams and individuals.
- Versioning provides item-level undo (undo) functionality: Nothing is a finalized version, and any error must be easily rolled back. Let's say you're using the world's most complex word processing system. It has all the features you can think of, that is, the DELETE key is not supported. Imagine how cautious and slow you are when typing, especially when a large document is approaching the end of the day, a careless will come back again (imagine you selected all the text, accidentally pressed the DELETE key, because there is no undo function, had to re-enter). Edit text and versioning are the same, and anytime you need to roll back, whether it's one hours, a day, or a week, it makes your team work free and fast, and is confident about correcting bugs.
- Versioning allows multiple people to work on the same code, as long as they follow certain control principles. There is no longer a case where one person overwrites another person's edited code, causing the person's modification to be invalid.
- The version control system preserves the history of changes made in the past. If you encounter some surprising code, the version control system can easily find out who did it, what was changed, how long it was modified, and if so, why.
The version control system also supports the release of multiple software versions while developing on the mainline. There is no need for the entire team to stop working when the software is released, and there is no need to freeze the code.
- Version control is also a project-level time machine, you can choose any time to accurately view the project at the time of the situation. This is useful for research and is the basis for reproducing a previously problematic release version.
The popular version Control tool has Cvs,svn,git and so on, more can refer here. Git is another important addition to the Linux operating system, Linus.
PSP Time:
Steps |
Time |
Percentage |
Requirements Design |
20min |
16.7% |
Code Design |
40min |
33.3& |
Code implementation |
50min |
41.7% |
Test |
5min |
4.17% |
Analysis Summary |
5min |
4.17% |
20145326 Cai Experiment Three "agile Development and XP practice"