We analyzed six months of data from Python Tutor (1 million code executions from 69 countries) to see if back-step use varies between countries and cultures. When we did this we found back-step use indeed varied between countries, and in particular, it varied with the self-directed learning of those countries.

In societies with self-directed learning, students are often encouraged to find their own ways of solving problems, and these students were more likely to use back-steps. In societies with instructor-directed learning, students often expect their teacher to tell them exactly how to solve the problem, and these students were more likely to go forward through the code execution without taking back-steps. In summary: Instructor-directed learners take fewer back-steps.

Graph showing the average number of back-steps per code execution for countries where we had the most data. We use Power-Distance Index² as an approximate measure of instructor vs. self-directed learning.

Next we created two debugging tasks and had people around the world work on those tasks and answer some questions about their personal values related to instructor vs. self-directed learning. We had 522 people from around the world try our debugging tasks.

We found (contrary to our expectations) that people who used more back-steps generally did worse in debugging. However, this didn’t work the same for all people. While people who used more back-steps generally did worse in debugging, people with instructor-directed values did particularly worse.

Graph of average debugging success vs. back-steps, with data for self-directed learners and instructor-directed learners shown separately. We also include 95% confidence intervals. In the graph self-directed learners debug a little better when they use more back-steps, and instructor-directed learners debug a little worse when they use more back-steps.

So, with those results, here are my main take-aways:

People in different cultures use back-steps differently. We saw that some of this can be explained with self-directed learning, more specifically self-directed learners take more back-steps. We also can see that some differences, like those between the UK and Australia, are not explained by differences self-directed learning.

Back-steps in debugging may not be helpful. We can’t tell from our experiment why more back-steps were generally correlated with worse debugging. It could be that using back-steps is actually detrimental. It could also be that people who are struggling use back-steps more as they flail around. We need more experiments to find out the true cause of these results.

The benefits of back-steps may vary with culture. We showed that instructor-directed learners did particularly bad when using many back-steps. We don’t know exactly what is going on here, but this result points to how the benefits and detriments of back-steps might vary with different groups of people.

To make programming tools that benefit everyone equally, designers need to consider culture. People around the world will make different uses of their tools. For example, creators of debuggers with back-steps (or other non-linear navigation) might want to vary how back-steps are emphasized, explained or displayed for different users, or they may want to find entirely different ways of presenting the information programmers need.

If we don’t consider culture, the people with the most influence may assume everyone acts like them and they may build tools that primarily benefit them. Most programmers don’t live in Silicon Valley, so let’s make sure we design our programming tools for people all around the world.