Good Read’s — Variable Name & Code Style Guidelines

Anoop M Madasseri
Tech Log
Published in
1 min readMay 5, 2020

“If you struggle to read the code, how the hell are you meant to fix it !!” ????

Having a well named variable is definitely one of the most important thing for code readability. A good variable name should also provide meaning. That way it’s easy for others to read your code or even yourself in the future. You should be descriptive with your naming. Say, for instance, if you give a meaningful name to a method, you could probably save at least a line in the comment section in most scenarios.

Avoid these bad variable names:

  • ❌ Single-letter names
  • ❌ Acronyms
  • ❌ Abbreviations
  • ❌ Meaningless names

Good Read’s ( Variable Name & Code Style Guidelines ) -

“Tips on naming boolean variables — Cleaner Code” -https://dev.to/michi/tips-on-naming-boolean-variables-cleaner-code-35ig

“AOSP Java Code Style for Contributors” — https://source.android.com/setup/contribute/code-style

“Google Java Style Guide” — https://google.github.io/styleguide/javaguide.html

“Android Project and Code Guidelines” — https://github.com/ribot/android-guidelines/blob/master/project_and_code_guidelines.md

“XML naming convention” — https://jeroenmols.com/blog/2016/03/07/resourcenaming

“5 Tips to Increase your Code Quality” — https://simpleprogrammer.com/5-tips-code-quality

“Code readability metrics” — https://dev.to/stereobooster/code-readbility-metrics-5393

“Why Code Readability is important” — https://crmbusiness.wordpress.com/2014/12/08/why-code-readability-is-important/

#DEVcommunity #AndroidDev #JavaDev #KotlinDev #NamingConventions #CodingStyle #ReadabilityMatters #TheBuddySystem

--

--