Why I Stopped Using AI for Boilerplate and What I Use It For Instead
The author argues that the most common use of AI coding assistants - generating boilerplate code - is not the best application. Instead, they suggest using AI for tasks that require more judgment and analysis, while using templates and deterministic tools for consistent, repetitive work.
Why it matters
This article provides a nuanced perspective on the appropriate use of AI coding assistants, cautioning against over-relying on them for boilerplate generation and highlighting their strengths in more analytical tasks.
Key Points
- 1Boilerplate code is where consistency matters most, and AI struggles with maintaining consistency unless every detail is over-specified
- 2AI is excellent at identifying edge cases, writing additional tests, explaining unfamiliar code, debugging, and planning migrations
- 3The author's rule is to use AI where judgment matters, and use templates/generators where consistency matters
Details
The author spent 3 months using AI to auto-generate CRUD endpoints, form components, and config files, feeling productive. However, they later realized that the generated boilerplate code had inconsistencies that required manual fixes. The problem is that boilerplate is the part of the codebase where consistency is critical, and AI is not good at maintaining consistency unless every detail is explicitly specified. In contrast, the author has found AI to be excellent at tasks that require more judgment and analysis, such as identifying edge cases, writing additional tests, explaining unfamiliar code, debugging, and planning migrations. The author's rule now is to use AI where judgment matters, and use templates, snippets, and other deterministic tools where consistency matters.
No comments yet
Be the first to comment