Tell your coding agents to replace if-else with asserts: fewer bugs, less code
gabriberton · x · 2026-09-27
Borrowing Musk's SpaceX mantra "the best part is no part" (citing the deleted grid fin on the V3 Super Heavy booster), the author argues LLM-generated code is bloated with if-else branches trying to recover from errors that should never happen. His concrete tip: instruct your coding agents to replace those defensive if-else blocks with asserts, so invalid states fail loudly instead of being silently swallowed — saving bugs, lines of code, and money.
More from coding & agent
- Dev turns Annecy into a playable 3D boat tour using Claude Opus 5.5 and Three.js — techartist_ · 2026-09-27
- One-shot with Opus: dev builds a jsfiddle-style sandbox for PHP 4.1.1 — generativist · 2026-09-27
- One-shot with Opus: a PHP 4.1.1 simulator with Zend Engine compiled to WebAssembly — generativist · 2026-09-27
- DHH on AI coding: thinking "architecture" is your fortress? Models are good at that too — tawnniee · 2026-09-27
- Reverse engineering with coding agents: set it up overnight, wake up to source — moyix · 2026-09-27
- ThePrimeagen joins DHH's Omarchy Core to lead agentic QA with Oligarchy harness — mark_k · 2026-09-27