PyLearn: A Python Interpreter for Beginners

Matthew Charles Adams, Michael David Domingues, Rhys William Lindmark, Michael Jacob Reardon, Tung Nguyen Viet Phan, Alexander Willis Voorhees, Rhys Williams

Research output: Contribution to journalArticlepeer-review

Abstract

Error messages are incredibly useful tools. Despite their frequent association with frustration, they provide intermediate and expert programmers with instantaneous feedback on their code. To those already indoctrinated in good debugging practices, an error message can provide them with the information they need to identify and rectify any errors in their code. Novice users, by contrast, have a rather different error message experience. What may seem familiar to an expert user is unfamiliar to a novice. Error messages and verbose stack traces can be obscure or obtuse, and lead beginning programmers in the wrong direction. Additionally, in certain specific edge cases, Python error messages correctly identify that an error has occurred, but provide the user with the wrong error type and wrong line of code. For novices, this only makes matters worse. With these challenges in mind, we set out to create something better than the status quo. PyLearn is a system designed for novice programmers, to facilitate the debugging process by providing clear, comprehensible, and more specific error messages. PyLearn is used from the command line just as you would use a standard Python interpreter, and can operate as both a standard file-based interpreter and an interactive interpreter. Through our custom error-classifying decision tree, we can often provide end users with a clearer, more specific message than stock Python. Additionally, we correctly handle all cases in which standard Python fails to properly classify an error, and go beyond Python's efforts to reinforce good coding practices from the get go. In the event that we are unable to classify an error better than standard Python, PyLearn gracefully degrades to the standard error message.

Original languageAmerican English
JournalIntegrated Comprehensive Exercises (Comps)
StatePublished - Jan 1 2013

Keywords

  • Programming
  • Debugging
  • Computer Science Education
  • Python
  • Error Messages

Cite this