Description
Using a coding standard is a software development practice that has been widely accepted in the industry. The need for
this practice takes on added importance in XP because of the increased level of communication required by collective
ownership, pair programming and the constant refactoring of the code. The team should have a standard way of naming and
formatting things so they can understand the code quickly and know where to look at all times.
Ideally, the coding standard should be the result of team consensus. In some cases, decisions will be arbitrary
(placement of braces). Each item in the standard should support one or more goals, improved communication being one of
the most critical goals. Once the team agrees on a standard, all members of the teams are expected to follow it. Pair
programming and collective code ownership is sufficient to reinforce the use of the standard within the team. With
time, the team will use and modify the standard to develop a style that is well adapted to their environment.
Benefits
-
Improved communication: increases the ability to read each other's code.
-
Refactoring support: provides consistently shaped code.
|