3 ms·
Your example of performance tuning caches is a perfect. It's enough to generally know about caches. Databases have query caches. Memcache and Redis are memory
by johnwheeler 10y ago
Your example of performance tuning caches is a perfect.
It's enough to generally know about caches. Databases have query caches. Memcache and Redis are memory caches. Retrieval is O(1) because they're based on hashes. You can influence object expiration and turn on LRU.
I can't implement a cache with LRU by the seat of my pants though, but I'm experienced enough to know you shouldn't do that anyways. And, I know enough to read the docs and ask intelligent questions.
None of that changes the fact that when my cache blows up in production, I'm going to be in the exact same position as my all-algo-knowing colleague -- scared, grasping at straws, and applying grit to fix the problem.
- plandis 10y agoI've always considered an LRU cache question to be pretty decent. The general idea is fairly obvious (linked list + hash table) and straightforward to get something working and is a good indicator on how someone can synthesize data structures to fit the needs of the problem. Plus there is a lot of open endedness that makes it easy to drill down into someone's thought process.
- greenleafjacob 10y agoWow, I could not agree more. What you are calling grit is massively under-measured in the current bullshit whiteboarding interviews for software developers today.
- johnwheeler 10y agoThanks. Another name for it is StackOverflow :-P