How a Christmas-1989 hobby project descended from a teaching language became the default tongue of scientific computing and machine learning — through a decade-long, self-inflicted version migration, a global interpreter lock it still fights, and a benevolent dictatorship that resigned over a walrus.
Python
-
The Story of Python -
Backtesting Frameworks and the Ways Backtests Lie A systematic autopsy of every mechanism by which a backtest flatters a strategy that will lose money in production. Covers vectorbt, backtrader, and Zipline-reloaded, the full failure catalogue from look-ahead bias to p-hacking, and the validation methods that survive contact with live markets.
-
Building a Paper-Trading Bot with the Alpaca API A practical guide to architecting a small live-trading system on a homelab using Alpaca's free paper trading API, alpaca-py 0.43, websocket streaming, and a Python state machine deployed via Docker Compose.
-
Monte Carlo Methods: Simulating Your Way Out of Hard Math When a closed-form solution does not exist or is not worth finding, random sampling is the most practical path forward. This post covers the core theory of Monte Carlo estimation — convergence, variance reduction, PRNG discipline — and applies it to portfolio Value at Risk, infrastructure reliability, and capacity planning, with a full Python walkthrough using numpy.
-
Portfolio Optimization in Python: Mean-Variance, Risk Parity, and the Covariance Problem Markowitz's mean-variance framework is mathematically elegant and practically treacherous. This post works through the geometry of the efficient frontier, the statistical nightmare of covariance estimation at scale, risk parity as the practitioner's escape hatch, and Python implementations that are honest about what "optimal" actually buys you in live trading.
-
Risk Metrics for Engineers: VaR, Sharpe, Sortino, and Max Drawdown Sharpe, Sortino, VaR, CVaR, and max drawdown — each metric captures one slice of portfolio risk while hiding another. This guide explains what each measures, how to compute them in pandas, and where every single one will mislead you.
-
The Fourier Transform, Finally Intuitive Any signal is a sum of sinusoids — that one sentence unlocks audio codecs, Wi-Fi, 5G, oscilloscopes, and JPEG. This post builds the Fourier transform from first principles, explains why the naive DFT is impractical and the FFT fixes it, covers windowing and spectral leakage, and shows the whole thing in working Python.
-
The Kelly Criterion: Position Sizing as an Engineering Problem John Kelly's 1956 formula for optimal bet sizing is not finance mysticism — it is applied information theory. This post derives the criterion from first principles, explores fractional Kelly, quantifies sensitivity to estimation error, and shows why treating position sizing as an engineering problem changes how you think about risk.
-
Decoding Market Indicators with Code: OBV and the Golden Cross from Scratch Technical indicators look like chart-reading mysticism until you implement them — then they reveal themselves as small, deterministic functions over an OHLCV time series. This post takes two classics apart in Python: On-Balance Volume (the cumulative sum that turns volume into a running confirmation signal) and the Golden Cross (a moving-average crossover you can detect exactly with a sign change and a diff). Vectorized pandas implementations, the math behind each, the look-ahead-bias trap that makes naive backtests lie, and an honest accounting of why a lagging indicator is a description of the past, not a prediction of the future.
-
The Engineering of Options Trading: The Greeks as Partial Derivatives For an engineer, an option's price is a function of state variables and the Greeks are just its partial derivatives — Delta is dV/dS, Gamma is the second derivative, Theta is dV/dt, Vega is sensitivity to volatility, Rho to interest rates. This post demystifies the Greeks for a technical audience: the Black-Scholes pricing function and its closed-form Greeks in Python with scipy, the intuition behind each sensitivity, delta-hedging as a feedback control loop, the gamma-theta tradeoff that is the real engine of options P&L, portfolio-level risk aggregation, and an honest accounting of where the model's assumptions break (constant volatility, no jumps, the volatility smile).
-
Polars: The DataFrame That Replaced pandas How Polars — a Rust-backed, Arrow-native DataFrame library — achieves real multi-core performance, a query optimizer, and streaming execution that pandas structurally cannot match, and how to migrate to it without losing your mind.
-
Ray: Distributed Python Without the Pain A deep technical look at Ray's core primitives, scheduling model, high-level ML libraries, KubeRay on Kubernetes, and honest trade-offs versus Dask and Spark.
-
CCNA: Network Automation and Programmability REST APIs, JSON data formats, Python network automation with netmiko and NAPALM, Ansible for network devices, and Cisco DNA Center/Catalyst Center — CCNA-level programmability concepts with practical examples.
-
NGINX Unit: The Application Server Nobody Talks About A deep-dive into NGINX Unit — the language-agnostic application server with a REST API-driven configuration model that eliminates uWSGI, Gunicorn, and separate process managers. Covers architecture, live config reloads, Python/PHP/Go/Node/Java setup, TLS, routing, Docker, and Kubernetes, plus an honest assessment of its archived status and when it still makes sense to use.
-
Building a Local RAG Pipeline: From Documents to Answers A practical guide to building a fully local Retrieval-Augmented Generation pipeline: document ingestion, chunking strategies, embedding model selection, vector store options (ChromaDB, Qdrant, FAISS), reranking, and wiring it all together with LangChain and Ollama — no cloud APIs required.
-
OpenTelemetry in Practice: Tracing, Metrics, and Logs Without Vendor Lock-In A practical guide to OpenTelemetry: instrumenting real services with the SDK, running the Collector as a telemetry pipeline, exporting traces to Grafana Tempo, metrics to Prometheus, logs to Loki, and understanding context propagation and baggage.
-
Constrained Generation: Outlines, JSON Mode, and Structured Output That Works How regex-constrained sampling and grammar-guided decoding actually work at the token level, why prompt-only JSON mode fails 5–20% of the time in production, and the full toolchain for guaranteed structured output: Outlines, XGrammar, vLLM guided decoding, and Instructor.
-
LiteLLM and Model Routing: The Proxy Pattern for Multi-Provider LLM Apps One OpenAI-compatible endpoint, many backends. How LiteLLM's proxy pattern works, how to configure routing, fallbacks, cost controls, and observability, and when a self-hosted gateway beats managed alternatives.
-
MCP Deep Dive: Servers, Resources, and Tools A thorough technical walkthrough of the Model Context Protocol: how JSON-RPC over stdio and HTTP works, building servers with FastMCP and the TypeScript SDK, implementing tools and resources, the sampling primitive, security threat model, and production deployment patterns.
-
Semantic Caching for LLM Applications: Cutting Cost and Latency How embedding-based semantic caching works, why threshold tuning is the hardest part, cache invalidation patterns that prevent staleness, and practical implementations with GPTCache, LiteLLM, and a from-scratch Redis + FastAPI setup.
-
Temporal and Workflow Orchestration: Durable Execution for Engineers Who've Been Burned What makes Temporal different from a job queue, how event history replay achieves durable execution, activities vs workflows with real code, retries that actually work, self-hosting on Kubernetes, and an honest comparison with Celery, Airflow, and Step Functions.
-
Building Modern Toolchains on Enterprise Linux: Python, Compilers, and Utilities on SLES 15 and Friends How to give users modern tools — recent Python, compilers, and CLI utilities — on deliberately-frozen enterprise distros like SLES 15 and RHEL, comparing Spack, EasyBuild, Nix, conda, and containers without breaking the stable base.
-
Apache Airflow Deep Dive: DAGs, Executors, and Production Realities A production-focused guide to Apache Airflow — how DAGs, schedulers, and executors really work, where Airflow shines and where it hurts, and what you need to know to run it reliably rather than inherit it and suffer.
-
MPI Programming Essentials: Collectives, Non-Blocking, and the Traps Nobody Warns You About A working engineer's guide to MPI: the mental model, point-to-point and collective communication, non-blocking patterns, derived datatypes, one-sided RMA, threading levels, MPI-IO, performance traps, and integration with SLURM.
-
Building AI Agents That Actually Work A practical engineering guide to building reliable AI agents — tool use, ReAct loops, structured output, memory patterns, multi-agent systems, and the failure modes nobody warns you about.
-
Mojo: Python Syntax, Metal-Level Performance A deep technical guide to Mojo — Modular's MLIR-based language that combines Python syntax with C/Rust-level performance for AI and ML workloads. Covers the type system, SIMD intrinsics, memory ownership, metaprogramming, Python interop, and an honest assessment of where Mojo stands today.
-
Pyroscope: Continuous Profiling in Production Pyroscope brings always-on profiling to production systems — flame graphs for CPU hotspots, memory leaks, and goroutine issues, correlated with your traces and metrics.
-
Python for DevOps and Automation Scripting, automation, working with APIs, and the ecosystem tools every ops engineer should know. From core Python concepts to real-world automation scripts.
-
API Rate Limiting Patterns: Algorithms, Redis Implementations, and Client Communication A deep dive into rate limiting algorithms — token bucket, sliding window log, sliding window counter, fixed window, and leaky bucket — with production Redis implementations, distributed rate limiting, and how to communicate limits to clients.
-
Dagger: Portable CI/CD Pipelines That Run Everywhere Write CI/CD pipelines in Go, Python, or TypeScript that run identically on your laptop and in CI — no more YAML hell, no more 'works locally but fails in GitHub Actions'. A complete Dagger guide.
-
Designing for Observability: Building Applications You Can Actually Debug A practical guide to designing applications that are easy to debug in production — structured logging with trace IDs, meaningful metrics, health endpoints, graceful degradation, and the patterns that separate systems you can reason about from ones you can only guess at.
-
DuckDB for Analytics Engineers: In-Process OLAP That Replaces Your Spark Cluster A comprehensive guide to DuckDB—covering its columnar vectorized execution engine, querying Parquet and S3 directly, replacing heavy Spark jobs for medium data workloads, Python and R integration, performance tuning, and when to use DuckDB vs alternatives.
-
OpenTelemetry: One Instrumentation to Rule Them All A deep dive into OpenTelemetry: the data model for traces, metrics, and logs; auto-instrumentation for Go, Python, and Node.js; building a Collector pipeline; and exporting to Jaeger, Prometheus, and Loki.
-
Python Packaging and Distribution: pyproject.toml, uv, Wheels, PyPI, and Vendoring A modern guide to Python packaging — pyproject.toml as the single config file, uv for blazing-fast dependency management, building and publishing wheels to PyPI, and vendoring dependencies for reproducible deployments.
-
Temporal for Durable Workflows: Replacing Fragile Cron Jobs and Distributed Sagas A comprehensive guide to Temporal — the durable execution engine that makes long-running, fault-tolerant workflows simple. Covers activities, workflows, signals, queries, schedules, child workflows, and running Temporal in production on Kubernetes.
-
Dependency Management: Lock Files, Vulnerability Scanning, and Keeping Deps Fresh Without Pain A practical guide to managing project dependencies across ecosystems: lock files, semantic versioning, vulnerability scanning, automated updates, and the processes that keep dependency rot from killing your project.
-
Fine-Tuning Small Models: When and Why to Fine-Tune vs. Prompt Engineer A practical guide to fine-tuning small language models — understanding when fine-tuning beats prompt engineering, how LoRA and QLoRA work, training a model on your own data with Unsloth or Axolotl, and deploying the result with Ollama.
-
Profiling Applications: Finding Bottlenecks in Go, Python, and Node.js Stop guessing why your application is slow. This guide covers systematic profiling tools and techniques for Go (pprof), Python (cProfile, py-spy, line_profiler), and Node.js (clinic.js, V8 profiler) so you can find the actual bottleneck and fix it with confidence.
-
RAG from Scratch: Building a Retrieval-Augmented Chatbot Over Your Own Documents A complete technical walkthrough of building a retrieval-augmented generation (RAG) system from scratch — covering embeddings, vector databases, chunking strategy, retrieval quality, and a fully runnable Python implementation using Ollama and ChromaDB.