Introduction

There are significant benefits for developers to adhere to a single agile coding standard (including everything from tabs vs. spaces and curly bracket placement to naming conventions for things like classes, methods, and interfaces), everything just works better. It’s easier to maintain and extend code, to refactor it, and to reconcile integration conflicts, if a common standard is applied consistently throughout. The standard itself matters much less than adherence to it.

Keeping the Code Agile

Agile programming involves delivering working, tested software every iteration (one to four weeks). As the iterations continue, this demand creates a new kind of pressure as developers code more, modify code more, and stay focused on today’s commitments.

Under such production pressures, the teams’ traditional programming practices (design analysis, development, then testing at the end of the project, etc.) will not be sufficient. Fortunately, a new set of agile best practices have proven to enable more frequent delivery with higher quality. These agile best practices help the programmers and the code itself become more agile. The smaller batch sizes of agile programming appear to some as less rigorous, but the effectiveness comes from the application of these practices with great discipline. This discipline leads to extensible, low-defect code with the simplest robust design that will work for the features currently implemented. It is well-factored and well-protected by unit tests.

Agile Software Programming Best Practices

Long before we thought about agile software, programming teams were finding which patterns correlated to greater success. These patterns and practices have been proven over many decades at organizations writing some of industry’s most complex software. First catalogued as Extreme Programming (XP) by Kent Beck and Ron Jefferies in late 1980s, these practices have also come to be referred to as Agile Engineering Practices, Scrum Developer Practices, or simply Agile Programming. XP goes into the most depth concerning how programmers can keep themselves and their code agile. The XP practices have been embraced as enablers for all of the popular agile practices and lean approaches, including Scrum, SAFe, Lean Startup, and even our own framework A2F. The community of developers passionate about these practices lives on in the Software Craftsmanship movement.

The core agile software programming practices are the following:

  • Test-first programming (or perhaps Test-Driven Development).
  • Rigorous, Regular Refactoring.
  • Continuous Integration.
  • Simple Design.
  • Pair Programming.
  • Share Codebase Between Programmers.
  • A Single Coding Standard To Which All Programmers Adhere.
  • A Common “War-Room” Style Work Area.
  • Code Comments - \\...
  • Object-Oriented Programming.
  • Encourage Code Reusability.
  • Agile Architecture.

Such practices provide the team flexibility: a new feature, enhancement, or bug can come at the team from any angle, at any time, without destroying the project, the system, or production rates.

Conclusion

Code must be formatted to agreed coding standards. Coding standards keep the code consistent and easy for the entire team to read and refactor. Code that looks the same encourages collective ownership.