I’ll be fleshing this out over time … for right now, it’s just a bulleted list … or maybe a little better …
You’re not stupid, you didn’t do anything wrong, you just forgot a semicolon, or a parenths or a curly-brace or it’s case sensitive or … a large part of “debugging” is proof-reading … before you waste hours or days … check your “spelling.”
Chasing Your Tail
You’ve exhausted every idea and solution. You’ve deleted everything and started from scratch multiple times. You always start with the same clean line of code you copied and pasted from … wait … what?
The Tutorial (or Documentation or Book or instructions) Is Wrong
It might not be you at all. This guy wrote a freaking book — it couldn’t possibly have mistakes in it! Right?
The worst part of being a newbie is you don’t know what you don’t know. You assume the resource that’s supposed to be teaching you is correct. There may be typos. The instructions may be wrong. The documentation may be out of date.
Some Ingredients Don’t Mix
The language you’re learning may have changed significantly. I started learning D3 using version 2 … maybe v3 … I picked it up again and changed my links — switching from local files to these fancy, new-fangled CDNs … and my code didn’t work at all anymore.
What are YOU doing wrong? Nothing. You just aren’t aware of … everything … yet. And you never will be. But the list of essential stuff you don’t know will continually get smaller.
You know more than you think you do. Sometimes your instincts are correct. Sometimes it is just that easy.
Wanting to Be Great Before You’re Even Good
Is there a better way? Yes. Probably. Does your code need to be beautiful, awe-inspiring, and make seasoned hackers faint because they’re so overwhelmed with your talent? No.
If it works, it’s right. I know you want it to be elegant. I know you do.That’s a good thing and it will come with time. In martial arts, you want to learn technique and accuracy before you build speed. Code is the same thing. No white belt looks graceful. Nobody’s first poem is impressive. Not even mine.
Are there people who will make fun of you and be mean? Yes. They’re called assholes. Fuck those people. Don’t worry about what people will think when they look at your code. Grownups will know that you’re learning. Even if you’ve been doing it for years, grownups can teach you and mentor you without being dicks. Those people on StackOverflow who belittle and kick people while they’re down and having problems are called trolls for a reason — because they’re ugly and live under a bridge with their mom.