A year and a half in the making. Tried it too early, shelved it, never stopped experimenting.
Today it's real. Just ask your files what you need -- they'll listen.
My dear front-end developers (and anyone who’s interested in the future of interfaces):
I have crawled through depths of hell to bring you, for the foreseeable years, one of the more important foundational pieces of UI engineering (if not in implementation then certainly at least in concept):
Fast, accurate and comprehensive userland text measurement algorithm in pure TypeScript, usable for laying out entire web pages without CSS, bypassing DOM measurements and reflow
If profiling feels useless in complex apps (systems), maybe that’s not because nothing can be done.
But because we’re still looking from the wrong perspective.
https://t.co/2KT0uQ0Sf9
That comes from a lack of an underlying system beneath the UI.
When designing the UI for @httpie, we built a whole system that dictates which items and icons should appear in a given context for a particular entity.
Here's something interesting about cache eviction - instead of tracking the exact LRU (Least Recently Used) item, we can just pick two random items and evict the older one.
This is called "2-random," and it works surprisingly well.
The idea is simple. When we need to evict something from our cache, randomly sample two keys, compare their last access times, and evict the one that was accessed longer ago. That's it.
Why not just track true LRU? because, maintaining a perfect LRU requires extra memory and CPU overhead. We need a doubly linked list with pointers for every cache entry, plus the cost of updating it on every access.
Btw, picking two keys at random and evicting the least recently used of the two becomes virtually indistinguishable from true LRU. It works because it avoids the worst random choices (by picking the better of two) while retaining enough randomness.
2-random also degrades gracefully when your working set exceeds the cache size. True LRU can cause near-100% cache misses when looping over data larger than the cache. Random eviction handles this better, and 2-random gives you the best of both worlds.
Many in-memory databases are full of such "good enough" approximations. Dig deeper when you find time. It's fun.
Fix the News published 38 editions of their newsletter this year, "featuring 1,932 stories from 170 countries, and what we found was that while the headlines kept insisting on collapse, the data ... kept showing stubborn progress." https://t.co/8zxAQFMetQ
#ShareGoodNewsToo
🚨 I'm hiring backend devs (I mean, @evilmartians are hiring 👽):
https://t.co/MHSo8JALzE
tl;dr programming polyglots w/ Ruby in their blood; performance experts (databases!); open source addicts; "managers of one"; EN and RU speaking; remote worldwide*
I love stories about products that didn’t find market fit right away but became iconic later.
When the Roland 808 drum machine was released, mainstream musicians didn’t appreciate its “ugly” synthetic sound, and the company didn’t make any money from it.