Skip to main content

Sign in to CleanKata

Track your progress, earn XP, and unlock every lesson.

By signing in you agree to our Terms of Use and Privacy Policy.

Object Calisthenics50 XP5 min

Don't Abbreviate

Abbreviations mask deeper problems — if a name is too long to write out, the method has too many responsibilities. Names should be one or two clear words.

Why this matters

The urge to abbreviate often masks a naming problem that is actually a design problem. When you find yourself writing UsrAcctMgr instead of a full name, it usually means the class is doing too many things — a good name is being sacrificed because the concept is too complex to name well. Expanding the abbreviation forces you to confront that complexity, which often leads to splitting the class into smaller, clearly-named pieces.

Code Challenge

Study the messy code, try to refactor it, then reveal the clean version.

💡Key takeaway

If you can't name something without abbreviating, the thing itself is too complex — split it, then name each part clearly. The abbreviation is a symptom; too many responsibilities is the disease.

🔧 Some exercises may still have errors. If something seems wrong, use the Feedback button (bottom-right of the page) to report it — it helps us fix it fast.

Hint: If you can't name it without abbreviating, it's a sign that the thing itself is too complex — split it, then name each part clearly.

✗ Your version