DEV Community

Aleksei Aleinikov
Aleksei Aleinikov

Posted on

🧠 How to Name Things in Code — 2025 Edition

Bad names cost time. Good names vanish — because they just make sense.
Here’s what works today:

  • ✅ isVisible, hasAccess, canRetry — clear boolean flags
  • 🔁 onClick, onClose — event handlers by name
  • 🧩 useToggle — hint that there’s logic inside
  • 🧮 i, j, x, y, r, g, b, t — short, but always clear in context
  • 🧱 MAX_USERS, DEFAULT_PORT — constants should scream

Naming is the most portable skill in engineering. Use it well.
📎 Full write-up → https://javascript.plainenglish.io/readable-code-in-2025-how-to-name-everything-right-69ebab02e35c

Top comments (0)