Pairing programming----Gobang Games

Source: Internet
Author: User

Requirements Analysis:

Gobang definition:

"Gobang" is a simple Gobang mini-game, the interface is very clean, but also has a number of people fighting and record records and other functions. Gobang play to their own pieces in the horizontal, vertical, oblique any direction in a row full of 5 even win.

Gobang:

Function:

    • Can achieve a simple man-machine battle.
    • Can achieve a simple man-machine battle.

Overview of Pairing Programming:

Defined:

Pair programming refers to the two programmers who sit at the same workbench to develop software. Pair programming can write higher-quality code compared to the two-bit programmers who work independently of each other.

Overview:

Pair programming technology is a very simple and intuitive concept, can achieve a multiplier effect of the work. But people-to-people cooperation is not a simple thing-especially when people are accustomed to working alone. The implementation of pair programming technology will bring benefits to the development of software projects, but these benefits must be carefully considered and planned to truly reflect. On the other hand, two experienced people may find that there is no skill transfer in pairing programming, but letting them solve the same problem at different levels of abstraction will allow them to find a solution faster and with fewer errors.

Two programmers are less likely to have the same drawbacks and blind spots, so when we use pair programming we get a powerful solution. And this solution is exactly what other software engineering methodologies do not. In our usual programming, if you encounter a very difficult problem (difficult to get bored with the project), then you are bound to want to record help, whether it is from the vast amount of information on the Internet, or from the side of the technology guru, you will work hard to solve (if you have a love of computer knowledge). This time might as well use pair programming to try, others do not say, may feel different.Why pair programming?

Everyone in their own design, implementation of the software in the process of making such a mistake. In pair programming, because of the review and communication at any time, the quality of each aspect of the program depends on the high level of each of the programmers. In this way, the error in the program will be much less, the initial quality of the program is much higher, which will save a lot of time to modify, test. Specifically, pair programming has the following benefits:

(1) in the development level, pair programming can provide better design quality and code quality, two people can work together to have a stronger problem-solving ability.

(2) for developers themselves, knot-to-work can bring more confidence, high-quality output can bring more satisfaction.

(3) psychologically, when there is another person in your side and you close cooperation, do the same thing, you embarrassed to wander, also embarrassed to fool.

(4) at the level of enterprise management, pair can communicate more effectively, learn from each other and transfer experience, can better deal with people flow. Because one person's knowledge has been shared by others.

In short, if used properly, pair programming can get a higher input-to-output ratio (Return of investment).

Role assignment for pair programming:

There are two roles in pairing programming:

(a) the driver (Driver) is the person who controls the keyboard input.

(b) pilots (Navigator) play the role of pilotage and reminders.

The two roles are interchangeable. Similar to real-life examples, a person is responsible for specific execution (driving, using keyboard editing programs, etc.), another person is responsible for navigation, inspection, cover, etc.

Formally prepared:

Code Authoring Specification:

1. The first letter of the class name should be capitalized. Attribute (member variable), method, object variable, and all identifiers (such as formal parameter
The first letter of the number, actual parameter, local variable) should be lowercase, and all the words contained in it should be immediately
and capitalize the first letter of the middle word.
For example: Class Name: Homeworkclass property or method name: Homeworkclass

2. The Java package is a special case, all lowercase letters, even if the middle word is
This. For the global package, reverse your Internet domain name and pick up the package name.
Example: Cn.qilu.homework

3. Interface (Interface): A full English descriptor is used to describe the interface encapsulation, the first letter of all words is large
    write. Traditionally, the name is appended with the suffix able, ible or ER.
        For example: Contactable,prompter.
4. The component (Component) uses the full English description to illustrate the purpose of the component, the end Bell the component type, and should be named by the Hump method.
        For example: Okbutton,customerlist,filemenu.
5. Naming of commonly used methods in a class:
        (1) The method of obtaining a class (typically with a return value) is typically required by the method name to be accessed by the field name, preceded by the
            prefix get, such as Getfirstname (), Getlastname ().

(2) The method of judging the Boolean type of the class generally requires that the method name be prefixed with the word is, such as ispersistent (),
Isstring (). Or use words that have logical meanings, such as equal or equals
(3) The method of setting the class (the general return type is void): Prefix the Access field name with a set, as
Setfirstname (), Setlastname ().
(4) General methods of the class generally use the full English description of the member method function, the first word as far as possible the use of
A vivid verb, the first letter lowercase, such as openFile (), AddAccount ().

6. Static Constants fields (static final) are generally all uppercase letters, and the words are separated by underscores

Example: Home_work

The role-swapping process for pilots and pilots:

1. Board Interface Design:

Navigator: Zhou Xiaohong

Driver: Zhang Qixia

2 winning and losing Judgment Rule algorithm:

Navigator: Zhang Qixia

Driver: Zhou Xiaohong

3 win or lose tips pop-up window:

Navigator: Zhou Xiaohong

Driver: Zhang Qixia

Experience:

Pair programming does have a lot of advantages

    1. Programmers help each other, teach each other, can get the ability to complement each other.
    2. Enables the programming environment to implement design effectively.
    3. Enhance code and product quality, and effectively reduce bugs.
    4. Reduce the cost of learning. While programming, sharing knowledge and experience, effectively in the practice of learning.
    5. In programming, talking to each other can solve problems faster and more efficiently.

Pairing programming----Gobang Games

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.