10 Bad Coding Habits You Need to Put an End to Right Now
Tags: webdev, javascript, programming, beginners
Published: 2022-03-18 12:30:30

Everyone isn’t perfect, and it’s the most honest of truths. It is the same with programmers as with any other field in life. There are a lot of good, great, and still-growing-up programmers, but they are often not the best. We all make mistakes and everyone is human. Apart from faults, bad habits can also cause a lot of trouble. These bad habits may seem innocent at first glance, but if not corrected, can cause a lot of problems. In this article, I will discuss 10 bad habits that every programmer should avoid.

## 1. Working on your own all the time

It is important for you to share your progress and ideas with the team. Building something the right way isn’t always possible, so constant communication is very important. Communication can also benefit others when you work with them. If you talk with them about ideas and mentor the less experienced members of your team who tend to get stuck, their work often improves.

## 2. Having excessive confidence in your own code

If you write something, don’t assume it’s great just because you wrote it. Throughout your career, you will learn more about programming as you work on new projects and gain experience, so take a moment to reflect on how you’ve grown as a programmer.

## 3. Refusing to write bad code

There are times when developers will write horrible code because of deadlines. Even though you have warned the client or manager about the consequences, they insist on sticking to their schedule, so you now have to start coding. It could be that there is an urgent problem that cannot wait until you think of a solution. It is therefore important for a programmer to be versatile and that he or she can write good and poor code at the same time. In this way, you can revisit and eliminate your technical debt.

## 4. Blaming others

Arrogance is a common trait among technical professionals such as developers. Being able to admit your mistakes makes you stand out. Do not shy away from apologizing when you make mistakes. After accepting that fact, you can start learning from your mistakes and avoiding them in the future. Failure to admit to mistakes renders learning impossible.

## 5. Overvaluing your personal style

Ensure that your working style and environment setup are coordinated with your team. Each member of your team should follow the same coding style and work under similar conditions. If you do things your way, you might not be accustomed to your colleagues’ coding style, and if it’s unusual, the next developer might find it hard to work on what you have built.

## 6. Romanticizing your developer toolkit

There are times when your preferred editor or command line tool is not the right tool for the job. For example, Visual Studio is a good tool for developing IDEs, Sublime is a good tool for dynamic languages, Eclipse is a good tool for Java, etc. Vim or emacs might be your favorite tool, but that doesn’t mean they’re perfect for every situation.

## 7. Being too slow on giving feedback to managers/clients

The ability to ensure that everyone knows what is expected of him, as much as possible, is one of the finest traits a craftsman can possess. Your manager won’t be the only one who benefits from this. Furthermore, it is for your own benefit: You will have fewer fears about the future of the project.

## 8. Using names that don’t add information

Choosing names for variables and functions can be tricky, but you can easily ensure they are named correctly. Adding information to your names will aid others in understanding your code. Names are useful because they describe what a code does. If given a good name, you can see what a piece of code does in seconds without digging into the calculations.

## 9. Not using Google enough
A complex problem can be solved quickly by not having to solve it at all. Google it if you’re not sure. It is possible to ask the engineer next to you instead, but he won’t be able to provide as much detail as Stack Overflow. Also, you’ll be interrupting him from his work.

## 10. Giving up

Should you give up so quickly? Despite getting so close to a solution, too many programmers give up before they arrive at a solution. Developers’ lives are full of challenges, there is no doubt about that. Our daily lives are full of new challenges, and occasionally we feel stuck to the point that we want to give up. However, you must remember that giving up is not an option. It is true that there are some technical challenges that prevent us from developing some things. However, a long process does not mean it can’t be done. Giving up is different from knowing when to stop. Do not let the perception of giving up creep into your mind.

Habits are something we tend to get into as we age. Developing habits that you follow can help you not to have to think too much about every situation. When you become accustomed to good ways of doing things, they become effortless.
I’d love to hear what other coding habits you consider harmful. Leave a comment below

> You can now extend your support by buying me a Coffee.😊👇

<a href="https://www.buymeacoffee.com/muthuannamalai" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

Thanks for Reading 😊