vibe coded app, week 1: it works!!
week 4: the api key in the frontend can read the users table
a scan of ~34k lovable apps on supabase found tables with emails readable without login on 7,403 of them
before real users show up, turn on row level security and test logged out
@yatharth170699 no, the timeout only stops your side from waiting. the other service keeps running and may finish, so a retry can double it. send an idempotency key and make the final state checkable, don't assume it failed.
since postgres 11, ALTER TABLE ADD COLUMN with DEFAULT 'pending' on a huge table is basically instant. the default just sits in the catalog
DEFAULT gen_random_uuid() though? volatile, so it rewrites every row under an exclusive lock
same line of sql, very different night
nsa: move to post quantum crypto. immediately
cloudflare: ok, fully pq by 2027
meanwhile every company: still has that one internal service on a cert that expired in 2023 and nobody knows who owns it
product page cached in redis, 5 min ttl. it expires mid sale and thousands of requests miss at once, all hit postgres for the same row
thats a cache stampede
fix: lock per key so one request rebuilds, the rest get a stale copy. and jitter ttls so they dont expire together
ty 1.0 dropped yesterday. astral's rust python type checker, now passes 95% of the typing conformance suite (mypy is at 57%)
also ships --add-ignore, honestly the most realistic feature a type checker has ever had
anyone actually moving a big codebase off mypy for this?
cdn cache: purge vs versioned urls
purge: same url, tell every edge to drop it. slow to spread, and browsers that cached it won't care
versioned: app.3f9a.js, new deploy = new name, cache forever
lean versioned for assets. keep html on a short ttl or it points at old files
squashfs maintainer on lkml rn: added a check because one ai reviewer said it was missing, then a different ai reviewer flagged that exact check
code review in 2026 is being the middle child between two bots that dont talk to each other
leader election gotcha
leader holds a lease in etcd and keeps renewing. long gc pause, lease expires, new leader picked. old one wakes up still thinking it's in charge and writes
fix: fencing tokens. each lease gets a higher number, storage rejects writes with an older one
chatgpt turns 4 today
junior dev: wait so how did you fix bugs before
me: pasted the error into google, opened a stackoverflow answer from 2014 and prayed it still worked
junior: that sounds made up
"the queue keeps growing, just make it bigger"
that only delays the crash. every job waits longer and memory still runs out
backpressure = push back when consumers fall behind. bounded queue, producer blocks or gets a 429 and retries later
where do you push back first?
theres a "vibe coder test" going around where cursor or zed + jetbrains mono means you vibe code
feels like the wrong test tbh
the real one is can you explain the diff you merged yesterday without opening the chat
how would you build the green "online" dot in a chat app?
app pings every 30s, server sets presence:123 in redis with a 60s ttl. key expired = offline. no db writes
gotcha: phones lose signal all the time, so wait a bit before showing offline or the dot flickers all day
someone built a kubernetes cluster where the nodes are browser tabs
open the page, your phone becomes a node. close the tab, node dies, k8s moves the pod to someone else's tab
so "try closing some tabs" is now an outage
sagas vs 2pc for a checkout
2pc: all prepare, then all commit. coordinator dies and the rest sit holding locks
saga: each step commits alone, a failure runs undo steps like a refund
lean saga. gotcha: others can see the half done state
how do you handle an undo that fails
a post on hn today: company culture = slack emoji ÷ √headcount
honestly feels right. you learn more about a team from its custom emojis than from the eng values doc
whats the most used custom emoji in your slack rn
hot keys: one viral post = one cache key, all traffic on one redis node. more shards won't help
1. tiny local cache per app server, short ttl
2. copy it as post:123:0..9, read a random one
3. on a miss only one request hits the db
i'd start with 1. a like count 3s stale is ok
openai found a billing bug in gpt 6.2. the bug was that it was too cheap
fix: astra now hits your limits 40% faster, sol 25%. everyone on paid plans gets one banked reset as a sorry
rare bug where every user wanted a wontfix
write ahead log, why a db crash doesn't eat your rows
log the change, fsync, then ack. data pages get written later. crash? replay the log
gotcha: synchronous_commit=off in postgres acks before the fsync. faster, but a crash can drop recent commits. ok for metrics, not money
step 1: shut down the ec2 box
step 2: forget the dns record pointing at its ip
step 3: someone rents that same ip from aws for like $3
intruder actually did this. 450k aws ips cycled in 48h, 5 us treasury subdomains taken
delete the record first, then release the ip
payment times out, app retries. how do you not charge twice?
idempotency key. one uuid per checkout in a header, server stores key + result, a retry gets the stored result
gotcha: claim the key with a unique insert before charging. "check then charge" lets 2 retries both in