DEV Community

Cover image for What Are Some Common Mistakes That Beginners Make When Learning to Code, and How Can You Avoid Them?
Ben Halpern Subscriber for CodeNewbie

Posted on • Updated on

What Are Some Common Mistakes That Beginners Make When Learning to Code, and How Can You Avoid Them?

Starting out as a beginner programmer is exciting, but it can also be overwhelming. Here are some common mistakes that beginners make when learning to code, and how to avoid them:

  1. Not practicing enough: Consistent practice is essential for mastering any skill, including coding. Make sure to allocate enough time to practice regularly, even if it's just for a few minutes a day.

  2. Not seeking help or support: It's okay to ask for help or seek support when you're stuck on a problem. There are plenty of online communities, forums, and resources available to help you out.

  3. Overcomplicating things: As a beginner, it's easy to get bogged down in complex concepts and technical jargon. Try to focus on the basics and build a strong foundation before moving on to more advanced topics.

  4. Not testing code: Testing your code is crucial to catch errors and ensure that it's functioning as intended. Make sure to test your code regularly and thoroughly.

  5. Copying and pasting code: While it's tempting to copy and paste code from the internet, it's important to understand what the code does and how it works. Try to write your code from scratch to build a better understanding of programming concepts.

To the more experienced coders out there: what were some of the biggest mistakes you made early on in your coding journey? How did you learn from them? What advice would you give to those who may be making similar mistakes now?

Let's learn from each other and continue to grow as a community!

Top comments (14)

Collapse
 
ant_f_dev profile image
Anthony Fung

For practice, sites like codewars.com/ might be useful. Lots of exercises without having to worry about how the big picture fits together.

Collapse
 
spo0q profile image
spO0q 🐒🎃

These are valuable recommendations, but it might be unrealistic, somehow. Let's be honest, it's hard to practice without copy and pasting code.

Many beginners will do that just to make the thing work.

It's pretty much the same for testing or overcomplicating stuff. Nobody wants that, but how can you tell as a beginner?

IMHO, you need a good mentor, which is not easy to find, as mentoring is a special skill that is not necessarily proportional to the technicality. I know brilliant engineers who cannot understand some mistakes, simply because it does not make sense for them.

Collapse
 
chrisgreening profile image
Chris Greening

I spent an unfortunate amount of time under the illusion of productivity due to tutorial purgatory

I thought tutorial after tutorial was helping me and I felt really discouraged when it was time to write my own code and had no idea how to externalize what I thought I had learned. You can read a million books about driving a car but you're not going to know how to drive until you actually get behind the wheel and I wish someone told me that early on

I always tell beginners to of course do tutorials - they're great for getting started and learning what's possible - but to supplement it with project-based learning as quickly as possible even if their earlier "projects" are just small code snippets they write by themselves in a REPL

And on top of this to not be discouraged and to set expectations!

It's so easy to fall into the trap of "oh wow everyone on the internet says coding is so easy, why am I not understanding it immediately?" and that can be very frustrating/disheartening as a beginner. A journey of 10,000 lines of code begins with a single "Hello World" :~) and it's important to remember we were all writing our first line of code at some point. Just like any other skill it takes practice and consistency over time

Collapse
 
danbailey profile image
Dan Bailey

Amen to this! I'm in the process of exiting tutorial purgatory -- I decided my best option was to build a macro-scale project using everything I've learned thus far, and I'm now using tutorials to fill in the gaps in my knowledge. While I don't have the dopamine hit from finishing a course every so often, my daily progress toward a larger goal is keeping me motivated, and every time I unfuck a bug (which is frequent), I'm getting a pretty good rush.

Collapse
 
r1ch4rd_donovan profile image
Richard Donovan

Good post 👍

Here's a few other things to consider.

Similar to number 3, recognise that simplicity is actually a beneficial skill to be mastered. I can remember thinking at times, that's too simple, they'll think i'm stupid...

Focus on networking and building relationships, They'll help with encouragement, support and opportunity.

Don't just focus on code, your wellbeing should be your number one priority, including sleep, physical movement and mental rest.

Communication and collaboration are often big differentiators in our industry, Lean on them. You don't have to fall into the steroetype of working alone with your headphones on and not talking to people...

Collapse
 
ingosteinke profile image
Ingo Steinke, web developer • Edited

Don't overcomplicate / overthink is an important piece of advice and easier said than done! I regularly see tutorials and answers claiming that something is impossible or very complicated to achieve, which often turns out to be outdated (like it's not that complicated anymore) or misunderstood (like there has always been an easier way).

Advice: don't accept an overcomplicated solution. If you see something that seems to complex to understand, keep looking for an easier approach. Question your requirements, rephrase your google queries. Maybe there is a more elegant and simple solution once we redefine what it is that we actually want to achieve.

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

For number 4 - I assume you're referring to automated testing? Otherwise the implication is that people write code and don't run it - which is bizarre.

If it is referring to automated testing, then I would have to say I disagree quite strongly. Automated testing is hugely overrated IMO - I've been a professional developer for approaching 30 years and have extremely rarely used it.

Collapse
 
r1ch4rd_donovan profile image
Richard Donovan

🤣 You say it's bizarre, but I've seen this more often than you would imagine!

Collapse
 
alohci profile image
Nicholas Stimpson

Of course it runs fine. I wrote it. I know there's no errors.

Collapse
 
symon profile image
Symon Michael

I think you have to realize you're a novice, embrace your mistakes and try to learn from them instead of trying to avoid them. Having said that, making the same mistakes over and over - now that should be avoided!

Collapse
 
jd2r profile image
DR

You always need to focus on learning the 10% that you'll use 90% of the time. It's totally correct that you shouldn't dig too deep until you learn the basics and are able to understand things like basic programs and most of some codebases.

Collapse
 
nehamaity profile image
Neha

Don't get stuck in tutorial hell! Just start building something that you're interested and passionate about and of course this can be basic and then search up on internet/ask for help in communities when you get stuck. This is how you can truly learn coding and apply your knowledge from the start! :D

Collapse
 
nehamaity profile image
Neha

Quoting what I posted on my Twitter account @NehaKatharina: "What helped me overcome my impostor syndrome was realizing that code & tech overall will always feel like I'm stuck in a dark endless forest. I'll never know every single thing about the forest but over time I get better and every developer gets better as they progress!!"