# Allan MacGregor > Elixir engineering and technical leadership. Production BEAM systems, OTP and > Ecto patterns, how AI coding agents interact with Elixir codebases, and a > black-box audit series scoring shipped products against a published rubric. > Written by Allan MacGregor — two decades shipping software, ex-CTPO at Humi > through a $140M+ CAD acquisition, now CTO at LiORA. The blog spans 2013-2026. Content from 2026 onward is Elixir-focused and current; the 2013-2017 archive covers PHP, Magento, HHVM and Vim and is retained for historical reference only. ## Elixir, OTP and the BEAM - [Reading the Supervision Tree Contract, Key by Key](https://allanmacgregor.com/posts/otp-supervision-trees-child-specs-and-strategies): Child specs, the three strategies, restart types and intensity, shutdown semantics, DynamicSupervisor - [Building Resilient Systems with OTP Supervisors](https://allanmacgregor.com/posts/building-resilient-systems-with-otp-supervisors): What "let it crash" actually means, and tuning restart intensity - [Distributed Elixir: Beyond the Basics](https://allanmacgregor.com/posts/distributed-elixir-beyond-the-basics): Process groups over global registration, network partitions, and when not to cluster - [Understanding BEAM Memory Management](https://allanmacgregor.com/posts/understanding-beam-memory-management): Per-process heaps, garbage collection that never stops the world, binary handling - [GenServer Patterns You Should Know](https://allanmacgregor.com/posts/genserver-patterns-you-should-know): Call versus cast for backpressure, handle_continue, state machines, testing - [Debugging Production Elixir with Observer and Recon](https://allanmacgregor.com/posts/debugging-production-elixir-with-observer-and-recon): Remote shells, heavy processes, memory and binary leaks ## Phoenix, Ecto and LiveView - [Phoenix Contexts Done Right](https://allanmacgregor.com/posts/phoenix-contexts-done-right): When to split a context, cross-context communication, the god context anti-pattern - [LiveView Patterns for Complex UIs](https://allanmacgregor.com/posts/liveview-patterns-for-complex-uis): Stateless versus stateful components, send_update, PubSub between siblings - [N+1 Issues with Ecto and Elixir](https://allanmacgregor.com/posts/n-1-issues-with-ecto-and-elixir): How they form, three preloading strategies, and detecting them before production - [Advanced Ecto Queries: Window Functions and CTEs](https://allanmacgregor.com/posts/advanced-ecto-queries-window-functions-and-ctes): Reaching PostgreSQL features without leaving the query DSL - [Multi-Tenancy Patterns in Ecto](https://allanmacgregor.com/posts/multi-tenancy-patterns-in-ecto): Schema prefixes versus row-based isolation, and the tradeoffs as tenants grow - [Zero Trust Authentication in Phoenix](https://allanmacgregor.com/posts/zero-trust-authentication-in-phoenix): Identity-aware proxies and nimble_zta, wired into the router - [Property-Based Testing with StreamData](https://allanmacgregor.com/posts/property-based-testing-with-streamdata): Generators, shrinking, and testing Ecto changesets ## Elixir and AI agents - [Why AI Coding Agents Love Elixir](https://allanmacgregor.com/posts/why-ai-coding-agents-love-elixir): Immutability and pattern matching as cognitive scaffolding, grounded in Tencent's AutoCodeBench results - [Writing Elixir for AI Agents](https://allanmacgregor.com/posts/writing-elixir-for-ai-agents): Patterns that help agents read code, and the anti-patterns that confuse them - [The Stability Tax](https://allanmacgregor.com/posts/the-stability-tax-elixir-versioning-ai): Why a decade of boring semantic versioning makes Elixir a better AI target - [The AI-Native Elixir Project](https://allanmacgregor.com/posts/the-ai-native-elixir-project): Project structure, CLAUDE.md, and docs as an interface for agents - [Setting Up Tidewave](https://allanmacgregor.com/posts/setting-up-tidewave-beam-introspection): BEAM process inspection, ETS exploration and live tracing exposed to an agent over MCP - [Elixir and AI: Building LLM-Powered Features](https://allanmacgregor.com/posts/elixir-and-ai-building-llm-powered-features): OpenAI and Anthropic clients, Instructor for structured output, streaming into LiveView - [Embedding Python in Elixir with Pythonx](https://allanmacgregor.com/posts/embedding-python-in-elixir-with-pythonx): ML inference without ports, NIFs or a microservice - [Optimizing Claude Code Workflows for Token Usage](https://allanmacgregor.com/posts/claude-code-workflow-token-optimization): Cutting a multi-agent workflow from 768k to 85k output tokens ## Vibecode Rescue — black-box product audits A public series scoring shipped, AI-built products against an 11-dimension rubric (Part A product and growth, 55 points; Part B engineering and risk, 45). Findings carry a confidence marker — Confirmed, Inferred, Unknown or Unmeasured — and every number points at a saved evidence run. Scoring caps and band thresholds are published so a high score means something. - [All audits](https://allanmacgregor.com/audits) - [Why the series exists and how it scores](https://allanmacgregor.com/posts/vibecode-rescue-auditing-vibecoded-apps): The rubric, the rules of engagement, and what the collector is allowed to touch - [paylog.space](https://allanmacgregor.com/audits/paylog-space): 29/100, Broken ## Operations and delivery - [Deploying Elixir with Kamal 2](https://allanmacgregor.com/posts/deploying-elixir-with-kamal): Zero-downtime deploys, secrets, rollbacks and migrations on self-hosted infrastructure - [Observability for Elixir Applications](https://allanmacgregor.com/posts/observability-for-elixir-applications): Telemetry handlers, OpenTelemetry tracing, structured Logger metadata - [Event Sourcing with Elixir](https://allanmacgregor.com/posts/event-sourcing-with-elixir): Event stores on Ecto, projections, snapshots, and when not to use it - [Circuit Breaker Pattern in Elixir](https://allanmacgregor.com/posts/circuit-breaker-pattern-in-elixir): Failing fast against unreliable downstream services ## Browse - [All posts](https://allanmacgregor.com/posts): 94 articles, 2013-2026 - [Topics](https://allanmacgregor.com/tags): Every subject across posts, TILs and audits - [TIL](https://allanmacgregor.com/til): Short Elixir, Phoenix and Ecto notes - [Publications](https://allanmacgregor.com/publications): Articles and podcast appearances elsewhere ## Optional - [About](https://allanmacgregor.com/about): Background, and the profiles this author entity links to - [Services](https://allanmacgregor.com/services): Fractional CTO work — four tracks, fixed scope and fixed price - [Projects](https://allanmacgregor.com/projects): Bloccs, Shiplog, StructPR and others - [Books](https://allanmacgregor.com/books): Two Magento titles written for Packt, both discontinued