|
jleyva in Métricas Web continues his series of articles on extreme programming, In this post he talks about coding.
The author of Retrato en Sepia sets out his naming convention for when he is programming, bearing in mind that different languages have their own conventions.
- names of properties of a class in lower case; if they consist of two words, the first word starts in lower case, the second in upper case: averageHeight
- in the names of methods like getXXX, the first letter of each private attribute starts in upper case: getAverageHeight
- constants use all upper case: PI
- put an underscore in front of the names of parameters of a function: movePoint(int _x, int _y)
- names classes start in uppercase and names of packets start in lowercase: java.lang.String
- a way of distinguishing local variables is to put an underscore at the end: variableLocal_
- differenciate Boolean properties with: isXXX
Technorati tags: programming, extremeprogramming
|
Return to Extracts from Planeta Código |