DSDoogal Simpsonindoogal.dev·1d ago · 5 min readHow to Build a Java LRU Cache in 5 LinesTo build a simple Least Recently Used (LRU) cache in Java, extend the standard LinkedHashMap with accessOrder set to true and override the removeEldestEntry method. While this standard library approac00
DSDoogal Simpsonindoogal.dev·2d ago · 5 min readHow to Preserve Key Insertion Order in JavaScriptTL;DR: JavaScript objects do not guarantee insertion order when using integer keys. The ES6 specification forces integer-like keys (array indices) to the front of the object, sorted numerically. To ma00
DSDoogal Simpsonindoogal.dev·3d ago · 5 min readHow iPhone's Secure Enclave Stops Brute-Force AttacksTL;DR: Your iPhone protects your 6-digit passcode by combining hardware-bound cryptography with forced validation delays. The Secure Enclave enforces a deliberate 80-millisecond verification lag along10
DSDoogal Simpsonindoogal.dev·4d ago · 4 min readPrevent Thundering Herd: Retry Jitter in MicroservicesWhen services fail, standard exponential backoff causes retries to sync up, creating a "thundering herd" that repeatedly crashes your servers. Adding "jitter"—a small dose of randomness to your wait t00
DSDoogal Simpsonindoogal.dev·4d ago · 5 min readHow Java HashMap Prevents Hash Collision DoS AttacksJava's HashMap mitigates Hash Collision Denial of Service (DoS) attacks by automatically converting congested linked list buckets into Red-Black trees once a bucket exceeds 8 entries and the total map00