Skip to content

Architecture

001.

Let It Propagate

Most catch blocks shouldn’t exist.

Not “most catch blocks are wrong” (though many are). Most of them have no reason to be there. Someone felt nervous about an exception propagating and stuck a try/catch around it like a security blanket.

The principle is simple:

Exceptions move up the stack until they reach a layer with enough context to do something meaningful with them.

Every catch block should exist because of a deliberate decision, not because letting an exception fly felt irresponsible.

002.

Give Your AI Assistant the Docs, Not the Search Bar

An AI coding assistant working on your Home Assistant integration needs to know how config flows work. It can search the web, find a three-year-old forum post, and implement the API that was deprecated in 2023. Or it can read the actual docs.

The second option requires you to put the docs somewhere it can read them.


The Web Search Problem

AI assistants that can search the web will. And they’ll find things. Stack Overflow answers from HA 0.88. GitHub issues marked “fixed in core.” Medium posts from 2021 that are now quietly wrong about three things. The model doesn’t know which sources are authoritative; it doesn’t know what’s stale. It synthesises confidently from whatever it finds.

003.

Teaching AI to Code Like a Senior Developer: SOLID Principles as Guardrails

There’s a dirty secret about AI-assisted coding: it’s often too helpful.

Ask an AI to implement a feature and it will. Quickly and confidently. It’ll reach across your codebase, modify whatever it needs, create utilities that duplicate existing ones, deliver working code that makes you uncomfortable.

The code works. It doesn’t belong.

The AI isn’t bad at coding. It’s bad at not coding. It lacks the pause that experienced developers have: the “wait, where should this actually live?” moment. The awareness that every line you write exists in a larger context.