Blog
Tutorials, guides, and insights to help you become a better developer.
TypeScript ships with 15+ utility types that let you derive new types from existing ones. Here's the full toolkit with the production patterns you'll actually reach for.
AdminMarch 23, 20265 min read
Build Node.js's EventEmitter from scratch in 100 lines. Learn why listener removal requires saved references, how once() wraps callbacks, and what that MaxListenersExceededWarning actually means.
AdminMarch 20, 20265 min read
Two mid-to-senior linked list problems that test data structure design: deep-copying a list with random pointers (O(1) space trick), and implementing LRU Cache in O(1).
AdminMarch 19, 20265 min read
Sliding window maximum is the classic follow-up to every sliding window problem. Learn the monotone deque pattern in JavaScript with LeetCode 239, 1438, and 1696.
AdminMarch 17, 20268 min read
Stop writing the same function for every type or reaching for `any`. TypeScript generics let you write it once — with full type inference, constraints, and zero casting.
AdminMarch 16, 20265 min read
LC 297 is a Hard but the insight is simple: null markers make any traversal unambiguous. Learn preorder DFS and BFS serialization, plus the BST shortcut for LC 449.
AdminMarch 13, 20268 min read
Stop casting with `as` and `!`. Discriminated unions give TypeScript enough information to narrow types automatically — making impossible states unrepresentable and exhaustiveness checking free.
AdminMarch 12, 20265 min read
Caddy gives you automatic HTTPS and a 4-line config. Nginx gives you raw throughput and a 25-year ecosystem. Here's when each one is the right call.
AdminMarch 10, 202610 min read
Jump Game, Gas Station, and Partition Labels — three greedy DSA patterns that feel like guesswork until you see the invariant that makes each one provably correct.
AdminMarch 9, 20267 min read