Table of Links
Abstract and I. Introduction
II. Background and Related Work
A. Learning to Program: SCRATCH and Pair Programming
B. Gender in Programming Education and Pair Programming
III. Course Design
A. Introducing Young Learners to Pair Programming
B. Implementation of Pair Programming
C. Course Schedule
IV. Method
A. Pre-Study and B. Data Collection
C. Dataset and D. Data Analysis
E. Threats to Validity
V. Results
A. RQ1: Attitude
B. RQ2: Behavior
C. RQ3: Code
VI. Conclusions and Future Work, Acknowledgments, and References
C. RQ3: Code
To evaluate the impact of the different pairs on the students’ programs, we consider the interface events, code metrics, quality, and creativity of the programs.
1) Interaction and Events: While creating code, the all-male pairs interacted more with the SCRATCH interface than the all-female pairs (Figure 6). In particular, the all-male pairs moved blocks around significantly more often than all-female pairs (p = 0.041). Similarly, boys changed the parameters of an existing block more than the girls (p = 0.060), for instance to change the number of steps of a sprite (Figure 6). Dragging a new block out of the toolbox is also done more often by the all-male pairs, but not with such a distinct difference (p = 0.093). Comparatively few blocks were deleted or pulled out of range, yet, the boys removed blocks significantly more frequently (p = 0.019, p = 0.015) (Figure 6). Overall, boys seem to like to modify their programs. However, this difference is only noticeable for code; both same-sex pairs similarly added new costumes to their sprites (p = 0.309).
Besides the modifications, we also note that all-male pairs execute stack clicks (double-clicking blocks or scripts leading to their execution) significantly more often than the all-female pairs (p = 0.008). Clicking the green flag to start the entire program (p = 0.092) is also more often done by the all-male pairs, suggesting that they run their programs more frequently.
The high number of stack clicks and changes suggests that the all-male pairs seem to be more adventurous, as one probably clicks on scripts to try out things (“what happens if we do this”) or fixing their programs as they might be more prone to introduce code smells (Table V) due to their experimentations.
In a sense SCRATCH is built to foster this [19], [57], however, in our PP setting this seems to be less appealing to girls, which might be either due to their preference to stick to instructions, or an aversion to experimenting. We also saw this kind of gender-dependent behavior in RQ2 (Section V-B6), where we observed that boys needed the least and girls the most help in the first creative task (task 5).
2) Use of Block Types: The pairs used a similar number of blocks in total (p = 0.505), although the distribution among the different block types differs (Figure 7). Due to the mechanics of the game, control and event blocks are the most common, as they can be used to implement game-typical interactive elements. This design was explicitly chosen because prior work showed that girls, when given the freedom to do as they like, tend to implement stories that mostly use only sequences, and thus apply less programming knowledge [44], [48]. Regarding the use of control and event blocks, there are few differences between both same-sex pairs in the final project (p = 0.526, p = 0.310), with slightly more control blocks in the male ones. Sound blocks were similarly rarely used by all pairs.
However, we observe slight differences in the remaining categories: One notable difference is the upper limit of motion blocks in the all-female pairs, whereas the variance is higher in the all-male pairs. This is in-line with previous research reporting that girls use fewer motion blocks than boys, and prefer looks blocks instead [44], [48]. Although the project category of game [23] reduces this effect, it is nevertheless evident in the analyzed projects.
3) Code Quality: Table V shows the most prominent code smells and perfumes of the final projects. Code perfumes [51] describe recurring code patterns demonstrating the correct application of programming concepts. The code perfume conditional inside loop (i.e., a loop construct containing an ifcondition) is the most prominent of all pairs per project. This advanced code structure is introduced in the third task (Section III-C3), and although this is not reflected in the code perfumes, we observed that during their own application in task four (Section III-C4) especially the girls needed a lot of help to implement exactly this construct. Noteworthy, the girls coded backdrop changes by implementing switch
backdrop to with event handler when backdrop switches to, which the boys did not implement at all (p = 0.227). Allfemale pairs also implemented initialisation of looks more frequently (p = 0.077), i.e., look blocks being present in when green flag clicked, which suggests that they were trying to solve a subtask of the defining a start state problem [51]. This solution strategy and the pattern initialization of postions that occurs in both same-sex pairs (p = 0.698) are particularly relevant for computational thinking skills [58]. Interestingly, all-male pairs implemented boolean expressions twice as often as all-female pairs, although the difference is not statistically significant (p = 0.077, Table V). Since all students had to use operators at least once in task four (Section III-C4), this suggests that the boys used more operators in the free tasks.
Regarding code smells, missing initialization is the most common bad code snippet in both pair constellations Table V, but it appears significantly more often in the all-male pairs than in the all-female pairs (p = 0.007), which is in-line with prior research on gender-differences in programs created by individuals [44]. In-line with our observation on boys being more adventurous, this smell occurs when code is created that modifies different properties of sprites without properly initializing them. We also note that boys tend to not name their sprites and just retain their default names (e.g., Sprite1) (sprite naming, p = 0.093), which is also known by prior research on individuals’ programs [16], [44].
4) Code Complexity: Regarding the code complexity of the final programs, we determine a rather similarly distributed complexity among the all-female and all-male pairs (p = 0.390), with the boys having slightly more programs with stronger complexity (Figure 8). This is likely due to the increased number of interactions they implemented in the game, which can also be observed in the control blocks (Figure 7). However, it is notable that the most complex project was implemented by a female pair (ICC = 62, Figure 8), in which not only scores are awarded, but which also introduces different levels, represented by several variables and stage changes. However, even when excluding this outlier there are
no significant differences (p = 0.240). Overall, the projects are comparatively complex for an introductory programming project, which we explicitly encouraged through the course design (e.g., game rather than story) in order to improve the girls’ adaptation to programming concepts [44], [53], [59].
5) Creativity: SCRATCH enables young students to express their creativity while programming, which supports learning and motivational success [57]. We consider the choice of sprites as an indicator of creativity, as this enables students to adapt their programming to their own ideas [53]. Figure 9 summarizes the sprite preferences for the implementation of the pong game as word clouds. In particular, the sprite ball (ff: 8.33 %, mm: 21.62 %) followed by the paddle (ff: 25.0 %, mm: 29.72 %) were implemented less by the all-female pairs than the all-male pairs, whereas the girls used the line more often (ff: 62.5 %, mm: 56.75 %).
Figure 9b shows the boys’ preference for the sprite ball as well as other ball sports such as basketball and baseball, which have gender-stereotypical male associations. In contrast, the donut and magic wand are most popular among females (Figure 9a). In addition, broom seems to be a popular character, which in combination with magic wand suggests magical worlds. However, besides gender stereotypical sprites like rainbow or unicorn, we also encounter neutral sprites like puppy, monkey or beachball. Furthermore, trampoline and bread are common to both pair constellations–these figures are well suited as an alternative for the paddle due to their shape (Figure 9). Thus, neither our neutral course design nor the PP protocol inhibited either type of same-sex pairs from incorporating their own creative preferences. Those partly universally, but mostly socially learned gender-stereotypical preferences are in line with prior research [16], [44], [53].