Conventions

  • Conventions are stylistic guidelines for structuring your code, naming files, classes and methods, or otherwise altering your software solution at a cosmetic level

  • They differ from patterns/principles/practices in that changes in convention may or may not result in changes to the actual compiled code when you build your solution

  • it is worth having clearly defined coding conventions which are agreed upon by everyone on your team

  • When it comes to the application of conventions, consistency is key. Having consistent conventions makes your code more readable and thus more maintainable

    • It also makes it easier to merge your code into source control and handle the inevitable merge conflicts that arise when working on larger teams.

  • conventions may have an actual impact on configuration or behavior of production code when using certain tools.

  • Conventions come and go in and out of vogue much more frequently than patterns/practices/principles

  • If you ever have any doubt about whether a certain convention is beneficial, emulate the pros.

    • Check the libraries in the lnaguage or popular open source projects

  • Conventions are important because they make your code base much more readable and give the source code a cohesive, professional appearance

Last updated