Blog · page 3

Articles on architecture, headless commerce, and practical product engineering.

AI context is a resource. How I stopped wasting it blindly

I spent an hour on an AI session only to discover at the end that the agent had rewritten a file we'd already fixed at the start. Not because it's broken — the context window filled up, and the model lost track of what happened early in the conversation. Since then I treat the context window like RAM: when it's full, you get swaps. So I built a session hygiene around that.

Four PHP behaviors we only caught in Bitrix production

PHP has four language-level behaviors that cause production performance problems in Bitrix: session file locking, OPcache stale entries on deploy, array copy-on-write memory doubling, and non-deterministic destructor order. These aren't bugs — they're documented behavior — but they only become visible under production load.

Redirects Died on Deploy Day. Bitrix Didn't Warn Us.

We went headless in February. In April, our SEO consultant sent a spreadsheet: 340 broken links. Three years of redirect rules, gone the day we deployed Next.js. No errors in the logs. Next.js had no idea these rules were supposed to exist in the first place.

Elasticsearch Mapping Is Architecture, Not Configuration

For three weeks we couldn't figure out why the price filter wasn't working. Elasticsearch was up. Queries were coming in. Results were returning. But the price range — say, $15 to $50 — was being ignored completely. Products at $180 and $3 showed up side by side.

Claude Code in a PHP Studio: The Honest Assessment

A year ago I wrote about what I don't delegate to AI. The list: architecture, cross-layer contracts, database schema decisions. That list still holds. But the year added something I didn't expect — a clearer picture of where Claude Code is genuinely useful.