Objective
Learning to program is hard for beginners. They have to learn the rules of a language, such as its spelling and layout, and they also have to learn how to put code together into a working program. Many beginners struggle to break a problem into small steps.
The researchers built PyKinetic, an Android app that teaches the Python language to novices on a smartphone. It uses Parsons problems, which are puzzles where the lines of a program are shuffled and the learner drags them into the right order. Here the puzzles also had some lines with blanks that learners filled in by choosing from a menu. The team added self-explanation prompts: after a learner fills in a blank, the app asks a multiple-choice question about why the line works. Self-explaining means putting new material into your own words to understand it more deeply.
The study tested three ideas:
- The app would help students learn Python.
- The self-explanation prompts would add further learning benefits.
- Students with low prior knowledge would learn more from the puzzles than students with high prior knowledge.
Methods
This was a controlled experiment, a design that can show whether one version of a tool leads to different results than another when people are assigned by chance. The researchers recruited 70 volunteers from introductory programming courses: 47 at the University of Canterbury and 23 at the Ateneo de Manila University. They randomly assigned people to one of two groups. The experimental group used PyKinetic with self-explanation prompts. The control group used an identical version that only told them the line was correct after each filled-in line. Both universities' ethics committees approved the study.
Each group session lasted 1.5 to 2 hours, with between one and 13 people at a time. Participants took a 15-minute paper pre-test, used the app for about an hour on Android phones (their own or ones the researchers lent), then took a 15-minute paper post-test. The two tests were different but of similar difficulty. Each had eight questions: six about concepts (multiple-choice or true/false) and two about procedures (predict a program's output, and one puzzle). Partial credit was given for questions with several right answers, and marks were taken off for picking wrong options.
The app had 15 puzzles, the first two for practice, covering strings, conditional statements, while loops, for loops, lists and tuples. Puzzles got harder in a fixed order and had 3 to 16 lines, with up to 3 blanks. The self-explanation group saw 22 prompts, 14 about concepts and 8 about how code runs. Learners could not skip a prompt and had one attempt at each.
Seven participants were dropped because Wi-Fi problems left their logs incomplete, leaving 63. Because scores were not evenly distributed, the team used tests that do not assume a normal curve. They computed a normalized gain, which shows how much of the possible improvement a person achieved. They also reported Cohen's d, a measure of how big a difference is. For the third question, they labeled the top 25% on the pre-test as high prior knowledge and the bottom 25% as low prior knowledge.
Key Findings
Both groups scored higher after using the app, and the group with self-explanation prompts gained more, especially on concept questions and among beginners with the least prior knowledge.
Time and progress
- The experimental group spent 48 minutes on the app on average and the control group 42 minutes. That difference was not statistically significant.
- Per puzzle, the control group was faster: 3.22 minutes versus 4 minutes (p = .035), as expected since they had no extra questions.
- The experimental group finished 13.2 of 15 puzzles on average and the control group 14.4. Only 38 people finished all of them: 11 from the experimental group and 27 from the control group.
Did the app help learning?
- Both groups improved significantly from pre-test to post-test overall and on concept questions.
- Neither group improved significantly on the procedural questions alone.
- Both groups also improved on the harder-to-guess questions, which the researchers defined as those needing real knowledge rather than a lucky pick.
Did self-explanation add benefits?
- The experimental group had higher post-test marks, but the difference was not statistically significant, either overall or on concept questions.
- Normalized gains were significantly higher for the experimental group overall (p = .046) and on concept questions (p = .028). Gains on procedural questions were similar for both groups.
- The effect size for overall gains was 0.493, which the authors call moderate. For concept questions it was 0.556. For procedural questions it was slightly negative (-0.158), a weak effect favoring the control group.
- On easier-to-guess questions the effect was weak and positive (0.308). On harder-to-guess questions it was weak and negative (-0.263), so the extra benefit was not clear there.
Low versus high prior knowledge
- In the experimental group there were nine low and nine high prior knowledge students. In the control group there were seven of each.
- Among students who self-explained, those with low prior knowledge improved significantly overall and on concept, procedural and easier-to-guess questions. Those with high prior knowledge showed no significant improvement. The authors say a ceiling effect, meaning there was little room left to improve, may explain this.
- Low prior knowledge students who self-explained reached a post-test level similar to high prior knowledge students. Their effect size was 1.95, against .91 for low prior knowledge students in the control group.
- In the control group, high prior knowledge students still scored significantly higher than low prior knowledge students on the post-test.
The paper also reports that all participants stayed to the end, and some asked to keep the app.
Implications
For teachers of beginner programming. The authors suggest that code-ordering puzzles, with the layout already correct, are a gentle way for novices to practice. A sensible reading is that short phone-based practice could fit as a supplement to lectures, which is how the app was designed. Adding short multiple-choice "why does this line work" questions appears to help students understand concepts, though not necessarily how code runs.
For matching tools to learners. The authors argue that this puzzle style suits students with low prior knowledge. They point to a different study of their own, where debugging and output-prediction exercises worked better for stronger students. That suggests different exercise types for different levels, but this paper did not test it directly.
For app and course designers. The authors recommend menu-based prompts on small screens because no typing is needed. They also saw problems worth fixing:
- Some students misread questions phrased as "select all incorrect statements".
- Some filled in the blank before reading the rest of the puzzle, which made the prompt harder. A message telling learners to reorder the lines first might help.
- Self-explanation takes time. The prompt group was slower per puzzle and finished fewer puzzles, so planning enough class time matters.
What to be careful about. The study did not test whether the gains last, whether they carry over to writing real programs, or whether results hold in a full course. These results are a reason to try the approach, not proof that it will work everywhere.
Limitations
The authors name several weaknesses. The practice and test questions had more concept items than procedure items, so the results might differ with a different mix. The sessions were short. The sample was small, and the two subgroups of low and high prior knowledge students had only seven to nine people each, so the authors say they cannot be sure about those comparisons. Wi-Fi problems cost them data from seven participants. Taking part was voluntary, and everyone was told they would be compensated whatever their score, so motivation on the tests may have varied.
The paper does not mention, but readers should keep in mind, that there was no delayed test. So the study shows only short-term gains right after the session. The paper does not mention, but the two groups differed in how many puzzles they finished, and the groups differed in time on each puzzle, so the comparison is not perfectly even. The paper does not mention, but the post-test difference between groups was itself not significant, so the claim of added benefit rests mainly on the normalized gain measure. The paper does not mention, but the volunteers came from two universities and were not chosen to represent all learners, and the researchers built and studied their own app. Finally, the authors note an unexpected result: the self-explanation group did slightly worse on harder-to-guess questions by effect size, and there was no clear benefit for procedural questions.
Future Directions
The authors list several next steps:
- Do longer sessions and a delayed or transfer test show lasting gains and carry-over to new problems?
- Would more participants make the results firmer, especially for the low and high prior knowledge comparison?
- Do other types of self-explanation prompts work on mobile tutors?
- What happens to the balance of concept and procedural learning if the mix of questions changes?
- Can game features raise motivation?
- Which activities work best for learners of different abilities? The team plans to add more problems and other activity types, and to build an adaptive version of PyKinetic that picks problems for each learner.
The authors also plan to use only their own phones in future studies, so that data can be saved in two places and not lost to poor Wi-Fi.
The paper also leaves open whether Parsons puzzles themselves build concept knowledge more than procedural knowledge, since the data were not enough to say.
The bottom line: In a randomized trial with 63 beginner programming students at two universities, practicing Python by ordering lines of code on a phone went along with better test scores after about an hour. Adding menu-based self-explanation questions went along with larger gains, mainly on concept questions and mostly for students who knew the least at the start. The effect was moderate, the sample was small, there was no delayed test, and the app was studied by its own designers. Teachers could reasonably try short phone-based puzzles with explanation questions as practice for novices, while keeping expectations modest.
Comments 0
No comments yet. Be the first to share a thought.
Get new research summaries by email
Every new summary, daily at 8:00 AM Eastern (or weekly if you prefer). Unsubscribe in one click.