Overview
When AI agents write code for us, we accumulate “cognitive debt” - we lose understanding of how our own systems work. Simon Willison explores using interactive explanations as a method to pay down this debt and rebuild comprehension of AI-generated code.
The Breakdown
- Cognitive debt accumulates when we can’t understand AI-generated code - similar to technical debt but affecting our ability to reason about and plan new features for our applications
- Archimedean spiral placement algorithm for word clouds - words are positioned using mathematical spirals with random angular offsets to create natural-looking layouts without overlaps
- Animated explanations reveal algorithm mechanics - by visualizing the step-by-step process of word placement with pause/resume controls, complex algorithms become intuitive to understand
- Linear walkthroughs provide structured code understanding - AI can generate detailed explanations of codebase structure and flow, bridging the gap between raw code and comprehension