9
One comment from a senior dev made me rethink my whole approach to debugging
I was stuck on a bug for 3 hours last week. A guy I sit next to at the coworking space downtown asked me what I was working on. I told him about it and he just said "have you checked the order of operations in your if statement?" I blew him off at first because it seemed too simple. But after I tried it, that was the problem. He told me he starts every debugging session by looking at the easiest things first, not the most likely things. It clicked for me because I always dive into the complex stuff. Has anyone else had a simple tip from someone that completely changed how you code?
3 comments
Log in to join the discussion
Log In3 Comments
wendyg433d ago
Used to think looking at the simple stuff first was a waste of time. Ngl that senior dev is totally right though, saved me so many hours since I started doing it too.
5
the_sam2d ago
Right? @wendyg43 you hit on something important though - the senior dev probably meant checking logs or error messages first, not just assuming it's the simple stuff every time lol. Cause sometimes that simple fix mentality can make you skip over the actual root cause if you're not careful. Still way better than chasing ghosts for three hours though.
4
seanjackson3d ago
Read this thing once where some coder found like 40% of their bugs were just dumb typos or config errors. Made me laugh cause it's so true, the simple stuff hides right in plain sight. Saved me from pulling my hair out over imaginary problems more times than I can count lol.
2