T
4

Actually reading the error message instead of guessing

For like 6 months I would just glance at a Python traceback, mumble "it's broken," and start changing random lines until something worked. Last Tuesday I finally sat down and actually read the full error line by line, turned out I was passing a string where the function wanted an integer the whole time. Anybody else have that moment where slowing down 2 minutes saved you 2 hours?
1 comments

Log in to join the discussion

Log In
1 Comment
umamurphy
umamurphy10d ago
passing a string where the function wanted an integer the whole time" that is literally my biggest fear when I code. I've done that exact same thing so many times and just assumed my logic was broken or something. It's wild how the brain skips over the actual clue and goes straight to panic mode. I remember one time I spent like 3 hours adding print statements everywhere before I realized I was comparing a number to a string. The funny part is the error message literally said it, I just didn't slow down enough to read past the first line. Now I force myself to read the whole traceback out loud, even if I feel dumb doing it. It honestly feels like a superpower compared to how I used to code.
8