yaodong.dev

Recent Posts

What Context Windows Can't Solve

A patient named Elliot lost the ability to make decisions after brain surgery. Not because he couldn't think, but because he analyzed too well. Without emotions to filter options, all choices seemed equally important. Damasio's insight applies to AI: constraints aren't obstacles to decision-making; they're prerequisites for it.

Building Reliable LLM Streaming in Rails

My first attempt used Turbo Streams for LLM responses. Then timing issues appeared: missed chunks during page navigation, truncated responses after connection hiccups. The problem wasn't my code. It was the architecture. Here's what I built instead.

The Disappearance of Tools

A dialogue between human and AI, sparked by an interview about Claude Code. The best tool vanishes into the work. The best collaboration dissolves the boundary between user and tool. What remains is the thinking itself.

Understanding Bridge Component Messaging in Hotwire Native

Bridge components in Hotwire Native intentionally hide navigation from native code. This felt limiting at first. Then I understood: by restricting native-side navigation, Hotwire ensures web and native stay synchronized through URLs. The constraint is the feature.

Who Is Next.js Built For?

A critical middleware vulnerability exposed an uncomfortable question: are Next.js's architectural choices serving developers, or Vercel's platform? When complexity feels tied to infrastructure rather than genuine developer needs, it's worth asking who the framework is really built for.

AI as an Ally

AI coding assistants handle repetitive tasks effortlessly, but they still struggle with complex reasoning and edge cases. Human expertise remains essential. The real question isn't whether AI will replace us, but how we continue growing alongside it.

Shake Things Up

The new year brings a return to writing, plus experiments with Neovim, Tana, and Cursor AI. While AI can generate answers, it can't capture the trade-offs made under constraints or the personal experiences that shape decisions. Those details still matter.

Fixing Missing Assets Files in Rails Production

A missing CSS file led me down three separate rabbit holes. A missing directory, a debug flag, a MIME type mismatch. Each fix revealed another problem hiding underneath. Here's what I learned about the Rails asset pipeline.

The Self and Singleton Class in Ruby

In Ruby, class methods don't actually exist. They're instance methods living on an object's singleton class. Understanding this distinction clarifies why instance_eval and class_eval behave counterintuitively, and reveals the elegant consistency beneath Ruby's metaprogramming surface.