Developer shares two-step method to stop AI copying legacy code patterns
11/18/2026 — 11/18, 22:20·1 sources (all)·1 reports (all)
Key takeaways
- A developer argues that AI copying outdated code is mainly a data-cleaning problem. The proposed fix is to remove legacy patterns that AI ca…
Background & analysis
On November 18, 2026 at 21:58, an author on Juejin published the article "AI Keeps Copying Old Code Patterns: Clean Bad Examples First, Then Back Up with Types and Tests", presenting a two-step approach to the problem of AI models repeating outdated coding patterns found in a codebase. The piece argues that when AI reuses old code, the more likely cause is a lack of cleanup for bad examples, not that the model has learned incorrect behavior. In other words, legacy code in a repository gets carried over because no one removed the flawed samples that could be copied.
The method unfolds in two ordered steps. First, delete the outdated patterns in the codebase that AI could copy, cutting off the supply of bad examples at the source. Second, rely on the type system and tests to constrain how code is written, so that incorrect patterns fail to compile or fail to run, blocking them at the compilation or execution stage.
At this point, the only coverage of the two-step method is this single Juejin post. The event stands at the stage where the author has publicly outlined the approach, with no follow-up developments or wider discussion reported yet.
AI-generated from 1 reports · updated 4 days ago
- Heat index
- 25
- All sources
- 1
- All reports
- 1
- First seen
- 4 days ago
Reports on this story headlines open the original
A Juejin post lays out a two-step fix for AI tools that keep reproducing outdated patterns from a codebase: first delete the stale examples the model can copy, then use type checks and tests so the wrong patterns fail to compile or pass. The author argues the model is not learning bad habits so much as copying what is still there to copy.
掘金AI score 56
Other stories people are talking about
- Heat index 1143RisingAnthropic Reaches $1.6 Trillion Market Value in First Trading Week After IPO21 sources
- Heat index 1011Anthropic Mathematician Says Claude Formalized the Generalized Riemann Hypothesis21 sources
- Heat index 622Anthropic IPO total raise reaches $93.5 billion after greenshoe exercise20 sources
- Heat index 596RisingThinking Machines Lab Open-Sources Inkling 2 Mini with 32GB Model Card Recommendation10 sources
- Heat index 490RisingSEC probes Nvidia accounting practices as shares post seven-week slide9 sources
How is heat calculated?About the methodHide
Heat counts how many independent sources covered a story in the last 48 hours: one source counts once no matter how many posts it published, decaying with a 24-hour half-life. What ranks first is what many people are talking about.
This page aggregates public feeds. Headlines and summaries are machine-organized and remain the property of the original authors; verify important facts at the source. If you believe a headline or summary infringes your rights, email the contact address in the footer with the page URL and basis of your claim, and we will remove or replace it after review.
- Surge
- Discussion rising fast
- New
- First report within 6 hours
- Rising
- Still gathering discussion

