2
DAE get stuck on a project so bad you almost quit?
I was at a local library hackathon in Austin, trying to build a simple to-do list app. I'd been coding for maybe two weeks, and my JavaScript just kept breaking. The list wouldn't update, and I was staring at the console for like, three hours straight. This older guy next to me, who was working on some wild 3D thing, saw me looking super stressed. He leaned over and said, 'Bro, just console.log everything. Every single step.' I started doing that, and it showed me exactly where my variable went wrong. It made me think, is it better for beginners to just brute-force debug like that, or should we try to understand the theory first and guess where the bug is? That one tip saved my project and my sanity. What's your go-to method when your code just won't work?
2 comments
Log in to join the discussion
Log In2 Comments
uma_nelson855d ago
Read a blog post that called console.log the beginner's best friend. It lets you see the actual data flow instead of guessing at invisible errors. When my code breaks, I still scatter logs everywhere before trying anything fancy.
5
quinn_flores805d ago
Wait, @uma_nelson85 you still do that too? I thought I was the only one who never grew out of the console.log crutch... feels like admitting I still use training wheels sometimes.
3