Although there are many systems designed to engage people in programming, few explicitly teach the subject, expecting learners to acquire the necessary skills on their own as they create programs from scratch. We present a principled approach to teach programming using a debugging game called Gidget, which was created using a unique set of seven design principles. A total of 44 teens played it via a lab study and two summer camps. Principle by principle, the results revealed strengths, problems, and open questions for the seven principles. Taken together, the results were very encouraging: learners were able to program with conditionals, loops, and other programming concepts after using the game for just 5 hours.
Many novice programmers view programming tools as all-knowing, infallible authorities about what is right and wrong about code. This misconception is particularly detrimental to beginners, who may view the cold, terse, and often judgmental errors from compilers as a sign of personal failure. It is possible, however, that attributing this failure to the computer, rather than the learner, may improve learners' motivation to program. To test this hypothesis, we present Gidget, a game where the eponymous robot protagonist is cast as a fallible character that blames itself for not being able to correctly write code to complete its missions. Players learn programming by working with Gidget to debug its problematic code. In a two-condition controlled experiment, we manipulated Gidget's level of personification in: communication style, sound effects, and image. We tested our game with 116 self-described novice programmers recruited on Amazon's Mechanical Turk and found that, when given the option to quit at any time, those in the experimental condition (with a personable Gidget) completed significantly more levels in a similar amount of time. Participants in the control and experimental groups played the game for an average time of 39.4 minutes (SD=34.3) and 50.1 minutes (SD=42.6) respectively. These finding suggest that how programming tool feedback is portrayed to learners can have a significant impact on motivation to program and learning success.
Computer programming is now used broadly across many industries, with a diversity of working adults writing programs and interacting with code as part of their jobs. However, negative attitudes toward programming continue to deter many from studying computer science and pursuing careers in technology. To begin understanding adults' attitudes toward computer programming and how we can improve them, we used an educational video game to give 200 adult participants a concrete programming experience via the web, and then collected their self-reported opinions about programming. We found that adults initially had poor attitudes toward programming, believing that it was difficult, boring, and something they generally could not learn. After the online learning experience, their attitudes improved significantly, regardless of gender, population density, or level of education. These results demonstrate that adult attitudes toward programming, while initially negative, can be quickly changed with a brief, positive exposure to programming.
People are increasingly turning to online resources to learn to code. However, despite their prevalence, it is still unclear how successful these resources are at teaching CS1 programming concepts. Using a pretest-posttest study design, we measured the performance of 60 novices before and after they used one of the following, randomly assigned learning activities: 1) complete a Python course on a website called Codecademy, 2) play through and finish a debugging game called Gidget, or 3) use Gidget's puzzle designer to write programs from scratch. The pre- and post-test exams consisted of 24 multiple choice questions that were selected and validated based on data from 1,494 crowdsourced respondents. All 60 of our novices across the three conditions did poorly on the exams overall in both the pre-tests and post-tests (e.g., the best median post-test score was 50% correct). However, those completing the Codecademy course and those playing through the Gidget game showed over a 100% increase in correct answers when comparing their post-test exam scores to their pre-test exam scores. Those playing Gidget, however, achieved these same learning gains in half the time. This was in contrast to novices that used the puzzle designer, who did not show any measurable learning gains. All participants performed similarly within their own conditions, regardless of gender, age, or education. These findings suggest that discretionary online educational technologies can successfully teach novices introductory programming concepts (to a degree) within a few hours when explicitly guided by a curriculum.
Engagement is a necessary condition for learning, and previous studies have shown that engagement can be significantly affected by changing the presentation of game elements within an educational game. In a three condition controlled experiment, we examined how changing the presentation of the data elements referred to in a game's goals would influence the purposefulness of the goals and thereby affect players' motivation to achieve them. A total of 121 self-described programming novices were recruited online to play the game. We found that 1) those using vertebrate elements completed twice the number of levels compared to those using inanimate elements, 2) those using vertebrate and invertebrate elements spent significantly more time playing the game overall compared to those using inanimate elements, and 3) those using inanimate elements were more likely to quit the game, especially on difficult levels. These findings suggest that the presentation of game elements that influence the purposefulness of goals can play a significant role in keeping self-guided learners engaged in learning tasks.