DEV Community

Prashik Meshram
Prashik Meshram

Posted on • Updated on • Originally published at prashikmeshram.vercel.app

Some Common Pitfalls You Should Avoid As Programmer

Well every one make mistakes it's in human nature. When I was just starting out in programming I don't have anyone who can guide me or anyone to show me the right direction. As I was alone in this journey where there is not one to ask for, I made some mistakes along the way.

I made a lot of mistakes and get to learn a lesson from it as well. It's good to make mistakes as long as they are new, but some mistakes are not worth making.

What I mean by that is some common mistakes can be avoidable with someone's advice or learnings which can save your time, effort and piece of mind or simply to say avoid making the same mistakes again and again

I'm not saying that you should not make any mistake, even if I say that you would! As it's build into our DNA.

“Anyone who has never made a mistake has never tried anything new.”
― Albert Einstein

But the point is some common pitfalls you would come across while you are learning which can and should be avoidable. So I have compiled some of my mistakes from which you can learn and avoid those common pitfalls which I face, especially when I'm a beginner.

1. Do not try to learn multiple things at once

Well I will not lie that programming is an ever-increasing field with increasing docs, updated version, new tools and the list goes on. There are so many things that it gets difficult to manage at one time.

This was the real problem with me whenever I see a new tool is released or something new then I try to learn things simultaneously without a thought what's previously going on. But later I realized if I try to learn things simultaneously it decreases productivity level and results in inefficient output.

Especially when you are learning something new, just focus on that one thing until it gets completed, or you are comfortable with it, then move on to the next. Don't try to learn multiple languages or tools or topics at once.

If you are doing many things at a time such as trying to learn two languages or building multiple project at once, then you should know that either you will not able to build properly or learn that thing properly, or you will lose your peace of mind.

As you learn or try to build things, your brain process that information at a time and as your brain need to stop, think, process and store that information.

“Focus on one thing at a time.”

2. Don't write the code that just works

Writing code is a process, especially writing a clean and efficient. Actually it's more of a skill I would say. It's not only Googling, Copy and Pasting. But it's about your thought process behind the code, how you approach the problem, the logic building ability of yours.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
― Martin Fowler

If you just write the code that works without giving a thought about the problems you were facing during writing code, what went wrong, learning from your mistakes, learned something new along the way.

Then you are not building your programming skills properly, or you are lacking something to become a better programmer.

Know what is happening in the code, what is the problem or challenges you were facing (write it down if necessary), what went wrong, learn from your mistakes.

3. Don't just learn, implement while you learn

Watching tutorial is good, actually I would say it's a great place to get started with, but don't just watch, also implement what you learn. If you think you can remember what just you watched or think you don't need to write any code just watching tutorial is enough then you are very wrong.

You should put some effort into writing code with or without looking at tutorial or any other kind of source, because it's so different when you see and write. Writing makes connection to your brain and helps you get clear over with your learnings.

Also don't endlessly watch tutorial videos, books or whatever source you are referring. Instead, you should implement your own learnings such as try to build a project from what you learn, go to websites like HackerRank or TopCoder to put on practice or teach other, because when you teach someone then you would understand concepts better yourself.

4. Take a strategic approach while solving a problem

While solving any problem, take some time to understand that problem without writing a single line of code. Try to observe that problem while asking yourself some questions like:

  • how should I approach this problem?
  • how can I implement the logic in this way?
  • what if I will try to approach the problem this way rather than that way?
  • and so on

“First, solve the problem. Then, write the code.”
– John Johnson

It will save you a lot of time and effort rather than just reading a problem and intently writing code without giving a thought. You can also make a set of process for yourself on "how should I approach a problem" and gather some tactics, common solutions, your learnings from that problem, etc.

5. Not practising daily

If you want to be a better programmer then you should practice daily. I'm not saying just sit down and write some code, because programming is not about just writing code, but it's more of logically thinking, reading, problem-solving.

So practising daily can brush up your skills over some time. Start small, if you are just starting out then make small goals like 30 min learning and 30 min writing code and increase the time gradually.

6. Working for very long hours

Your brain needs time to think and store incoming information.

If it does not get a break for some time it will not carry out it's task properly as your brain needs time to digest the incoming information.

Hence, you will need recurring breaks over some time to let the brain digest and do it's work properly.

I follow this working and break schedule:

  • 52 min → working
  • 17 min → break

Or you could try the Pomodoro Technique, which is:

  • 25 min → working
  • 5 min → break

And repeat the process again.

7. Learn what's necessary

Do not try to learn all the things about a specific language or tool if not necessary. Learn the basics and then try to put that on practice.

  • In my opinion don't just try to learn the language(s), but master the one which suits best for you and then if necessary move on to another.
  • Move slowly and steadily. Know what you are doing and what going to comes from it.

8. Not backing up your code

You never know what's going to happen to your electronic device the next movement you wake up. It can be a virus, corrupted disk, accidentally deleted files or worse (your greatest fear)

That's why it's important to have a backup of your precious code which you have written with so many efforts and had taken so much time. You should consider backing up your code daily/weekly/monthly. As your hard work can disappear at any movement.

There are many options available out there to host your hard work online for free such as GitHub and Bitbucket or you can also back up into your Google Drive or Dropbox or any other external storage such as hard drives and pen drives.

Latest comments (0)