Day 25/60: my live stock-ticker widget recomputed each day's span (prior days at or below today) by scanning backward every tick. O(t) per tick, O(t^2) total, it stuttered. Fix: a decreasing monotonic stack of [price, span] pairs, amortized O(1) per next(). #JavaScript #DSA
2
32
Day 25/75 C++: a revenue report resummed each [l,r] slice per request -- O(n) each, p99 tripped the timeout, and the data never changed.
Fix: build prefix[] once in O(n), answer sumRange as prefix[r+1]-prefix[l] in O(1). Leading zero, long long.
#CPP #DSA #Algorithms
4
Day 25/365: our booking system double-booked a room. The bug? It ran merge intervals to check capacity, fusing overlapping meetings into one busy span. Merge tells you WHERE time is busy, not HOW MANY things run at once. Capacity = peak overlap, not merged union.
#DSA
6
Your degraded mode is only graceful if you've load-tested it under the exact conditions that trigger it. Most teams discover their fallback path hits the same bottleneck during the outage, not before. Test the shed, not just the switch. #SRE #GracefulDegradation #Programming
1
7
A Terraform module passed validate and plan, then shipped a security group that no longer allowed 443. A refactor dropped the rule. Static checks prove the code is well-formed, not that it behaves. Terratest applies on a sandbox and asserts 443 is really there. #Terraform
1
5
Day 25/60: API pentesting on an authorized orders/users service via the OWASP API Top 10. BOLA test = list order ids as user A, request them as user B, watch for a 200. Fix is server-side: scope the lookup to the logged-in user so unowned ids return 404. #Pentesting #Apisecurity
1
6
Day 25/60 cloud security: AWS IAM Identity Center replaces IAM users with federated login. One IdP, temp credentials, auto-deprovisioning when people leave. If you have static access keys older than 90 days, SSO is your fix. #CloudSecurity #AWS #CyberSecurity #Security #SysAdmin
1
35
Our payments worker died at 02:14 Sat. We found out at 09:40 from a customer. Only monitoring was a dashboard nobody had open at 2am.
systemctl is-active said up. ss -ltn showed nothing listening. curl -f caught the 500 the old check passed.
Run it from a systemd timer.
#Bash
8
"Slow Wi-Fi and an unknown device." Before panic: netsh wlan show interfaces reads the live Authentication + Cipher. WPA2-Personal + CCMP is the floor; WEP/TKIP is broken. WPA3-SAE resists the offline guessing WPA2 allows. Connected != secure. #Cybersecurity #Infosec #Blueteam
1
28
Swapped std::map for std::unordered_map to speed up a hot lookup. Lookups got faster; the nightly report started shuffling its rows.
map is a sorted tree and iterates in order. unordered_map is a hash table with NO order guarantee, and rehash reshuffles it.
#Cpp #CPlusPlus
5
