7 Common Mistakes That Almost Every Programmer Make
Tags: programming, beginners, python, career
Published: 2021-11-05 17:32:47

I'll tell you about mistakes that almost everybody makes in programming and why you should avoid them. I wish I would have that article before because trust me, it will save you a ton of time and effort. It doesn't matter how good you are at programming, I'm sure that you make even one of these mistakes daily and didn't even know about it. I tried to put a lot of information into this and I hope you'll enjoy

---

##1. One Solution Problem
It's like when you think in one direction and the solution is in a completely different place. For example, you're solving several problems on Codewars and wanna find the best way to reach the final result. The usual programmer will use a method that he already knows, for instance, the function needs to get an unsorted list and return the sorted list, beginner for this problem will use the usual linear sorting algorithm and there're no problems until there's a list with 1 million items in it (database of some social media or something else), if we'll take a speed of your computer for 1000 operation in a second, it means that you'll need around 1000 seconds to sort this list, and I can say you that it's a lot, especially for users that want to get some value on your website. In this situation come different ways to solve it in another way, you can use fast sorting algorithm, etc. It was only one example and there're many other situations where you better save your time rather than the time of user (if there're a difference in milliseconds) by using a "list generator" that will exponentially increase readability and need only several strokes of code

##2. Building Everything From Scratch
If you think that you will sit, open your code editor then just start coding, and after a while, you will build an app with many strokes of code. Then I can tell you that nobody does so (and it takes much time and effort), except practice for beginners where you're doing simple projects like a calculator to understand how it works. Because it's better to use already well-written code by someone else for almost anything that you want. Want to write a function that will return the factorial of number X, then, fortunately, there're tone of libraries, frameworks, and just code on Stackoverflow which you can easily copy and paste, but you should not do it if you don't understand what it is, because as I said earlier for beginners it's the only way to practice. For example, if you're Web Developer then the best way for you is to use Boostrap or MaterializeCSS where you need to spend a few minutes figuring out how to build anything you want and start doing it.

##3. Working Alone
Working alone is one of the most stupid sides of most programmers. I mean, when you're trying to build some sort of app you're trying to do everything by yourself, but you need to figure out that nobody can know everything and if you'll do design, coding app itself, marketing then you'll probably fail in one of these steps. It's better to create a team and give each of them its role. I've found my partners on forums and Discord servers. My team and me are currently searching for someone who can help us with building new projects and directions, if you want to know more about it then add me in Discord: MarkFusion#2903
Pross: 
Each step of the project will be on a high level
Everything will go much faster
Upgrading your skills (even if you're not working with someone then you surely will in the future if you want to create great things)

Minuses:
You'll have to manage all and analyze what to do next (if you're the leader)
Profit will be shared among all employees

##4. Use Git Not Properly
Uploading/Committing your projects onto GitHub or other similar platforms is very important if you want to work in a company or just to show your portfolio to others. And because of this importance, you should do everything properly, for example, you wrote some sort of fun code and wanna commit it, you need to think about people that will read your code and if it's not readable or instead of optimization you chose to let it be as it is. For better readability you need to:
Use Comments where you explain how this block of code works (Also, you can use them to write what you wanna add in the next block)
To match the style guide described in the documentation (for Python it's PIP8)
Try to optimize your code as good as you can


##5. Put everything inside of one function
Function needs to do only one thing, you don't need to put several actions or iteration inside of only one function, it'll be much easier and better to separate them and you'll know what each function do and everything that is left is to implement it. When you use one function for everything then you'll probably need to use operations like "and" or "or" that are not so good. Also, it'll be more readable and as we already know it's better for other coders.

##6. Choose The Right Goals
Don't think about building an app that will kill Facebook at the beginning or how much you'll earn money from it, because it will probably be a big fail. I mean if you just started learning then choose a goal like "Learn Discord.py library and make a bot for discord that will play music". Or if you're already in the IT-sphere for a while then you don't need to think about the money that you will earn from this project. If money will be your goal then everything that you do is only for getting money, you won't think about how to build your app better or find ways how to make your design prettier. 

##7. Too Much Time Between Learning
If you decided to learn programming languages or a new framework then you must be constant. Highlight time where you'll learn this new feature or make a daily goal like "Spend 1-hour learning Django". In another way, if you won't be constant then you'll learn something new and take a break for a week, then forget almost everything you recently learned and start again with the small baggage of knowing

---

##Conclusion
These were 7 very common mistakes that almost every programmer makes and which you should avoid. You may not agree with my point of vision especially about function and working alone, and I will be glad to talk with you on this topic in the comments below. I hope you enjoyed :)