React Performance Cheat Sheet

Here's a quick reference to debug and fix common react performance issues * Production mode: Make sure deployed app is a production build, NOT a development build. * Keys: make sure every component mapped from an array has a unique and stable key * Check component hierarchy or state: first try…

Database Basics for System Design Interviews

What are Databases? Databases are programs that either use disk or memory to do 2 core things: * record data * query data In general, they are usually always-on servers that are long lived and interact with the rest of your application through network calls, with protocols on top of TCP or…

Latency and Throughput

Latency Latency is the time it takes for a certain operation to complete in a system. Most often this measure is a time duration, like milliseconds(ms) or seconds(s). Typical Software System Latency Numbers: * Reading 1 MB from RAM: 0.25 ms * Reading 1 MB from SSD: 1 ms…

Observables

An observable is a stream of 0 or more values. The stream comes in over a period of time. The stream is cancelable.…

promisify

Create a function to turn any function into a "promisfied" function. Any function to be promisified will always have a callback as the last argument.…