Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Using eye tracking to study variable naming conventions and their effect on code readability
KTH, School of Electrical Engineering and Computer Science (EECS).
KTH, School of Electrical Engineering and Computer Science (EECS).
2019 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
En studie av variabelnamngivningskonventioners åverkan på läslighet av kod med hjälp av ögonspårning (Swedish)
Abstract [en]

Using camel case when naming variables is largely considered to be best practise when writing code these days. But is it really the best variable naming convention when it comes to code readability and understanding? And how does different variable naming conventions affect the readability of code? This thesis researches these questions using eye tracking technology. Test subjects are timed as they look at and explain code snippets using different variable naming conventions while their gaze is plotted onto a heatmap. The variable naming conventions tested were single letters, single words, multiple words in camel case and multiple words in snake case. From the results shown, the conclusion is drawn that no significant difference in readability can be confirmed between the different variable naming conventions.

Abstract [sv]

Att använda camel case när man namnger variabler i kod anses i stort sett vara god praxis. Men är det verkligen det bästa sättet att namnge variabler när det kommer till läslighet och förståelse av kod? Och hur påverkar olika variabelnamns-notationer läsligheten av kod? Denna avhandling undersöker dessa frågor med hjälp av ögonspårningsteknologi. Tid togs medan testpersoner tittade på och försökte förklara små kodexempel med olika sorters variabelnamn samtidigt som deras blick översattes till ett färgdiagram. De olika sätten att skriva variabelnamn som testades var en bokstav, ett ord, flera ord i camel case och flera ord i snake case. Från resultatet som visas dras slutsat- sen att ingen betydande skillnad på läsbarheten av koden kunde hittas när det kommer till användandet av olika variabelnamngivningskonventioner.

Place, publisher, year, edition, pages
2019.
Series
TRITA-EECS-EX ; 2019:323
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-255048OAI: oai:DiVA.org:kth-255048DiVA, id: diva2:1337810
Subject / course
Computer and Systems Sciences
Supervisors
Examiners
Available from: 2019-07-29 Created: 2019-07-17 Last updated: 2019-07-29Bibliographically approved

Open Access in DiVA

fulltext(8569 kB)13 downloads
File information
File name FULLTEXT01.pdfFile size 8569 kBChecksum SHA-512
81076f231d8a3f8e5670cedf28f1c89e61033c84f37e59b109e441c0a02ca36395778cbf1faf5334391ae702bd15b18f78b2304b027a1872e7daf42fba268f78
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 13 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 76 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf