TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Naming101Checked automatically with code checker

Synopsis:Treat acronyms as words
Language:Java
Severity Level:7
Category:Naming


Description:

Treat acronyms and abbreviations as words in naming variables, methods, and classes. The names are much more readable:

GoodBad
XmlHttpRequestXMLHTTPRequest
getCustomerIdgetCustomerID
class Htmlclass HTML
String urlString URL
long idlong ID

Both the JDK and the Android code bases are very inconsistent with regards to acronyms, therefore, it is virtually impossible to be consistent with the code around you. Bite the bullet, and treat acronyms as words.

For further justifications of this style rule, see Effective Java Item 38 and Java Puzzlers Number 68.



Literature References:
Google Android Guidelines