Open In App

7 Common Programming Mistakes That Every Beginner Must Avoid

Improve
Improve
Like Article
Like
Save
Share
Report

Programming… Where counting starts from 0 not 1. If you are not in programming and you will be pointing this a mistake made by a programmer then be ready to see a sarcastic angry young man look of a programmer throwing a paper or stone at yourself. Programming is one of the funniest (We have already given example), hardest (If you don’t enjoy coding) and easiest (If you love to play with code) thing to do in the world. A semicolon, a bracket, a loop and a lot of small and big things matter a lot in coding and you might have definitely experienced your silly mistakes especially in the initial phase-in programming.
Mistakes are part of coding and every programmer makes tonnes of mistakes especially as a beginner but that’s how they grow and become a good developer. We are going to discuss some most common mistakes that programmers make during the initial phase of coding but these are not limited. It’s good to be aware of these mistakes and not to do the same while learning to code…

7-Common-Programming-Mistakes-That-Every-Beginner-Must-Avoid

1. Learning Too Many Programming Languages, Frameworks, and Technology

This is one of the common mistakes that most of beginners make when they start learning to code. They think that it’s impressive to have Java, C++, Python and a lot of more language, frameworks or technology to showcase to someone or to mention in the resume but that’s actually foolishness not the sign of intelligence if you don’t have command or in-depth knowledge in any one of them.
Learning Java for 15 days and switching to Ruby just because java is tough or there is another reason then you will eventually end up with lots of confusion. It’s good to have knowledge of multiple languages but we highly recommend you to focus on a single language, in the beginning. Once you are experienced you won’t face difficulty in switching to another language. If you do this mistake then after a couple of years you will realize you aren’t master in any single language.

2. Comparison, Self Doubt, And Fear

It’s human nature to compare ourselves with others all the time, that’s the case in programming as well. You see a talented programmer who is good at solving the problems and making things work too fast, you start doubting and questioning your capability which is not good. Some people are good at picking up the concept very easily and some people take time but slow learning is completely ok if you take interest in coding.
Programming might be scary for you sometimes and beginners go through the phase when a voice in the head always say ‘I am not smart enough to solve the problem‘, ‘I have a wrong type of brain’ and a lot of things make them feel insecure and make them realize that they are not capable enough to code. When you have self-doubt on yourself always remember that you need to face it with courage and you need to be fearless. Programming is the field of taking the challenge and helping others by solving their problems but before that do yourself a favor and help yourself first.
Ask yourself…What can I do to become a better programmer? What are the areas I should improve on?. Identify your strength be thankful for it, identify your weakness and work on that by taking help from others, watching tutorials or joining a programming community.

3. Writing Messy Code And Ignoring Code Quality

An experienced programmer can easily spot a beginner looking at their code format. Some of the mistakes that beginners make in formatting code are

  • No proper indentation in code
  • Inconsistent use of new lines and white space or putting everything in a single line
  • Writing function that is too big or putting everything in a single line, function or file.
  • Bad variables and functions name(Ex. name of variable or function AbshdhhDdhjdjdXyshdb doesn’t make any sense). They use small case and large case variable names randomly.
  • Not commenting or over commenting the code

The above points are not limited, there are a lot of other mistakes that beginners make while writing the code. As a beginner, it’s good and exciting that your code is running and giving the desired output but what if you handover this messy code to someone else and he/she needs to maintain or continue it, it will become annoying for that person. He/she would face difficulty in understanding your code, loops or conditionals in it. Programming is not about just writing code and making it work, your code should be clean, readable and maintainable as well so always try to write well-structured code.

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
-Martin Golding

4. Writing Code Without Plan

A lot of beginners in excitement skip the thinking, research, and planning stages of a project and start writing code right away. They do not understand the problem requirements, limitations and do not think about all the case scenarios (what’s the input and what should be the output etc). It can create a big issue and later you may regret it. We highly recommend every beginner that just like before saying anything to someone you should think so you don’t regret later, you should also think and research before you start writing code. In programming, developers spend only 10% of the time writing code. Rest of the time they think, plan, research and discuss the complete project.
A beginner should go with the flow in a sequence of Think, Research, Plan, Write, Validate and Modify so they should follow some basic things before writing the code to avoid any issue or disaster at the production level.

  • Understand the problem requirements and limitation.
  • Do some research and experiment to find out which data structure is good to solve the problem. Pick up the best one.
  • Design the program and make a rough working draft.
  • Pick up the right data structure for your problem.
  • Think and note down all the corner cases for testing.
  • Break the problems into solvable pieces.

5. Thinking You Know It All

It’s really an exciting and amazing feeling for beginners when their code starts running without any bug. Afterall they put so much effort into learning to code and finally they have successfully written a program that actually works. You enjoy coding, your confidence grows and maybe you also start teaching stuff to others. It’s actually pleasurable feeling that you have learned a lot of stuff but what if we say to explore some more complex projects made by top-notch programmers on Github or just take a look at your own code you have written a couple of months back. You will understand that it still needs some modification and your code can be refactored as well. This happens with the experienced programmer as well.
Always remember programming is a marathon where there is no end line. Every day new technology, frameworks and a lot of things are coming out in the world, so there is no end of learning the coding stuff. Do not underestimate your ability but do not overestimate your ability as well. Keep your feet on the ground, explore more complex stuff in programming and keep learning. If you will hang out with some great experienced programmer you will find they don’t carry ‘I know everything attitude’ with themselves, they keep learning and they keep exploring the things even after spending years in programming.

6. No Backup For Work

This is one of the blunder mistakes any programmer can make especially as a beginner. Think about a situation when you have put so much effort in making a project and after two weeks you find that the disk crashed in your system where all your files were saved, you have also lost your work. In development, there is no one who is going to listen that you have lost X-amount of work just because your system or a part of the system got crashed. You can’t give any excuse in this case and that’s the reason every beginner or programmer should have this habit to keep backup of their work at regular intervals.
Learn to use source control (SVN or Git), Github or you can also take the help of Dropbox which is a cloud service to save your work in no time.

7. Laziness in Doing Practice

There is no point to read thousand of lines of code if you don’t get your hands dirty in programming. There is a huge difference between reading the coding stuff theoretically and doing things practically. Practicing the actual code should never be neglected in programming. It’s easy to read some lines of code or watch some videos for learning then telling your brain that you understood everything but once you will start writing the code you will find that you are making a lot of silly and big mistakes.
In the beginning, you will be a missing semicolon, braces and you will face difficulty in writing a loop as well but to get rid of all these things all you just need to do is to try your hands on code, keep practicing it, catching some errors, debugging those errors and then finding out how all the small pieces come together.

Programming is a skill acquired by practice and example rather than from books.
-Alan Turing



Last Updated : 27 Oct, 2019
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads