The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,224 other followers

Naming: avoid abbreviations and acronyms in identifiers

Posted by jpluimers on 2020/10/07

I see lots of code using abbreviations. Please avoid those, just like many development stacks urge you to do so.

Two important reasons:

  1. avoid confusion
  2. make it easier to read code (you read code far more often than you write code)

This is not limited to the software development field; for similar reasons, the medical field also limits the use of abbreviations and acronyms:

Naming is already hard as it is, so do not make it any harder.

Have you ever named a pet or child? Naming in software development is even harder.

Maybe the tough job if naming is why so many people use a name like Util or Utils (which is already an abbreviation of Utility / Utilities) or Tool / Tools, but should be named like JunkDrawer.

Read more on that in [WayBackbetsythemuffin on Twitter: “Underrated programming techniques: name something (a step definitions file, a class, a directory, whatever….) “junk drawer.” Not “util” or something else that kind-of means “junk drawer” but pretends to dignity. Be bold. Admit what you’re doing. Do it with joy.”

 

References:

Many of these via:

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: