Naming Things
$9.50
Minimum price
$10.99
Suggested price

Naming Things

The Hardest Problem in Software Engineering

About the Book

Naming is one of the most difficult and enduring challenges in software engineering, but few of us do it well. This practical and comprehensive book provides a set of principles, rules, and application guidelines for efficiently choosing good names in your code.

These skills can be used throughout your career, and they’re useful for every programming language, technical domain, and experience level. The book incorporates real-world examples to illustrate how to choose good names and avoid bad names.

This book includes:

  • Rules for how to choose good names and avoid bad names
  • Principles to help you remember the general qualities of good names
  • Real-world examples
  • Guidelines on the application of these rules and principles, including balancing tradeoffs, renaming best practices, and choosing domain-specific names
  • Tips on how to develop your naming skills throughout your career

Printed copies of this book are available on Amazon.

  • Share this book

  • Categories

    • Software Engineering
    • Computers and Programming
    • Software Architecture
    • Refactoring
    • Computer Science
  • Feedback

    Email the Author(s)

About the Author

Tom Benner
Tom Benner

Tom has over 15 years of software engineering industry experience in startups and public companies, including roles as engineering manager, software architect, technical lead, and CTO. He has professional experience across a variety of technical domains, including software engineering, product engineering, data engineering, ML engineering, and infrastructure engineering. In his free time, he has created two successful SaaS businesses, mentored software engineering students, spoken at technology meetups, and built several popular open source projects.

Table of Contents

  1. Acknowledgements
  2. I. Introduction
    1. 1. Purpose of this book
    2. 2. Why is naming important?
      1. 2.1. Understandable code
      2. 2.2. Productivity and happiness
      3. 2.3. Career growth
    3. 3. Why is naming hard?
      1. 3.1. Dynamic, subjective requirements
      2. 3.2. Insufficient best practices and tooling
      3. 3.3. Short-term costs and long-term value
      4. 3.4. How can we make naming easier?
    4. 4. Scope of this book
  3. II. Principles
    1. 5. Overview
      1. 5.1. List of principles
    2. 6. Understandability
      1. 6.1. Overview
      2. 6.2. Rules
    3. 7. Conciseness
      1. 7.1. Overview
      2. 7.2. Rules
    4. 8. Consistency
      1. 8.1. Overview
      2. 8.2. Rules
    5. 9. Distinguishability
      1. 9.1. Overview
      2. 9.2. Rules
  4. III. Application
    1. 10. Overview
    2. 11. Tradeoffs
      1. 11.1. Overview
      2. 11.2. Consistency vs. other principles
      3. 11.3. Understandability vs. Conciseness
      4. 11.4. Understandability vs. Distinguishability
      5. 11.5. Conciseness vs. Distinguishability
    3. 12. Identifier types
      1. 12.1. Overview
      2. 12.2. Classes
      3. 12.3. Variables
      4. 12.4. Methods
      5. 12.5. Method arguments
      6. 12.6. Interfaces
      7. 12.7. Constants
      8. 12.8. Packages/modules/namespaces
    4. 13. Style guides
    5. 14. Controlled vocabularies
      1. 14.1. Evolution of controlled vocabularies
      2. 14.2. Further reading
    6. 15. Renaming
      1. 15.1. Scope
      2. 15.2. Principal and interest
      3. 15.3. Process
    7. 16. Domain-specific names
      1. 16.1. Consult domain-related resources
      2. 16.2. Consult domain experts
      3. 16.3. Consult team members
    8. 17. Developing naming skills
      1. 17.1. Improving your naming skills
      2. 17.2. Improving your team’s naming skills
  5. IV. Appendix
    1. 18. Common antonyms
    2. 19. Visually similar characters
    3. 20. Rejected principles
      1. 20.1. Length
      2. 20.2. Searchability
      3. 20.3. Pronounceability
      4. 20.4. Meaningfulness
      5. 20.5. Austerity
      6. 20.6. Accuracy
      7. 20.7. Precision
      8. 20.8. Concision
  6. References

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub