Comment by vunderba

14 hours ago

I've commented on this before, but issuing a prompt like "Fix X" makes so many assumptions (like a "behaviorism" approach to coding) including that the bug manifests in both an externally and consistently detectable way, and that you notice it in the first place. TDD can reduce this but not eliminate it.

I do a fair amount of agentic coding, but always periodically review the code even if it's just through the internal diff tool in my IDE.

Approximately 4 months ago Sonnet 4.5 wrote this buried deep in the code while setting up a state machine for a 2d sprite in a relatively simple game:

  // Pick exit direction (prefer current direction)
  const exitLeft = this.data.direction === Direction.LEFT || Math.random() < 0.5;

I might never have even noticed the logical error but for Claude Code attaching the above misleading comment. 99.99% of true "vibe coders" would NEVER have caught this.