Abbreviating words can slow development and add uncertainty.  This is because vowels and correct spelling improve comprehension.  So it is good practice to leave full words in the code where possible and be consistent with your usage.

Abbreviation can be tempting when the word is very long but usually truncation of the word works better than abbreviation.  Remember that your personal idea of how an abbreviation should work will rarely match someone else's , so it is better not to abbreviate at all.

However there are some widely used abbreviations for long words that have become acceptable.  You should restrict yourself to a small set like this one:

Long Word

Abbreviation

administration

admin

application

app

authentication

auth

average

avg (matches min/max/avg)

buffer

buf

configuration

config

database

db

implementation

impl

information

info

iterator

i

Index

index,i,j,k (not lower case L because it looks like a 1)

input

in

maximum

max (matches min/max/avg)

message

msg

milliseconds

msecs or millis

minimum

min (matches min/max/avg)

output

out

parameter

param or parm

reference

ref

statistics

stats

temporary

temp

transaction

txn

utilities

utils

Abbreviations that never caught on:

Abbreviation

Why

buff

Why not “buf” or buffer?

trnsxn

Why a removal and replacement of some letters but not others?

stat

Is it Statistics or State or Status?

mg

Is it Microgram or Milligram?  This confusion has killed when used for prescriptions.

ass

Assistants would rather be called Assistants.

gnrtdNxtItmTtl

To save just eight vowels, readability is  compromised.

fromDate2Date

Uses unprofessional “leet-speak” to substitute a word with a number.  Don't use leet-speak at all in professional work.

Summary: Use full words rather than abbreviate.  Be consistent.  Follow only the common set of abbreviations, don't make up your own.

blog comments powered by Disqus