Abbreviation Rules

Type and method names are usually not abbreviated (except for the well-accepted abbreviations such as EOFImplFifo, etc.). 

Abbreviation applies to local variables, method parameters, class fields and in some cases public static fileds (constants) of the class.

Variable name should be abbreviated using table below containing mapping between longer name and its short form.

RULE 1 
The variable name should be as short as possible yet to be descriptive enough in a given context.

RULE 2 
The descriptiveness of the variable name should be proportional to its significance in a given context.

IntelliJ Idea Plugin

There is a simple custom plugin available that performs on-the-fly check of variable names and highlights incorrectly named variables.

Plugin can be downloaded from wiki: ignite-abbrev-plugin-3.0.1.jar

Source code of plugin can be found at GitHub ignite-abbrev-plugin

Installation

To install plugin to idea you can do the following steps:

1. Go to 'Settings', and to 'Plugins' section.

2. Select 'Install Plugin From Disk' and select jar from local file system.

'Apache Ignite abbreviation plugin' should appear. After Idea restart abbreviations will be highlited by editor.

Variable Abbreviation

Note that in some cases it is allowable to abbreviate a word to its first letter (like, for a example, when there is a naming conflict, on in a loop variables, or in a catch clause). Note also that class on instance fields should almost never be abbreviated to one letter and should use instead the common abbreviations below.

In some rare cases one-letter names can be augmented by number like in common nested catch clause example: e, e1, e2.

Widely used names in the project including specific domain area terms are summarised in the table below. It is required to use abbreviated form for code consistency.

Name

Abbreviation

addressaddr
affinityaff
argumentarg
arrayarr
attribute(s)attr(s)
bufferbuf
classcls
commandcmd
configcfg
contextctx
countcnt
currentcur
databasedb
defaultdflt
destinationdest
directorydir
eventevt
exceptione, e2, ex
executeexec
frequencyfreq
futurefut
groupgrp
handlerhnd
headerhdr
implementationimpl
indexidx
initial(ize)init
iteratoriter
labellbl
localloc
loggerlog
loaderldr
managermgr
messagemsg
mutexmux
networknet
objectobj
packagepkg
parameterparam
passwordpwd
policyplc
property(ies)prop(s)
process, processorproc
queryqry
receivercv
referenceref
regular expressionregex
repositoryrepo
requestreq
resourcersrc
responseres
return valueretVal
sendersnd
servicesrvc
sessionses
sequenceseq
socketsock
sourcesrc
strings, str
subjectsubj
systemsys
topologytop
topology versiontopVer
valueval
versionver
  • No labels