Programming guidelines
Throughout the book, I recommend various intermediate and advanced techniques of writing code pertaining to a particular topic or technology. While these techniques are meant to give developers a balance between requirements and technologies, there is also a need to provide common programming guidelines to follow certain patterns, making it easier for colleagues and peers to understand a code base. Successful developers think about these guidelines while writing and maintaining code.
In this section, we’ll review the DRY, YAGNI, KISS, and SOLID principles along with understanding separation of concerns, and how refactoring is a process.
DRY
The first acronym we’ll review is probably one of the simplest guidelines to follow. The DRY principle stands for don’t repeat yourself.
If you have multiple methods performing the same task in different locations of your application, it may be time to refactor and consolidate the code.
...