Software Engineering Fifth teamwork - Coke

This blog is a team job

 

 

 

1. Member introduction:

Project Analysis Code implementation: Zhang Yangyang, Alfred Sung
code specifications: Zhai Ping, Xu Shuna
blog Park: Zhao Jinhui Dong United States to
topics showing content: KONG Xiang Fei, Li Chao
topics explain: Zhaodong Xu, Xu tease

2. Team Photo:

 

3. Team Captain: Zhang Yangyang

4. Code specifications:

1. Block indented
block indentation is prepared to be used, the number of indented spaces is four.
2. The blank line between the block
between relatively independent block, after the blank lines must be added to variable declaration.
3. Long statements and expressions long
long statements (> 80 characters) to be written into a plurality of rows, a new row is divided to long expression in the low priority operator, the new operator in the first row, the partitioned new line to properly indented, so neat layout, the statement read.
4. cycle, is determined as long as an expression or statement
cycle and judgment statement if the statement or expression longer, will have to be divided adaptation, long divided expression to a new line in the low priority operator, the operator the first character on the new line.
The size parameter
, if a method or process parameters is longer, will have to be properly divided.
6. Short statement
is not allowed to write more short statements on one line, that line of writing only one statement.
7. conditions, loop
if, for, do, while, case, switch, default other statements on a line by and executed statement section if, for, do, while no matter how many other statement will be added braces {}.
8. The statement aligned
alignment spacebar only, without using the TAB key.
9. The method, process and structure block of statements
start method or process, and the cycle definition structure, judgment should be employed in the code statement indentation style, the case where the processing statement case statement must comply with the requirements indented statement.
10. The block delimiter
block delimiter and should each separate line in the same column, while statements that reference them with left-justified. At the start of the definition of class definition of the structure, and the definition of the enumeration if, for, do, while, switch, case statement must procedure as above using indentation.
11. Note effective amount
Generally, the source must be an effective amount comment more than 20%.
12. The method head described
method should annotate the head, are listed: object / function, input parameters, output parameters of the method, the return value is called relationship.
13. Note the codes match
while writing the code comments side, while modifying the code modify the annotation, and the annotation to ensure consistency of the code. No longer useful comments to be deleted.
14. Notes the contents of
the content of the comment to be clear, clear, precise meaning, to prevent ambiguity comment.
15. Note abbreviations
avoid abbreviations in the annotations. (Note: When using abbreviations or before, the necessary instructions to deal with abbreviations.)
16. Note the position
code comments should describe similar thereto, comment code should be placed above or to the right (Note the single statement) phase ortho position, can not be placed below, above need thereto the discharge above code separated by an empty line.
17. variables, constants comments
for all variables have physical meaning, constants, if its name is not a fully self explanatory, when you declare must be a note about its physical meaning. Variables, constants comments should be placed adjacent to its upper position or to the right.
Comment 18. The data structure of the
data structure declarations (including arrays, structures, classes, enumerations, etc.), if its name is not a fully self explanatory and must be annotated. Note should be placed on the data structure thereabove adjacent positions, is not placed below; structure of each domain annotations on the right side of this domain.
19. Global Variables
Global Variables have more detailed annotations, including its function range, which have access to it, and a method or process accessing the precautions described.
20. Note indent
notes on the content described in the same indentation.
21. The blank lines between comments and code
Their comments above code separated by an empty line.
22. The definition of variables, branching statements
to the definition of variables and branching statements (conditional branching, looping statements, etc.) have to write a comment.
23. Avoid insert comments intermediate line of code or expression.
24. By proper name of a method or process, variables, structure and rational organization structure of the code, so the code becomes self explanatory.
25. carried out on the function, the intention level code comments, provide useful additional information.
26. The annotated tag right end line of the block to indicate the end of a program block.
27. Comments should consider factors typesetting program readability and appearance, if the language used in both the UK, it is recommended to use Chinese, unless it can be very accurate fluent English expression.
28. identifier naming clear
name identifier should be clear, straightforward, with clear meaning, and use complete words or abbreviations we basically can be understood, to avoid misleading.
29. Notes to be named special
naming convention or if the use of special abbreviations have the explanatory notes.
30. identifier naming style consistent with
its own unique style name, to be consistent from beginning to end, can not change back and forth.
31. The variable names
for naming the variables, taking a single character is prohibited (e.g., i, j, k ...), suggests that in addition to have a specific meaning, but also indicating that the variable type, data type, etc., but i, j, k for local loop variable is permitted.
32. The system of naming conventions and style consistent
naming conventions must be consistent with the style used by the system, and unified in the same project, such as the use of all lowercase underlined UNIX style or capitalization shuffling way, do not use capitalization and underlined shuffling manner, such as special identification and g_ m_ identification member or global variables, and thereafter adding the case is to allow the shuffling.
33. Unless necessary, do not use numbers or identifiers to define the more strange characters.
34. During the same software product, should be planned interface part naming identifiers (variables, structures, methods, and constants), to prevent the compiler, linker conflict.
35. named variables having mutually exclusive with the correct significance group antonyms or opposite actions and the like.
36. In addition to application specific compiler switch / header files, or the like should be avoided _EXAMPLE_TEST_ beginning and ending with an underscore defined.
37. Operator Precedence
operation order priority, and clear expression parentheses operator attention, avoid using the default priority.
38. avoid direct identifier number as
to avoid the use of easily understood number, instead of a meaningful identity. Constant relates to the physical state or contains physical meaning, not directly using digital, meaningful enumeration must be replaced or macros.
39. The relationship between the source program code should more closely adjacent as possible.
40. Do not use a high skill statement difficult to understand, unless it is necessary.
41. The public variables
to remove unnecessary public variables.
42. The public variables description
carefully define and clarify the relationship between the meaning of public variables, functions, ranges and public variables.
43. Public variable assignment
when passing data to the public variables, to be very careful to prevent unreasonable and so endowed with value or cross-border phenomenon.
44. prevent local variable with the same name and public variables.
45. Do not use uninitialized variables as the right value.
46. prevent multiple modules share a common variable
Public variable structure is only a block or method can modify, create, and the rest of the relevant module or method of access only to prevent a number of different modules or methods can be modified to create the same phenomenon common variables .
47. Data Types
Use strict formal definition, portable data types, variables and try not to use specific hardware or software environment close.
49. The relationship between the different structures should not be too complicated, do not design everything, very flexible data structure.
50. A number of elements should be moderate structural
arrangement too can be considered the number of elements based on the principle of some of the elements of different sub-structures, to reduce the number of elements in the original configuration, if.
51. The structure of the layout and arrangement of elements in
a layout structure of carefully designed with the order of elements in the structure can be easily appreciated, to save space, and reduce the phenomenon caused by misuse.
52. When programming, pay attention to cast data types, to minimize unnecessary default data type conversion and coercion.
53. The error of the called method returns the code carefully and comprehensively deal with.
54. The clear method is very accurate (rather than approximate) design to implementation.
55. Local variables
preparing reentrant method, should be noted that the use of local variables.
56. The interface method parameter
in the same project group should be clearly defined method should check the legitimacy of the caller is responsible for the interface method parameter or interface method is responsible for itself, the default method is the responsibility of the caller.
57. The method of try to limit the size of less than 200 lines, only one way to accomplish a function.
58. Write a method for simple functions.
59. Try not to write methods that rely on other internal method to achieve.
60. avoid designing multi-parameter method, the parameters are not removed from the used interface.
61. Avoid using meaningless or ambiguous verb for the method name.
62. A method for providing a return value, which is preferably used in reference to the return value.

5. Favorite mode:

一: 交响乐团模式。该模式的优点是各司其职,分工明确,并重在执行,当某个软件领域处于稳定成长阶段的时候,众多大型软件公司的开发团队就会采取这种模式。但这种模式分工过于明确,不适合刚刚起步的公司,有局限性。

二:功能团队模式。该模式就是具备不停能力的同事们平等协作,小组内交流比较频繁,共同完成一个功能。但该模式下,各个角色之间没有管理和被管理的关系,并且保证不了每个小组和其他小组编程规范达成一致。

Guess you like

Origin www.cnblogs.com/Jinitaimeia/p/11764815.html