Having a set of rules can help you function better because you make decisions ahead of time instead of having to make all of these decisions on the fly. The right set of rules can be used as a tool to improve yourself as a developer.
In this article, we’ll go over 14 rules (although some of them may look more like guidelines) that every developer should stick with in order to help you grow. Although it might be hard to stick to all of these rules, you should try to stick to at least a few of them.
Functional code beats elegant code nine times out of 10. For example, adding a design pattern to your codebase just because it’s elegant isn’t a good reason to implement it. Especially when the alternative way to solve this problem can be implemented by a few simple lines of code.
Although the design pattern might be the more elegant solution, it adds technical debt to the project and takes more time to build and test.
Over-engineering is one of the bad habits that many developers tend to have. When looking at a codebase, you’ll find over-engineered pieces of code more often than not.
What over-engineering basically comes down to is that you make the design of a product more robust or complicated than is necessary. One way over-engineering gets introduced into a codebase is when a developer is already adding code that he thinks might be helpful in the future.
This additional piece of code gets added to the codebase but it probably never gets used. The main reason this happens is based on speculation. Maybe the best way to explain over-engineering is that it’s code that solves problems that don’t exist.
Only build what’s asked for in the requirements and don’t anticipate possible new — and most of the time unnecessary — features.
You should be open to both feedback and criticism, especially when working in a team. Don’t be overconfident when it comes to your own abilities. Once you start getting overconfident, you’ll be most likely ignoring the feedback and criticism that you’re getting.
Appreciate the fact that people are willing to give you feedback — no matter who gives it to you. Use the feedback that you receive as an opportunity to grow. It’s an easy way to get to know your areas of improvement.
#web-development #javascript