Put a Timeout on Every Network Call
Here is a bug that never shows up in testing: a service you call stops answering. It doesn't fail. It doesn't return an error. It just holds the connection open and says nothing. If your code has no t
Here is a bug that never shows up in testing: a service you call stops answering. It doesn't fail. It doesn't return an error. It just holds the connection open and says nothing. If your code has no t
Here's a bug that shows up in almost every codebase that touches prices: 0.1 + 0.2 === 0.3 // false 0.1 + 0.2 // 0.30000000000000004 Floating point numbers are stored in binary, and most deci
Debounce and throttle both stop a function from firing too often, so people swap them around as if they're interchangeable. They answer different questions, and picking the right one gets easier once
Empty catch blocks are quiet bugs. They swallow the failure, leave the program in a half-broken state, and make the next person wonder why nothing exploded when it should have. A catch is a promise: y
Ever opened a function and found the actual logic buried five levels deep, under a staircase of if statements? That shape has a name, the "arrow anti-pattern", and the fix is usually simple: return ea