Skip to content

Abbreviation and Hungarian (ARCH6011)

Key ruby.naming.no-hungarian-notation · Severity info · Category naming

Adding type prefixes such as strName, iCount, b_flag (Hungarian notation) and cryptic abbreviations adds noise. Ruby is dynamically typed, so these prefixes are meaningless and hurt readability.

strName = user.name
iCount = orders.size
b_active = account.active?
name = user.name
order_count = orders.size
active = account.active?

Drop the type prefix and cryptic abbreviation; rename the identifier to a clear, intent-revealing snake_case name.