Posts

Why `{ data, loading, error }` Lies — And Algebraic Data Types Fix Your Vibe Coding

Image
An AI agent wrote a React hook, it returned  { data, loading, error } . The render branch said if (loading) return < Spinner /> ; if (error) return < Err /> ; return < List data = {data} /> ; In production,  data  arrived,  loading  stayed  true  for a tick, and the list crashed on  data.items.map . The type said  Order[] | null . The state said "loaded". Both agreed. Neither was right. With functional programming, we can use  Algebraic Data Types  (ADTs) to cover the surfaces where vibe coding drops cases: async calls, error handling, and remote data. The Problem The  { data, loading, error }  shape is a habit, not a type. It describes one concept — "what does this request know right now?" — with three fields that can all have value, all be  null/false/undefined , or any combination in between. Eight combinations but only four of them are legal. The compiler cannot tell one from the othe...

Beyond the “AI Talent Gap”: A Practical Growth Path for Software Engineers in the Age of AI

Image
Most AI-era career advice for engineers optimizes for the wrong thing. It tells you to become a "system architect" — someone irreplaceable, rare, untouchable by AI. Here's why that framing will slow you down. The popular narrative goes like this: AI hollows out average engineers and creates massive upside for a small class of "system-level experts." A looming senior talent gap rewards those who think holistically, debug complex systems, and override flawed AI outputs. Parts of that are true. But taken at face value, it pushes engineers toward chasing abstract seniority instead of building concrete, market-relevant capabilities. Here's the reframe — and a practical path through it. The core shift: code production → complexity control AI has commoditized large parts of code generation: CRUD logic, boilerplate, basic integrations, even moderately complex features. This doesn't eliminate engineers. It shifts the bottleneck. The scarce resource is no longer w...