O
24

Appreciation post: I used to debug by guessing what was wrong

I used to just stare at my code and randomly change stuff until it worked. Now I actually use print statements to check values step by step (which sounds obvious but took me like 6 months to learn). Has anyone else had that moment where a basic technique felt like a superpower?
3 comments

Log in to join the discussion

Log In
3 Comments
palmer.jana
Totally get that feeling. Print statements were a game changer for me too, felt almost too simple to actually work.
2
robert_rodriguez66
robert_rodriguez662mo agoMost Upvoted
Is it weird how the simplest solutions are usually the ones we overlook the most? It's like when you lose your keys and they're in your pocket the whole time, you know?
6
anderson.jason
Man, I know exactly what you mean @robert_rodriguez66! My buddy Dave spent like three hours trying to fix his ancient laptop once. He was about to take it apart and replace the whole hard drive. Turns out he just had to plug the power cord in all the way. It was kind of embarrassing for him but also hilarious. Sometimes the easy fix is right there and we just don't see it.
3