Why you should use coding best practices#
As a coder, developing a coding style that’s mindful of these best practices will make it easier to extend and debug the code in the future. Even if you’re no longer working with that codebase, the legacy of your work will affect the community of developers who work with that code in the future.
Coding best practices help ensure code quality and codebase health. Using good practices when writing code will support the characteristics of good code, that is: Maintainability, scalability, readability, and portability.
Code is written once and read thousands of times.
Some good coding practices, such as commenting, don’t affect the functionality of a program. However, they do impact the experience for the humans who’ll be reading and maintaining that code. You may be able to get your program to execute, but if you don’t implement best practices, a quickly done task can backfire by creating confusion and problems in the future. Writing good code now will help ease the processes of code reviews, unit tests, and refactoring.