PPowerduck·1h agoTesting Cache Invalidation HeadersA cache rule is only as good as the stale and revalidation cases.5 min read·blogs.powerduck.com
PPowerduck·5h agoTesting File Upload Size BoundariesThe file that matters is the one whose byte count sits exactly on the limit.5 min read·blogs.powerduck.com21L
PPowerduck·7h agoTesting Backwards-Compatible Additive ChangesA field that looks optional can still break a client that parses its responses strictly.5 min read·blogs.powerduck.com
RRaghav Chamadiya·7h agoCircular imports in Python: why every big Python repo has them, and the few that actually breakTL;DR All 51 popular Python repos I checked (1,000+ GitHub stars each) have circular import chains between files; in the median one, 16.4% of production files sit inside one. A Python circular import10 min read·repowise.hashnode.dev
Ddafili·9h agoTwelve Green Tests, One Missing KeyTwo of the twelve asserted the broken wire format — so the suite had no way to disagree with the bug.5 min read·mediaforge-studio.hashnode.dev11T
PPowerduck·19h agoTesting Client Timeout BehaviorA client that gives up at the wrong millisecond either waits forever or drops a request that was about to succeed.5 min read·blogs.powerduck.com1O
PPowerduck·21h agoTesting Concurrent Requests and Race ConditionsA race that appears once a week is a test waiting to be made deterministic.5 min read·blogs.powerduck.com
AAbdus Salam·1d agoWhat Raising the bcrypt Cost Factor Actually Costs in MillisecondsSomewhere in your codebase there is a line that looks like this: const hash = await bcrypt.hash(password, 10); That 10 is the cost factor, and most tutorials tell you to set it to 10, or 12, and move5 min read·aheadkit.hashnode.dev12Q
AAbdus Salam·1d agoTen Threads, Ten Thousand Increments, and a Counter That Came Up ShortEvery concurrency tutorial has the same demo. Ten threads, each increments a shared counter 1,000 times, the answer should be 10,000, and without a lock it comes up short. I ran it. It came back 10,005 min read·aheadkit.hashnode.dev
AAbdus Salam·1d agoA Nested Quantifier Made My Regex Take Seconds on a 30-Character StringI was validating a field that should only contain the letter a. Simple job. I wrote this: import re pat = re.compile(r'^(a+)+$') It looked fine. It matched aaa. It matched thirty a's in a blink. Then5 min read·aheadkit.hashnode.dev