10 bad coding practices
I found this article in internet and I think it is extremely important for software developers, and is key in order to be highly productive.
The Pareto principle states that 80 percent of outcomes can be attributed to 20 percent of the possible causes of a given event. Also known as the 80-20 rule, it's relevant to almost every field of human endeavor.
In the field of software development, the principle can be summarized by saying that most problems are caused by a small number of bad coding practices. Eliminate them and your work will be very much easier and more productive.
These 10 bad coding practices are the worst culprits.
1. Typos in your code
These are surprisingly common, and they are maddening because they have nothing to do with your programming skill. Even so, a misspelled variable name or function name can wreak havoc on your code. What's more, they may not be easy to spot.
What's the solution? Working in a good integrated development environment (IDE) or even a programmer-specific text editor can reduce spelling errors significantly. Another thing you can do: Deliberately choose variable and function names that are easy to spell and, therefore, easy to spot when they have been misspelled. Avoid words such as receive, which easily be misspelled recieve without being obvious.
2. Failing to indent or format your code
Indenting and otherwise formatting your code makes it easier to understand at a glance and, therefore, spot mistakes. It also makes it far easier for other people to maintain your code, as it's presented in a consistent fashion.
If you use an IDE that doesn't automatically format your code, consider running it through a code beautifier such as Uncrustify, which will format it consistently according to the rules you configure.