Skip to content

hongwei-wu/abbreviations-in-code

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

78 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Abbreviations in code

Giving good names to variables, functions, files etc. can be difficult. Long names are always clear, but take time to read, space and are hard to remember. Choosing a shorter form is better. If you use the abbreviations below, your naming will become more coherent, logical and understandable to other programmers (even newbies).

Guide

Colored circles before the abbr mean the degree of recommendation:

  • 🟒 Recommended
  • 🟑 Context-sensitive β€’ Context is specified between { }.
  • πŸ”΄ Not recommended

List

Numbers

  • πŸ”΄ 2 β€’ to

A

  • abbreviation β€’ 🟒 abbr
  • absolute β€’ 🟒 abs
  • addition β€’ 🟒 sum
  • address β€’ 🟒 addr
  • action β€’ πŸ”΄ act
  • active β€’ πŸ”΄ act
  • actual β€’ πŸ”΄ act
  • allocate β€’ 🟑 alloc { memory }
  • alternative β€’ 🟒 alt
  • alternate β€’ 🟒 alt
  • application β€’ 🟒 app
  • array β€’ 🟒 arr
  • argument β€’ 🟒 arg
  • asynchronous β€’ 🟒 async
  • attribute β€’ 🟒 attr
  • authentication β€’ auth
  • average β€’ 🟒 avg

B

  • background β€’ 🟒 bg
  • battery β€’ 🟑 bat { power }
  • binary β€’ 🟒 bin
  • boolean β€’ 🟒 bool
  • break β€’ πŸ”΄ brk
  • breakline β€’ 🟑 bl { encoding }
  • buffer β€’ 🟒 buf
  • button β€’ 🟒 btn

C

  • calculate β€’ 🟒 calc
  • calculator β€’ 🟒 calc
  • callback β€’ 🟒 cb
  • certificate β€’ 🟒 cert
  • certification β€’ 🟒 cert
  • channel β€’ 🟑 ch { connections }
  • character β€’ 🟒 char
  • check β€’ 🟒 chk
  • checksum β€’ 🟑 csum { operations }
  • circle β€’ 🟑 circ { shapes }
  • clear β€’ 🟒 clr
  • command β€’ 🟒 cmd
  • commercial β€’ πŸ”΄ com
  • common β€’ πŸ”΄ com
  • communication β€’ πŸ”΄ com
  • compare β€’ 🟑 cmp { conditional operators }
  • collection β€’ 🟒 coll
  • column β€’ 🟒 col
  • concatenate β€’ 🟒 concat
  • configuration β€’ 🟒 config β€’ πŸ”΄ conf
  • connection β€’ 🟒 conn { connections }
  • context β€’ 🟒 ctx
  • continue β€’ 🟒 cont
  • control β€’ 🟒 ctrl
  • conversation β€’ 🟒 conv
  • coordinate β€’ 🟒 coord
  • copy β€’ πŸ”΄ cpy
  • cosine β€’ 🟒 cos
  • cotangent β€’ 🟒 cot
  • counter β€’ 🟒 cnt
  • current β€’ 🟒 curr β€’ πŸ”΄ cur

D

  • databse β€’ 🟒 db
  • debug β€’ 🟒 dbg
  • decimal β€’ 🟒 dec
  • decrease β€’ 🟑 dec { loops }
  • default β€’ πŸ”΄ def
  • define β€’ 🟒 def
  • delete β€’ 🟒 del
  • delta time β€’ 🟑 dt { calculations }
  • descriptor β€’ 🟒 dsc
  • destination β€’ 🟒 dest
  • developer β€’ 🟒 dev
  • development β€’ 🟒 dev
  • device β€’ 🟑 dev { devices }
  • difference β€’ 🟑 diff { operations }
  • direction β€’ 🟒 dir
  • directory β€’ 🟒 dir
  • disable β€’ 🟒 dis
  • display β€’ 🟒 disp
  • document β€’ 🟒 doc
  • driver β€’ 🟒 drv
  • dynamic β€’ 🟒 dyn

E

  • enable β€’ 🟒 en
  • environment β€’ 🟒 env
  • equal β€’ 🟑 eq { binary operations }
  • error β€’ 🟒 err
  • etc β€’ 🟒 etc
  • event β€’ 🟒 e
  • executable β€’ 🟒 exe
  • expression β€’ 🟒 expr
  • extension β€’ 🟒 ext

F

  • factory β€’ 🟒 fac
  • file descriptor β€’ 🟒 fd
  • figure β€’ 🟒 fig
  • for example 🟒 e.g.
  • format β€’ 🟒 fmt
  • function β€’ 🟒 func β€’ πŸ”΄ f β€’ πŸ”΄ fn
  • function pointer β€’ 🟒 fp

G

  • generate β€’ 🟒 gen
  • greater or equal β€’ 🟑 ge { binary operations }
  • greater than β€’ 🟑 gt { binary operations }

H

  • hardware β€’ 🟑 hw { computer science }
  • header β€’ πŸ”΄ hdr
  • height β€’ 🟑 h { shapes }
  • hexadecimal β€’ 🟒 hex
  • horizontal β€’ 🟑 hor { shapes }

I

  • identifier β€’ 🟒 id
  • image β€’ 🟒 img
  • include β€’ 🟒 inc
  • increase β€’ 🟑 inc { loops }
  • index β€’ 🟒 idx
  • information β€’ info
  • initialize β€’ 🟒 init
  • initialization β€’ 🟒 init
  • input β€’ 🟒 in
  • insert β€’ 🟒 ins
  • integer β€’ 🟒 int
  • iterator β€’ 🟑 iter { loops }
  • interface β€’ 🟒 iface β€’ πŸ”΄ intf

J

  • javascript β€’ 🟒 js

K

L

  • language β€’ 🟒 lang
  • latitude β€’ 🟑 lat { only with coord }
  • length β€’ 🟒 len
  • less or equal β€’ 🟑 le { binary operators }
  • less than β€’ 🟑 lt { binary operators }
  • library β€’ 🟒 lib
  • linked list β€’ 🟒 ll
  • longitude β€’ 🟑 lon { only with coord }

M

  • manager β€’ 🟒 mng
  • maximum β€’ 🟒 max
  • memory β€’ 🟒 mem
  • message β€’ 🟒 msg
  • metadata β€’ 🟑 meta { data science }
  • microcontroller β€’ 🟒 mcu
  • middle β€’ 🟒 mid
  • minimum β€’ 🟒 min
  • miscellaneous β€’ 🟒 misc
  • modulo β€’ 🟒 mod
  • multiplier β€’ 🟒 mplr
  • mutable β€’ 🟑 mut { variables }

N

  • navigation β€’ 🟒 nav
  • network β€’ 🟒 net
  • newline β€’ 🟑 nl { endcoding }
  • no β€’ 🟑 n { only with yes }
  • node β€’ 🟑 $... { selector / DOM }
  • not equal β€’ 🟑 ne { binary operators }
  • number β€’ 🟒 num

O

  • object β€’ 🟒 obj
  • object key β€’ 🟑 key { only with val }
  • operation β€’ 🟑 op { binary operations }
  • optional β€’ 🟒 opt
  • option β€’ 🟒 opt
  • operating system β€’ 🟒 os
  • order β€’ 🟑 ord { data science }
  • output β€’ 🟒 out

P

  • parameter β€’ 🟒 param
  • performance β€’ 🟒 perf
  • picture β€’ 🟒 pic
  • pixel β€’ 🟒 px
  • pointer β€’ 🟒 ptr β€’ 🟑 p { memory }
  • position β€’ 🟒 pos
  • prediction β€’ 🟒 pred
  • preference β€’ 🟒 pref
  • previous β€’ 🟒 prev
  • process β€’ 🟑 proc { threads }
  • production β€’ 🟒 prod
  • profiler β€’ 🟒 prof
  • power β€’ 🟑 pwr { energy }

Q

  • query β€’ 🟒 q β€’ πŸ”΄ qry

R

  • radius β€’ 🟑 r { circles / shapes }
  • random β€’ 🟒 rand
  • range β€’ 🟒 rng
  • receive β€’ 🟒 recv
  • record β€’ 🟒 rec
  • rectangle β€’ 🟑 rect { shapes }
  • reference β€’ 🟒 ref
  • regular expression β€’ 🟒 regex β€’ πŸ”΄ rgx
  • remote β€’ 🟒 rem
  • repository β€’ 🟒 repo
  • required β€’ 🟒 req
  • requested β€’ 🟒 req
  • result β€’ 🟒 res
  • responde β€’ 🟒 res
  • return β€’ 🟒 ret
  • revision β€’ 🟒 rev

S

  • signed as prefix β€’ 🟑 s { modifiers }
  • semaphore β€’ 🟑 sem { conditional operators }
  • selection β€’ 🟒 sel
  • selected β€’ 🟒 sel
  • sine β€’ 🟒 sin
  • sequence β€’ 🟒 seq
  • square root β€’ 🟒 sqrt
  • source β€’ 🟒 src
  • software β€’ 🟑 sw { computer science }
  • statistic β€’ 🟒 stat
  • standard β€’ 🟒 std
  • standard input output β€’ 🟒 stdio
  • string β€’ 🟒 str
  • synchronous β€’ sync
  • synchronize β€’ 🟒 sync

T

  • temperature β€’ 🟒 tmp
  • temporary β€’ 🟒 temp
  • text β€’ πŸ”΄ txt
  • time β€’ 🟑 t
  • timer β€’ 🟒 tmr
  • timestamp β€’ 🟒 ts
  • to β€’ πŸ”΄ 2
  • toggle β€’ πŸ”΄ tgl
  • transaction β€’ 🟒 tx
  • type β€’ 🟑 t { modifiers }

U

  • user β€’ 🟑 u { URLs } β€’ πŸ”΄ usr

V

  • value β€’ 🟒 val β€’ 🟑 v { only with k }
  • vector β€’ 🟑 v { physics }
  • variable β€’ 🟒 var
  • version β€’ 🟒 v β€’ πŸ”΄ ver
  • vertical β€’ 🟒 ver

W

  • white space β€’ 🟑 ws { encoding }
  • width β€’ 🟑 w { shapes }
  • window β€’ 🟒 win

X

Y

  • yes β€’ 🟑 y { only with n }

Z

Symbols

Others



License


Go to index

About

List of common abbreviation in program codes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 100.0%