- Don’t repeat yourself
- Write tests
- Document your code
- Keep it simple
- Lint your code
- Architect by domain
- A good CI/CD tool
- A good set of browsers and devices
- Keep your knowledge up to date
The more indentation in my code, the more complicated it is. And, the less indentation in my code, the simpler it is. Complicated code tends to look like a sideways ‘V’ or an angle bracket. Simple code tends to look more like a brick, or a rectangle. Much of the complexity introduced by control structures in our code doesn’t need to be there. What I’m suggesting is that complexity creeps into our code through control structures. Through if-statements and loops, switches and exception handling. These are the things that we indent. So, if we rework or remove the control structures in our code, then we can reduce the complexity. As a by-product, the indentation tends to disappear too.