RLFO#39: Al Gore Rhythm
This post originally premiered on Random Links Found Online.
Algorithms! The building block of everything you see around you. From the textbook example of baking a cake, to tailoring the reels of your TikTok feed based on what you double tapped. It’s not just the building block of everything computer-related, it goes way beyond that. What is DNA if not a sequence of instructions for building proteins? What cells do is they go through this assembly-like sequence of As Cs Gs and Ts and transform basic aminoacids/inputs into proteins/outputs of all shapes and folds. A program for life, if you will. The answer to Beyonce’s “Who runs the world?” question should really be Algorithms. But that’s not the algorithms we’re talking about in this RLFO. We’re programming primates, so let’s focus on what we do best: throwing rocks at each other and writing code.
?? Queueing
[link] You use queues every day, even when you don’t realize you do. When you ask your local bartender for a Pecan Crunch Oatmilk Latte?? and you have to wait for them to prepare “two Pumpkin Spice Lattes and a Matcha Latte to go” for aunty Karen and her spoiled brats, you are producing a task and enqueueing it. And then you contemplate first world problems in silence, until a free bartender dequeues your task and handles (or consumes) it. Now, there are different types of queues, some with priority and some with some odd rules, like the latest coming customer gets served first… But you can interact with them in this interactive study.
?? Implementing and Improving Skiplists
[link] Is it a linked list? Is it a tree? Is it a graph? Technically, everything is a graph if you squint your eyes hard enough, but that’s a topic for another time. Redis uses skiplists for ordered sets, other databases use them for indexing or storing quick-access data in memory. It’s an efficient enough yet simple enough data structure which might make you sound smart and wise when you use it in conversation with your other fellow nerds.
?? An Interactive Intro to CRDTs
[link] Have you ever considered how Google Docs allows multiple people editing the same document at the same time? How do they manage to merge conflicting edits? If you say Operational Transformation, you used to be right at some point in the past. But not anymore. Now everyone and their grandmother is doing Context-free Replicated Data Types! I once held a lecture on CRDTs, and students probably understood the basics of them. Or maybe not; students don’t want to learn, they just want good grades. Either way, this interactive guide might learn you a thing or three on CRDTs.
?? Bloom Filter Data Structure
[link] Say you are building the next Google, because that’s how all System Design interview questions start. When you build your Website Crawler, you don’t want to process the same URL more than once. How can you tell, quickly, if a URL you are trying to crawl is already crawled or not? Bloom filters to the rescue. Sure they can throw some false positivies, but at least that probability is tweakable.
?? 20 Patterns to Master Dynamic Programming
[link] From what I’m told, Big Tech companies love to ask these DP questions in their interviews. In my experience, companies which ask DP questions are either low tier companies which want to act like they’re Google and you don’t want to work for them; or they’re high tier companies which get too many candidates and need to sift through too many people. Either way, some of these problems have interesting and elegant solutions, and learning a few extra things never hurt anybody.