How do Scratch Programmers Name Variables and Procedures?

Conference Paper (2017)
Author(s)

A.A.S. Swidan (TU Delft - Software Engineering)

Alexander Serebrenik (Eindhoven University of Technology)

Felienne Hermans (TU Delft - Software Engineering)

Research Group
Software Engineering
Copyright
© 2017 A.A.S. Swidan, Alexander Serebrenik, F.F.J. Hermans
DOI related publication
https://doi.org/10.1109/SCAM.2017.12
More Info
expand_more
Publication Year
2017
Language
English
Copyright
© 2017 A.A.S. Swidan, Alexander Serebrenik, F.F.J. Hermans
Research Group
Software Engineering
Volume number
2017-October
Pages (from-to)
51-60
ISBN (electronic)
9781538632383
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Research shows the importance of selecting good names to identifiers in software code: more meaningful names improve readability. In particular, several guidelines encourage long and descriptive variable names. A recent study analyzed the use of variable names in five programming languages, focusing on single-letter variable names, because of the apparent contradiction between their frequent use and the fact that these variables violate the aforementioned guidelines.,In this paper, we analyze variables in Scratch, a popular block-based language aimed at children. We start by replicating the above single-letter study for Scratch. We augment this study by analyzing single-letter procedure names, and by investigating the use of Scratch specific naming patterns: spaces in variable names, numerics as variables and textual labels in procedure names.,The results of our analysis show that Scratch programmers often prefer longer identifier names than developers in other languages, while Scratch procedure names have even longer names than Scratch variables. For the single-letter variables, the most frequent names are x, y, and i. Single-letter procedures are less popular, but show more tendency to be in upper case. When compared to the other programming languages, the usage of single uppercase letters in Scratch variables seems to be similar to the pattern found in Perl, while for the lowercase letters - to the pattern found in Java. Concerning Scratch specific features, 44% of the unique variable names and 34% of the projects in the dataset include at least one space. The usage of textual labels between parameters in procedure names appears as not common, however textual patterns used imply an influence from textual languages, for example by using brackets.,Previous research indicate the identifier names as one significant issue in transitioning from visual block-based to textual programming languages. The naming patterns we found support this claim for Scratch programmers who may incur difficulties when transitioning to the use of mainstream textual programming languages. Those languages restrict the use of spaces in identifiers and more often divert into short and single-letter names - tendencies opposite to the naming preferences in Scratch.

Files

SCAM_camera_ready.pdf
(pdf | 0.662 Mb)
License info not available