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.

Original post →

More from coding & agent

coding & agent channel →