Android Naming Conventions for Readability | Generated by AI

Home 2026.01

I agree! Android’s naming conventions are excellent examples of clear, readable code. Here are the key principles they follow:

Why Whole Words Work Better

Good examples from Android:

The benefits:

The Sweet Spot: Short AND Clear

The best names are both concise and complete:

When Abbreviations Are Okay

Abbreviations work when they’re:

  1. Domain standard - html, json, api, url
  2. Universally known - max, min, avg
  3. Very common - num, str, err

When to Use Full Words

Always prefer full words for:

The guiding principle: optimize for reading, not writing. Code is read 10x more than it’s written.


Back

anthropic/claude-4.5-sonnet

Donate