Posts
All the articles I've posted.
Impermanent Loss — The Hidden Cost of DeFi Liquidity Provision
Posted on:August 11, 2025 at 10:00 AMA complete mathematical treatment of impermanent loss in AMMs: the derivation, the formula, the exact scenarios where it's catastrophic vs acceptable, and how V3 concentrated liquidity amplifies it. Includes an interactive P&L calculator.
LLM API Integration Patterns — Structured Outputs, Function Calling, Streaming
Posted on:July 14, 2025 at 10:00 AMProduction patterns for integrating LLM APIs: structured JSON outputs, tool/function calling for agentic workflows, streaming with proper backpressure, and error handling for the failure modes unique to probabilistic AI systems.
Node.js Memory Leaks — How I Found and Fixed a 2GB Leak in Production
Posted on:June 16, 2025 at 10:00 AMA real case study of a Node.js API that grew to 2GB RSS and crashed weekly. Covers heap snapshot analysis, the --expose-gc flag, closure leaks, EventEmitter leaks, and the three-snapshot technique for finding what's growing.
Vectorization in Python — NumPy vs Pandas vs Polars vs Numba
Posted on:April 14, 2025 at 10:00 AMSystematic benchmarks comparing four vectorization approaches across different dataset sizes and operation types. When to use NumPy directly, when Polars wins, and when Numba's JIT compilation is the only answer.
Building a Real-Time DEX Price Monitor with Node.js and WebSockets
Posted on:March 17, 2025 at 10:00 AMStep-by-step guide to building a real-time DEX price monitor that listens to Uniswap V2/V3 swap events via WebSocket, decodes transaction logs, and broadcasts live price updates to connected clients. Complete TypeScript implementation with reconnection logic.
Compound Interest — A Software Engineer's Mathematical Guide (Interactive)
Posted on:February 24, 2025 at 10:00 AMCompound interest from first principles: discrete vs continuous compounding, the Fisher equation for real returns, the Rule of 72, and why the difference between annual and monthly compounding matters more than most people think. All interactive.