24
Question about how a chat with a senior dev changed my approach to debugging
I was talking to a senior developer at a meetup last Tuesday and he told me he spends 80% of his time reading code before writing any changes. That hit different because I always just jump straight into fixing things when my code breaks. How do you balance reading versus jumping in when you run into a bug?
2 comments
Log in to join the discussion
Log In2 Comments
alex_taylor1028d ago
You ever walk into a room and forget why you're there? That's me when I try to debug without reading first. I used to just start typing and hope for the best, then spend four hours chasing a typo I could have caught in two minutes. Now I try to force myself to actually look at what the code is doing before I start yanking things around. It's hard though, because my brain wants to treat bugs like a broken pipe and just start smashing things with a wrench. Reading first feels like I'm not being productive even when I know it saves time later.
5
elizabetha9228d ago
Honestly this is such a relatable thing and it goes way beyond coding. I've noticed the same pattern in everyday stuff like trying to fix a wonky shelf or even planning a grocery run. My brain wants to just grab the nearest tool and start hammering, but half the time I end up making the problem worse or buying stuff I already have. It's like we're wired to feel like thinking is wasting time, even when doing it right saves us hours of regret. Tbh I've started telling myself 'read the room first' before diving into anything, and it's weird how much calmer I feel when I actually look around. Ngl it's a struggle to break that reflex though, because moving fast feels productive even when it's totally not.
7