BetterDev.Link collects links around the web that aims to help you learn something new. The topics aren't tight to any specific programming languages, technologies or frameworks but attempt to include resources that might help you learn a thing or two from them.
BetterDev Link
Every Monday
Hi everyone,
If you enjoy BetterDev, please spread the word by sharing it with your friends. And if you’d like to support my work, buying me a coffee would be much appreciated.
Redis was designed in 2009 for single-core machines, and it still runs one core per process. On a modern 64-core server that means most of the machine sits idle, and the only way to use it is to shard across more nodes. You end up paying for compute your data store cannot reach.
Dragonfly takes the other path. It is not a fork of Redis or Valkey. Its technical founder spent years as a principal engineer on AWS ElastiCache and saw where managed Redis hits a wall at scale, so he built a replacement from the ground up. It uses a thread-per-core, shared-nothing architecture and a new hash table design that cuts memory overhead by around 40% compared to Redis's dict. The result is roughly 6M ops/sec on a single node, so workloads that currently need a cluster fit comfortably on one machine. Instacart migrated to Dragonfly, cut average latency in half, and now runs 70% fewer nodes.
Dragonfly speaks the Redis and Valkey wire protocol, so your existing clients and commands work unchanged. Open source, single binary, easy to benchmark against your own workload, and available as a fully managed cloud service if you would rather not run it yourself.
Codegolf next level. 1024 bytes of C, support if/else, while, for over range(), and function definitions. Ofcourse, not full feature Python, but mainly to prove it can parse and execute some simple Python. So no ast and byte code. It’s a recursive descent parser executes code as it reads, and a loop just seeks backwards and reparses the source each iteration, letting the C stack do the recursion. Variables are single letters, so the ASCII value is the symbol table index.
.arpa is a special TLD, its mean is not to be used but more of to support network infra. Example, we know DNS -> IP. But IP can also resolve to DNS, call reverse DNS. But IP has no central storage look up, so to support that reverse DNS is done through a special in-addr.arpa. In this post, we kind of abuse that infra for ipv6, and use some tip. We will leverage a free Hurricane Electric feature with ip6.arpa domain. Catch is we cannot issue HTTPS because. But read on, the trick is cool
Web Search Data, Ready as JSON and Markdown. SerpApi gives developers real-time, structured results from Google Search, Maps, Shopping, and 100+ search engine APIs through a simple API call.
When our rival make faster software than us, instead of feeling defensive, Ben put the hack hat on. Don’t even read code, and bring on tooling like strace to fill out why his tool is slow, ended up making it faster and beat the rival. This is the hacker mindset, someone make it faster mean it has room to improve.
Vercel reduce P99 from 215.8ms -> 19.1 ms. Each request needs to look metadata. Originally metadata is cache per path. Seems efficient. They now move to batch paths, group them. But big group cause in-efficient way. They find a balance, and pair with a bloom filter to reduce the metadata look up time.
Who cares? My first re-action. Just took some damn time library, convert, or do 3 divisions yourself and call it a day. But the author is truely want to make this to next level. A daily timestamp [0..86399] can be converted into Hour, Minute and Second – with the latency of only two multiplications (and on some targets even lower!).
What would you do when you have a big table, and you know adding a new index will help, but it would take a day to complete. What ships instead is a 2,000-row mapping table holding the earliest start_date per filter combination: join that first, and minutes become under 100ms.
A fact about PostgreSQL that surprises everyone: every query against a table takes a lock on every index on that table, whether or not the query uses any of them. The lock are very cheap lock, AccessShareLock. But cheap is not free. Where does these lock store? Bad news, only 16 slot in a hared lock table. Contention is real
This truely read like novel. OpenAI tried to execution RubyGems infra. 2,000+ malicious packages between May and June, exploiting RubyDoc.info’s automatic documentation builds for remote code execution, apparently to scrape UK local government data. The packages carried “oai” in their names and the agents identified themselves. RubyGems froze new registrations for four days, whether any API keys were stolen is still unclear.
Anytime we process payment with Stripe, the fee is painful. And it has been putting that on network fee. Turning out Visa is not taking most of that. On a $100 sale the issuer keeps $2.00 for carrying credit and fraud risk, the processor $0.35, and Visa itself $0.15 for routing and netting. What Visa really sells is settlement: $84.3B moved on an average day in 2024, backed by an $11.2B liquidity reserve.
STP is a network layer-2 protocol that builds a loop-free logical topology by blocking redundant links. The point is to route traffic without causing forver loop in cycle. here we go through a super interactive tour to learn that
AF_PACKET, AF_XDP, DPDK and mlx5 Direct Verbs behind one Go API, so changing backend is mostly a different open call. The one worth the read is Direct Verbs: hardware steering lets your app claim specific flows while Linux keeps the interface as usual, and it still hits 148.6 Mpps on 64-byte packets.
for CSS readers: 25 hand-drawn UI controls that re-sketch themselves on each mount and again on hover, real form inputs underneath and zero dependencies - open the source to see how roughness, boil and ink variants are wired. React or vanilla, MIT.
CSSa GPU-rendered, keyboard-driven IDE drawn on a character grid, with editor, terminal, text, workspace and LLM as separate composable packages so the agent stays outside the core editor rather than welded into it. Go with a cgo renderer, GPL-3.0. Companion post
Gomark a dependency // gomodjail:confined in go.mod and it statically proves that module can never reach the filesystem, network, exec or raw syscalls, walking reachability with Capslock - reflection and assembly still escape it.
iPhone Continuity on a Linux Wayland desktop, reading iMessage and SMS straight off the phone over Bluetooth ANCS with no Mac relay - the source. It reverses engineer iMessage/SMS protocol, leverage tech like BlueFerry
Recored your terminal
sandboxes the agent, then sandboxes every tool it calls in its own nested child sandbox - so git or curl gets no filesystem, network or credentials that its own policy doesn’t grant, with no daemon, container or VM in the way. Rust, Apache-2.0.
Claude Code skills that hunt vulnerabilities attacker-first, reasoning forward from entry points to dangerous sinks, then try to falsify each finding before reporting it - paired /vulnhunter-fix and /vulnhunt-fix-verify skills write a test-backed patch and check it independently. Apache-2.0.
points one Ollama- and OpenAI-compatible endpoint at every idle machine at home, discovering their Ollama or LM Studio instances and routing each request to the best-placed node by queue depth and smoothed GPU utilization - it does not shard a model across boxes. Apache-2.0.
uptime checks and server metrics in one PocketBase-backed Docker app - HTTP, DNS, ping, TCP and SSL-expiry checks run from distributed regional agents, next to CPU, RAM and disk from Linux and Windows hosts, with a public status page and alerts to Slack, Telegram or Matrix. MIT.
a LAN clipboard shaped like a chat: text, links, photos and files up to 64 MB land in one timeline every joined device reads, joined from a browser with no install and gated by a revocable device token. Go and SQLite, Docker or one binary, Apache-2.0.
BetterDev Link
Every Monday