How Developers Choose Names

The names of variables and functions serve as implicit documentation and are instrumental for program comprehension. But choosing good meaningful names is hard. We perform a sequence of experiments in which a total of 334 subjects are required to choose names in given programming scenarios. The firs...

Full description

Saved in:
Bibliographic Details
Published inIEEE transactions on software engineering Vol. 48; no. 1; pp. 37 - 52
Main Authors Feitelson, Dror G., Mizrahi, Ayelet, Noy, Nofar, Shabat, Aviad Ben, Eliyahu, Or, Sheffer, Roy
Format Journal Article
LanguageEnglish
Published New York IEEE 01.01.2022
IEEE Computer Society
Subjects
Online AccessGet full text
ISSN0098-5589
1939-3520
DOI10.1109/TSE.2020.2976920

Cover

Abstract The names of variables and functions serve as implicit documentation and are instrumental for program comprehension. But choosing good meaningful names is hard. We perform a sequence of experiments in which a total of 334 subjects are required to choose names in given programming scenarios. The first experiment shows that the probability that two developers would select the same name is low: in the 47 instances in our experiments the median probability was only 6.9 percent. At the same time, given that a specific name is chosen, it is usually understood by the majority of developers. Analysis of the names given in the experiment suggests a model where naming is a (not necessarily cognizant or serial) three-step process: (1) selecting the concepts to include in the name, (2) choosing the words to represent each concept, and (3) constructing a name using these words. A followup experiment, using the same experimental setup, then checked whether using this model explicitly can improve the quality of names. The results were that names selected by subjects using the model were judged by two independent judges to be superior to names chosen in the original experiment by a ratio of two-to-one. Using the model appears to encourage the use of more concepts and longer names.
AbstractList The names of variables and functions serve as implicit documentation and are instrumental for program comprehension. But choosing good meaningful names is hard. We perform a sequence of experiments in which a total of 334 subjects are required to choose names in given programming scenarios. The first experiment shows that the probability that two developers would select the same name is low: in the 47 instances in our experiments the median probability was only 6.9 percent. At the same time, given that a specific name is chosen, it is usually understood by the majority of developers. Analysis of the names given in the experiment suggests a model where naming is a (not necessarily cognizant or serial) three-step process: (1) selecting the concepts to include in the name, (2) choosing the words to represent each concept, and (3) constructing a name using these words. A followup experiment, using the same experimental setup, then checked whether using this model explicitly can improve the quality of names. The results were that names selected by subjects using the model were judged by two independent judges to be superior to names chosen in the original experiment by a ratio of two-to-one. Using the model appears to encourage the use of more concepts and longer names.
Author Mizrahi, Ayelet
Sheffer, Roy
Shabat, Aviad Ben
Noy, Nofar
Eliyahu, Or
Feitelson, Dror G.
Author_xml – sequence: 1
  givenname: Dror G.
  orcidid: 0000-0002-2733-7709
  surname: Feitelson
  fullname: Feitelson, Dror G.
  email: feit@cs.huji.ac.il
  organization: Department of Computer Science, The Hebrew University of Jerusalem, Jerusalem, Israel
– sequence: 2
  givenname: Ayelet
  orcidid: 0000-0003-4037-1028
  surname: Mizrahi
  fullname: Mizrahi, Ayelet
  email: ayelet.mizrahi@mail.huji.ac.il
  organization: Department of Computer Science, The Hebrew University of Jerusalem, Jerusalem, Israel
– sequence: 3
  givenname: Nofar
  orcidid: 0000-0001-5095-5778
  surname: Noy
  fullname: Noy, Nofar
  email: nofar.noy@mail.huji.ac.il
  organization: Department of Computer Science, The Hebrew University of Jerusalem, Jerusalem, Israel
– sequence: 4
  givenname: Aviad Ben
  orcidid: 0000-0002-6000-4535
  surname: Shabat
  fullname: Shabat, Aviad Ben
  email: aviad.benshabat@mail.huji.ac.il
  organization: Department of Computer Science, The Hebrew University of Jerusalem, Jerusalem, Israel
– sequence: 5
  givenname: Or
  orcidid: 0000-0003-2352-2074
  surname: Eliyahu
  fullname: Eliyahu, Or
  email: or.eliyahu@mail.huji.ac.il
  organization: Department of Computer Science, The Hebrew University of Jerusalem, Jerusalem, Israel
– sequence: 6
  givenname: Roy
  orcidid: 0000-0002-8726-7562
  surname: Sheffer
  fullname: Sheffer, Roy
  email: roysheffer7@gmail.com
  organization: Department of Computer Science, The Hebrew University of Jerusalem, Jerusalem, Israel
BookMark eNp9kMFOAjEQQBuDiYDeTbiQeF6cabfbnaNBFBOiB_HclG0bl8AW20Xj37sE4sGDp7m8N5N5A9ZrQuMYu0aYIALdLl9nEw4cJpxUQRzOWB9JUCYkhx7rA1CZSVnSBRuktAYAqZTss9E8fI3v3afbhJ2LaTx9DyG58bPZunTJzr3ZJHd1mkP29jBbTufZ4uXxaXq3yCpO2GalUlZ4kiIHCeSx4JAb4-2KnFG5QQ7KWrTWG0Fgq8J4s1KWm7Ko0OIqF0N2c9y7i-Fj71Kr12Efm-6k5gVS95SS0FHFkapiSCk6r6u6NW0dmjaaeqMR9CGE7kLoQwh9CtGJ8EfcxXpr4vd_yuio1M65X5wAS-QofgB13Wim
CODEN IESEDJ
CitedBy_id crossref_primary_10_1080_13658816_2021_1983579
crossref_primary_10_1145_3660782
crossref_primary_10_1007_s10515_025_00500_0
crossref_primary_10_1007_s10664_022_10160_3
crossref_primary_10_1145_3676959
crossref_primary_10_1145_3702980
crossref_primary_10_1007_s12652_022_03722_2
Cites_doi 10.1145/3196321.3196332
10.1016/s0020-7373(83)80031-5
10.1145/2424563.2424570
10.1145/32206.32212
10.1109/WPC.2003.1199195
10.1145/2568225.2568252
10.1007/s10664-013-9261-0
10.1109/TSE.2015.2442238
10.1109/WPC.2005.14
10.1007/s10664-014-9350-8
10.1109/CSMR.2010.27
10.1109/SANER.2017.7884623
10.1109/ICSM.2013.30
10.1109/ICSM.2000.883022
10.1007/s10664-017-9523-3
10.1145/2902362
10.1109/SCAM.2017.12
10.1109/ICPC.2017.27
10.1016/j.scico.2009.02.006
10.1145/2723872.2723875
10.1109/ICPC.2006.51
10.1007/s10664-019-09751-4
10.1007/s11219-006-9216-4
10.1145/2786805.2786849
10.1145/1810295.1810335
10.1109/ICPC.2017.18
10.1145/1985441.1985471
10.1145/3106237.3106268
10.1145/2601248.2601251
10.1109/ICSE.2019.00019
10.1109/MS.2016.44
10.1145/2775051.2677009
ContentType Journal Article
Copyright Copyright IEEE Computer Society 2022
Copyright_xml – notice: Copyright IEEE Computer Society 2022
DBID 97E
RIA
RIE
AAYXX
CITATION
JQ2
K9.
DOI 10.1109/TSE.2020.2976920
DatabaseName IEEE Xplore (IEEE)
IEEE All-Society Periodicals Package (ASPP) 1998–Present
IEEE Electronic Library (IEL)
CrossRef
ProQuest Computer Science Collection
ProQuest Health & Medical Complete (Alumni)
DatabaseTitle CrossRef
ProQuest Health & Medical Complete (Alumni)
ProQuest Computer Science Collection
DatabaseTitleList
ProQuest Health & Medical Complete (Alumni)
Database_xml – sequence: 1
  dbid: RIE
  name: IEEE Electronic Library (IEL)
  url: https://proxy.k.utb.cz/login?url=https://ieeexplore.ieee.org/
  sourceTypes: Publisher
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISSN 1939-3520
EndPage 52
ExternalDocumentID 10_1109_TSE_2020_2976920
9018121
Genre orig-research
GrantInformation_xml – fundername: Israel Science Foundation
  grantid: 407/13; 832/18
  funderid: 10.13039/501100003977
GroupedDBID --Z
-DZ
-~X
.DC
0R~
29I
4.4
5GY
6IK
85S
8R4
8R5
97E
AAJGR
AARMG
AASAJ
AAWTH
ABAZT
ABPPZ
ABQJQ
ABVLG
ACGFO
ACGOD
ACIWK
ACNCT
AENEX
AGQYO
AHBIQ
AKJIK
AKQYR
ALMA_UNASSIGNED_HOLDINGS
ASUFR
ATWAV
BEFXN
BFFAM
BGNUA
BKEBE
BKOMP
BPEOZ
CS3
DU5
EBS
EDO
EJD
HZ~
I-F
IEDLZ
IFIPE
IPLJI
JAVBF
LAI
M43
MS~
O9-
OCL
P2P
Q2X
RIA
RIE
RNS
RXW
S10
TAE
TN5
TWZ
UHB
UPT
WH7
YZZ
AAYXX
CITATION
ALIPV
JQ2
K9.
ID FETCH-LOGICAL-c291t-877d3f95340509f16204aafdb9ea74a1207dd1ddfa390dc6afab7d2a86c1d1b43
IEDL.DBID RIE
ISSN 0098-5589
IngestDate Mon Jun 30 08:53:51 EDT 2025
Wed Oct 01 02:36:04 EDT 2025
Thu Apr 24 23:09:10 EDT 2025
Wed Aug 27 03:01:24 EDT 2025
IsPeerReviewed true
IsScholarly true
Issue 1
Language English
License https://ieeexplore.ieee.org/Xplorehelp/downloads/license-information/IEEE.html
https://doi.org/10.15223/policy-029
https://doi.org/10.15223/policy-037
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-c291t-877d3f95340509f16204aafdb9ea74a1207dd1ddfa390dc6afab7d2a86c1d1b43
Notes ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ORCID 0000-0002-6000-4535
0000-0001-5095-5778
0000-0002-8726-7562
0000-0002-2733-7709
0000-0003-4037-1028
0000-0003-2352-2074
PQID 2619020750
PQPubID 21418
PageCount 16
ParticipantIDs crossref_citationtrail_10_1109_TSE_2020_2976920
crossref_primary_10_1109_TSE_2020_2976920
proquest_journals_2619020750
ieee_primary_9018121
ProviderPackageCode CITATION
AAYXX
PublicationCentury 2000
PublicationDate 2022-Jan.-1
2022-1-1
20220101
PublicationDateYYYYMMDD 2022-01-01
PublicationDate_xml – month: 01
  year: 2022
  text: 2022-Jan.-1
  day: 01
PublicationDecade 2020
PublicationPlace New York
PublicationPlace_xml – name: New York
PublicationTitle IEEE transactions on software engineering
PublicationTitleAbbrev TSE
PublicationYear 2022
Publisher IEEE
IEEE Computer Society
Publisher_xml – name: IEEE
– name: IEEE Computer Society
References ref13
ref35
ref12
ref34
ref15
ref37
ref14
ref36
ref31
Takang (ref41) 1996; 4
Gellenbeck (ref17) 1991
ref30
ref11
ref33
ref10
ref32
ref1
ref39
ref16
ref38
ref19
ref18
Liblit (ref26)
McConnell (ref29) 2004
Alon (ref2) 2019
Martin (ref28) 2009
ref24
ref20
ref22
ref21
Jones (ref23) 2009
Levenshtein (ref25) 1966; 10
ref27
ref7
ref9
ref4
ref3
ref6
ref5
ref40
Blinman (ref8)
References_xml – ident: ref36
  doi: 10.1145/3196321.3196332
– ident: ref9
  doi: 10.1016/s0020-7373(83)80031-5
– volume-title: Clean Code: A Handbook of Agile Software Craftmanship
  year: 2009
  ident: ref28
– ident: ref30
  doi: 10.1145/2424563.2424570
– ident: ref16
  doi: 10.1145/32206.32212
– ident: ref32
  doi: 10.1109/WPC.2003.1199195
– ident: ref37
  doi: 10.1145/2568225.2568252
– ident: ref19
  doi: 10.1007/s10664-013-9261-0
– ident: ref33
  doi: 10.1109/TSE.2015.2442238
– year: 2019
  ident: ref2
  article-title: Code2seq: Generating sequences from structured representations of code
  publication-title: Proc. 7th Int. Conf. Learn. Representations
– ident: ref12
  doi: 10.1109/WPC.2005.14
– volume: 10
  start-page: 707
  issue: 8
  year: 1966
  ident: ref25
  article-title: Binary codes capable of correcting deletions, insertions, and reversals
  publication-title: Soviet Phys. – Doklady
– year: 2009
  ident: ref23
  article-title: The new C standard: An economic and cultural commentary
– ident: ref3
  doi: 10.1007/s10664-014-9350-8
– ident: ref10
  doi: 10.1109/CSMR.2010.27
– ident: ref21
  doi: 10.1109/SANER.2017.7884623
– ident: ref35
  doi: 10.1109/ICSM.2013.30
– ident: ref11
  doi: 10.1109/ICSM.2000.883022
– start-page: 53
  volume-title: Proc. 18th Psychol. Program. Workshop
  ident: ref26
  article-title: Cognitive perspectives on the role of naming in computer programs
– ident: ref14
  doi: 10.1007/s10664-017-9523-3
– ident: ref20
  doi: 10.1145/2902362
– ident: ref40
  doi: 10.1109/SCAM.2017.12
– ident: ref4
  doi: 10.1109/ICPC.2017.27
– ident: ref7
  doi: 10.1016/j.scico.2009.02.006
– ident: ref15
  doi: 10.1145/2723872.2723875
– ident: ref24
  doi: 10.1109/ICPC.2006.51
– ident: ref13
  doi: 10.1007/s10664-019-09751-4
– ident: ref39
  doi: 10.1007/s11219-006-9216-4
– ident: ref1
  doi: 10.1145/2786805.2786849
– start-page: 73
  volume-title: Proc. 6th Australas. User Interface Conf.
  ident: ref8
  article-title: Program comprehension: Investigating the effects of naming style and documentation
– volume: 4
  start-page: 143
  year: 1996
  ident: ref41
  article-title: The effects of comments and identifier names on program comprehensibility: An experimental investigation
  publication-title: J. Program. Lang.
– ident: ref18
  doi: 10.1145/1810295.1810335
– ident: ref5
  doi: 10.1109/ICPC.2017.18
– ident: ref6
  doi: 10.1145/1985441.1985471
– start-page: 65
  volume-title: Empirical Studies of Programmers: Fourth Workshop
  year: 1991
  ident: ref17
  article-title: An investigation of procedure and variable names as beacons during program comprehension
– ident: ref38
  doi: 10.1145/3106237.3106268
– volume-title: Code Complete
  year: 2004
  ident: ref29
– ident: ref34
  doi: 10.1145/2601248.2601251
– ident: ref27
  doi: 10.1109/ICSE.2019.00019
– ident: ref22
  doi: 10.1109/MS.2016.44
– ident: ref31
  doi: 10.1145/2775051.2677009
SSID ssj0005775
ssib053395008
Score 2.4917052
Snippet The names of variables and functions serve as implicit documentation and are instrumental for program comprehension. But choosing good meaningful names is...
SourceID proquest
crossref
ieee
SourceType Aggregation Database
Enrichment Source
Index Database
Publisher
StartPage 37
SubjectTerms code comprehension
Documentation
Experiments
Names
Natural languages
Programming profession
Unified modeling language
variable naming
Title How Developers Choose Names
URI https://ieeexplore.ieee.org/document/9018121
https://www.proquest.com/docview/2619020750
Volume 48
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
journalDatabaseRights – providerCode: PRVIEE
  databaseName: IEEE Electronic Library (IEL)
  customDbUrl:
  eissn: 1939-3520
  dateEnd: 99991231
  omitProxy: false
  ssIdentifier: ssj0005775
  issn: 0098-5589
  databaseCode: RIE
  dateStart: 19750101
  isFulltext: true
  titleUrlDefault: https://ieeexplore.ieee.org/
  providerName: IEEE
link http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwjV3PS8MwFH7Mnbw4dYpzU3rwItiuSX-kOcrYGMJ2cYPdSn4VQVnFdQz8603SdIqKeOshD8LXJO99yXvfA7gRQnuhSAlfslQTFCVDP2Mx9hETcYqEdhJWTGc2T6fL-GGVrFpwt6-FUUrZ5DMVmE_7li9LsTVXZUNq1aU01zkghNa1Wp_pHIQkjT5mkmS0eZIM6XDxONZEEIcB1r6Xms7eX1yQ7any4yC23mXSgVkzrzqp5DnYVjwQ798kG_878WM4cmGmd1-vixNoqfUpdJoWDp7b0V3oT8ud5xKHdCDojZ7KcqO8ucmdPYPlZLwYTX3XL8EXmKJKH2xERgVNotiIuhTISM0zVkhOFSMxQzgkUiIpCxbRUIqUFYwTiVmWCiQRj6NzaK_LtboATxOJkAmUCZoWccQwIwlPuI5lIok54awHwwbCXDgxcdPT4iW3pCKkuQY9N6DnDvQe3O4tXmshjT_Gdg2G-3EOvh4Mmr-Uu522yQ0D1KY68Ln83aoPh9iULNhrkwG0q7etutKBRMWv7Qr6AMUPwfw
linkProvider IEEE
linkToHtml http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwjV3PS8MwFH6MedCLU6c4N7UHL4LtmvRHmqOMSdVtFzfYreRXEZRV3IbgX2-StlNUxFsPeRC-JnnvS977HsCFENoLBUq4ksWaoCjpuwkLsYuYCGMktJOwYjrjSZzOwrt5NG_A1aYWRillk8-UZz7tW74sxNpclfWpVZfSXGcr0qyClNVanwkdhES1QmYUJbR-lPRpf_ow1FQQ-x7W3pea3t5fnJDtqvLjKLb-5aYF43pmZVrJk7decU-8fxNt_O_U92C3CjSd63Jl7ENDLQ6gVTdxcKo93YZuWrw5VeqQDgWdwWNRLJUzMdmzhzC7GU4HqVt1THAFpmiljzYig5xGQWhkXXJkxOYZyyWnipGQIewTKZGUOQuoL0XMcsaJxCyJBZKIh8ERNBfFQh2Do6mEzwRKBI3zMGCYkYhHXEczgcSccNaBfg1hJio5cdPV4jmztMKnmQY9M6BnFegduNxYvJRSGn-MbRsMN-Mq-DrQq_9SVu21ZWY4oDbVoc_J71bnsJ1Ox6NsdDu578IONgUM9hKlB83V61qd6rBixc_savoAKBzFTQ
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=How+Developers+Choose+Names&rft.jtitle=IEEE+transactions+on+software+engineering&rft.au=Feitelson%2C+Dror+G&rft.au=Mizrahi%2C+Ayelet&rft.au=Noy%2C+Nofar&rft.au=Aviad+Ben+Shabat&rft.date=2022-01-01&rft.pub=IEEE+Computer+Society&rft.issn=0098-5589&rft.eissn=1939-3520&rft.volume=48&rft.issue=1&rft.spage=37&rft_id=info:doi/10.1109%2FTSE.2020.2976920&rft.externalDBID=NO_FULL_TEXT
thumbnail_l http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=0098-5589&client=summon
thumbnail_m http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=0098-5589&client=summon
thumbnail_s http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=0098-5589&client=summon