惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
小众软件
小众软件
The Cloudflare Blog
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Visual Studio Blog
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
S
SegmentFault 最新的问题
宝玉的分享
宝玉的分享
博客园 - 叶小钗
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
博客园 - 聂微东
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
J
Java Code Geeks
Y
Y Combinator Blog
D
Docker
Microsoft Azure Blog
Microsoft Azure Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your AI Does Not Have a Naming Convention. It Has a New O...
Avery · 2026-06-15 · via DEV Community

Open any React project where the AI has been generating code for a few months.

Search for how buttons are named. How handlers are named. How hooks are named. How the same concept appears across different features.

Chances are you will find three or four variations of the same thing. Not because different developers made different choices. Because the AI made a different choice every session and nobody defined what the convention was supposed to be.

Naming looks consistent until you look closely. Then it looks like a project with no memory.

Why AI naming drifts

Naming is one of the most context-dependent decisions in code.

What something is called depends on the domain, the existing conventions, the patterns already established in the project, and a shared understanding of what words mean in this specific codebase.

The AI has access to some of that context in each session. It can see the files around the current work. It can infer patterns from what it reads. But it cannot see the entire codebase at once. It cannot remember what it called something three sessions ago. And it has no definition of what the naming convention actually is unless someone wrote it down.

So it invents. Each session produces names that make sense in isolation. Button handler today. Handle button click tomorrow. On button press the session after that.

All reasonable. All different. All adding to a codebase where the same concept has accumulated three names and nobody remembers which one was intentional.

What inconsistent naming actually costs

Naming inconsistency is not a cosmetic problem.

When the same concept has different names in different parts of the codebase, developers spend time figuring out whether they are the same thing or different things. New developers spend longer onboarding because the vocabulary is not consistent. Search becomes unreliable because you have to know which variation to look for.

More subtly, inconsistent naming signals that no standard exists. And a codebase that signals no standard invites more inconsistency. The next developer sees the variation and adds a fourth version because there was no single correct answer to follow.

The AI did not create this problem maliciously. It created it because naming decisions were never defined as rules.

Inconsistent naming is not a sign that the AI is bad at naming. It is a sign that the naming convention was never written down where the AI could find it. The AI names things perfectly consistently within a session. The problem is that sessions do not share memory.

What a naming rule actually looks like

A naming rule does not have to cover every possible case. It has to cover the decisions that keep coming out differently.

The most common variations are usually handlers, hooks, and component props. Those are worth defining explicitly:

Naming rules that eliminate drift:
1. Event handlers are always named handle followed by the action. handleSubmit, handleClick, handleChange. Never on, never process, never manage.
2. Custom hooks are always named use followed by the feature they serve. useUserProfile, useCartItems. Never get, never fetch, never load.
3. Boolean props are always named with is or has as a prefix. isLoading, hasError, isVisible. Never loading, never error, never visible alone.

Three rules. Written once. The AI stops inventing variations because the convention exists before the session starts.

The naming that becomes the codebase vocabulary

When naming rules exist, something interesting happens over time.

The codebase develops a vocabulary. The same words appear in the same patterns across every feature. A new developer joins and learns the vocabulary once. From that point they can navigate any part of the project because the language is consistent.

That vocabulary is not created by the AI. It is created by the rules that define what the AI names things. The AI then applies those rules consistently across every session, every feature, every developer who uses it.

The codebase starts to feel like it has a voice. Like it was written by someone with a clear point of view about what things should be called.

It was. You just had to write that point of view down as rules.

The prompt does not matter. The rules do.

Your AI will name things every session. That is unavoidable.

What is avoidable is letting it invent a new convention every time. Write the naming rules once. Give them to the AI before every session. And stop spending time renaming things that should have been named right the first time.


Want to find where your React project has accumulated naming inconsistency?

I built a free 24 point checklist that helps you find exactly that. The structural gaps where your AI has been inventing conventions instead of following one.

Get the React AI Clean Code Checklist — free

Avery Code React AI Engineering System