Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Follow publication

Code Smell 79 — TheResult

Maximiliano Contieri
Dev Genius
Published in
1 min readJun 14, 2021

Photo by Josue Michel on Unsplash

TL;DR: don’t prefix your variables.

Problems

  • Readability
  • Meaningless names

Solutions

1. Use intention revealing names.

2. Avoid *Indistinct noise words*.

Sample Code

Wrong

Right

Detection

As with many of our naming conventions, we can instruct our linters to forbid names like *theXxx…*.

Tags

  • Readability

Conclusion

Always use intention revealing names.

If your names collide use local names, extract your methods and avoid ‘the’ prefixes.

Relations

More info

One difference between a smart programmer and a professional programmer is that the professional understands that clarity is king. Professionals use their powers for good and write code that others can understand.

Robert C. Martin

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in Dev Genius

Coding, Tutorials, News, UX, UI and much more related to development

Written by Maximiliano Contieri

I’m a senior software engineer specialized in declarative designs. S.O.L.I.D. and agile methodologies fan. Maximilianocontieri.com

Write a response