Bugs show up, eat all your time, and gaslight you into thinking you are the problem. You’re not. You just solved that problem a few commits ago, but now it’s harvest season again.

Here are some debugging hacks that worked for me during such times:

1. Stop blaming the code: examine your assumptions instead

Half the bugs you chase aren’t in your code. They’re in your head. You assume the API returns the right format. You assume the config is loading. You assume that “of course that condition can never be false.”

Pause. Write down 3 things you’re assuming. Then test if they’re true. Most bugs die here.

2. Use print statements whenever possible

Yes, logs are good. But sometimes what you need is a print statement that shows the raw, brutal truth.

Forget “elegant” lo…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help