These are some coding practices that may not be good for any other developer's blood pressure. A lot of problems that arise in software development are as a result of small bad coding habits. In fact, the Pareto principle explains that 80% of outcomes in a given event are attributed to 20% of the possible causes. This is relevant to almost every field of human endeavor.
8 Bad Coding Practices
Having Typos Within Your Code
Typing errors are common in coding but are usually maddening because misspelling a variable name or a function name can really mess up your code. To avoid this, use a good IDE or programmer-specific text editor, and choose variable or function names that are easy to spell.Not Indenting or Formatting Your Code
When codes are indented or formatted, they are easy to understand at a glance and therefore mistakes can be easily identified and this makes it easy to maintain. If your IDE is not able to automatically format your code, you can pass it through a code beautifier such as Uncrustify .Not Commenting Your Code or Leaving This for Later
When you fail to comment your code or choose to comment it later, it fails to be much meaningful as compared to commenting your code before writing it.Preferring to Use Clever Code as Opposed to Clear Code
It’s harder to make things simple than complex. It is very likely that 80% of the life of a piece code will be spent in maintenance. A successor’s job should therefore be made easy by making the code clear as opposed to clever.Lack of Flexibility in Using Different Tools
For a coder, ability to use different tools is a necessity as different types of jobs require different types of tools. It’s therefore important for a developer to master the most useful tools while maintaining the flexibility to learn and use new ones.Over-engineering Simple Problems
Don’t create complex solutions to easy problems that deserve simple solutions.Refusing to Do Research on Coding Problems or Questions
Google is such an important research tool for developers.Not Mentoring Other Developers On Your Team
As a senior developer, you must ensure that your team is learning, growing, and performing better in coding.
Comments
Post a Comment