One of the most important aspects of software development: Naming things.
One of the most important aspects of software development: Naming things. (Yes, the quote is absolutely true: Naming things is one of the two hardest problems in computer science.)
While re-reading Clean Code, Chapter 2 really stood out.
My key takeaways:
- We often name things for what they are intended for instead of what they actually do
- We shorten variable names for no reason, even though our brains and tools can handle durationInSeconds instead of s
Here is an overview of the most important points: ✅ Use names that reveal intention: If it needs a comment to explain it, the name has failed. ✅ Avoid misleading names: Do not call it a list if it is not a List. Avoid vague suffixes like Data or Info. ✅ Make names meaningfully different: user, userData, userInfo, these are not real distinctions. ✅ Pick names you can say out loud: If you cannot pronounce it, you cannot discuss it clearly. This is a team sport. ✅ Pick names you can search for: Avoid one-letter or magic-number variables. You will never find them again. ✅ Do not encode type or scope into names: Let your tools do that work. You do not need m_, IInterface, or HungarianNotation. ✅ Be consistent across your codebase: Pick one word per concept. Not get() in one class and fetch() in another. ✅ Add enough context, but not too much: Use small classes or functions to provide clarity. Avoid prefixes like GSDUserAccount.
Good naming is not just a detail: It is where most complexity starts or ends.
This chapter is a reminder, names are for humans.
#CleanCode #CodeQuality #SoftwareDevelopment #NamingThings #DevExperience #RethinkCleanCode

Kommentieren und diskutieren können Sie direkt unter dem Beitrag auf LinkedIn.