Dev.to · 3 min read

4 Mistakes That Make Beginners Quit Coding (and How to Fix Each One)

4 Mistakes That Make Beginners Quit Coding (and How to Fix Each One)

Disclosure: I made the video linked at the end of this post. The advice below stands on its own, so you don't need to watch it. Picture a beginner's first week of coding. Day 1: you're pumped. Day 7: you've quit. Here are four things that I think cause that drop, and what to do about each one. These are common patterns, not statistics from a study. Mistake 1: Starting too big On day one, many beginners open a forty-hour course, or decide to build a whole app. It feels exciting for about an hour, then it feels impossible. The fix: shrink the goal. Today's goal is one tiny thing: print("Hello, Sam") Change the name, run it again, and you're done for the day. You wrote and edited a real program. Mistake 2: Watching tutorials without typing Watching feels like progress. But if you haven't typed a line, you haven't practiced. The fix: pause the video and type every example yourself. Then change one thing and run it again. A simple rule: for every 10 minutes of watching, spend 10 minutes typing. Mistake 3: Panicking at your first error Sooner or later you'll see a wall of red text, and your brain says, "maybe this isn't for me." Try it on purpose. Make a typo: prnt("Hello") You'll get something like this: Traceback (most recent call last): File "main.py", line 1, in prnt("Hello") NameError: name 'prnt' is not defined (The exact wording depends on your Python version. Newer versions may also suggest "Did you mean: 'print'?") The fix: read the last line. It says what's wrong: the name prnt doesn't exist. Fix the typo, run it again, and it works. An error isn't failure. It's the computer telling you what to fix. Mistake 4: Comparing yourself to people who've coded for years You see someone building a full app, and you feel behind. But they also started with print("Hello"). The fix: compare yourself to you from last week. Keep a tiny log of what you ran each day, and look back at it when you feel stuck. A simple 7-day starter plan This is a suggestion, not a rule. Adjust it to your pace. Day 1: print your name. Day 2: change the text and print three different names. Day 3: follow one beginner tutorial and type every line yourself. Day 4: break a line on purpose, read the error, fix it. Day 5: break it a different way (a missing quote, say), and fix that too. Day 6: use input() to make a program that greets you by name. Day 7: redo Day 1 from memory, without looking. You don't need to install anything. A free online compiler such as Programiz or Replit works in the browser, and free courses like CS50 and freeCodeCamp are good places to continue. Check that each is still free and available when you read this. The video version If you'd rather watch, I covered the same four mistakes in a short video: Over to you Which of the four almost made you quit, or has already? I'd like to hear how you got past it. Next in the series: variables.

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More Programming & Dev News