B
17

Hot take: learn to read stack traces before you touch any tutorial

I spent my first 6 months of coding just copying stuff from YouTube videos. Every time something broke I had zero idea why. Then one night I got a NullPointerException in Java and instead of googling the error I forced myself to read the whole trace line by line. Took me 45 minutes to figure out it was a simple typo in a variable name. After that I stopped watching tutorials almost completely. Now I break my own code on purpose just to read the errors. It sounds dumb but it's like learning to read a map vs memorizing routes. Anyone else find that error messages teach you more than any course ever did?
1 comments

Log in to join the discussion

Log In
1 Comment
harpery47
harpery474d ago
...but honestly my friend Sarah had the exact same moment but way more embarrassing. She was following a React tutorial for like two weeks, just copying hooks and state stuff without really getting it. Then her app kept crashing and she spent an entire afternoon asking on Discord, and someone finally just said "read the stack trace, the answer is literally in the third line." She read it out loud and realized she was calling a function before she defined it, a one letter typo in the name. She told me it felt like the tutorial was hiding the real lesson from her the whole time. Now she shows me error messages before she even asks for help, like it's a badge of honor.
0