💡
16

Just realized my old way of debugging was backwards

I used to just stare at my code for hours. Like 3 hours straight some nights. Then I started using console.log every 2 lines. Found a bug in 10 minutes flat. That was 6 months ago. Now I break things into small pieces and test each one. Anyone else waste time just staring at code before they learned to debug properly?
3 comments

Log in to join the discussion

Log In
3 Comments
david_jones38
Man, I once spent an hour debugging a typo in a variable name... still do that sometimes honestly.
5
rowan_thomas84
David_jones38, my record is four hours on a semicolon in C++. You are not alone. It is always the tiny mistakes that cost the most time.
4
holly_reed55
Wait, an HOUR over a typo? Like one little letter in a variable name? @david_jones38 I once spent a whole afternoon trying to figure out why my code was subtracting instead of adding, and it turned out I named a variable "total" in one spot and "tota1" in another, it looked the same on screen. My eyes literally hurt by the time I found it.
1