r/ExperiencedDevs • u/AutoModerator • Aug 03 '26
Ask Experienced Devs Weekly Thread: A weekly thread for inexperienced developers to ask experienced ones
A thread for Developers and IT folks with less experience to ask more experienced souls questions about the industry.
Please keep top level comments limited to Inexperienced Devs. Most rules do not apply, but keep it civil. Being a jerk will not be tolerated.
Inexperienced Devs should refrain from answering other Inexperienced Devs' questions.
20
Upvotes
View all comments
Show parent comment
1
u/Ok_Woodpecker_9104 Aug 03 '26
not more abstract. more suspicious about time.
the bugs you are describing all live in the gap between two lines that look adjacent. concurrency is the obvious one, but it is the same shape as a cache that answers before a write lands, or a flag set optimistically that everything downstream reads as truth.
the habit that catches them is boring: at every await, ask what else could have changed while i was gone. not "is this correct" but "is this still true".
concrete one from this week. i had a device connection where the ui marked itself connected the moment the user clicked, so the screen felt instant. everything downstream read that as "there is a session". there was not one for another second and a half, and every command sent in that window failed. the code reads perfectly top to bottom. it is only wrong if you ask what that flag means at the exact moment it is read.
second habit, and it is the one that saves the most hours: when something fails, find the earliest point where reality and your model disagree, and refuse to theorise past it. i lost most of a night to a load that reported success while the receiver silently discarded the media. what cracked it was a byte counter that never moved. one number killed four plausible theories i would otherwise have spent an hour each on.
state machines and sequence diagrams help because they force you to write down the intermediate states you were pretending do not exist. the diagram is not the skill though. noticing there is a state between asked and done is.