ABSTRACT
Debugging compiler errors is essential to programming and can be challenging for novice programmers. In introductory computer science courses, challenging errors can discourage students. One reason these errors are difficult to resolve is that most online help systems do not match a student's code. For example, online reference pages use different variable names, identifiers, and method names compared with a student's particular code. To utilize existing resources, students must wade through other people's code (which is often too advanced for novices to comprehend). This is time-consuming and does not provide novices with solutions.
To address this problem, we developed MatchingRef -a reference system that helps novices resolve compiler errors. It is a web-based reference guide that catalogs common Processing/Java compiler errors. MatchingRef integrates with the Processing programming environment to provide users with explanations and that match users' particular code. It includes a list of strategies to fix each error, accompanied by one or more concrete examples. Importantly, the key feature that distinguishes MatchingRef from prior reference systems (e.g., Decaf [1], HelpMeOut [4], CodeWrite [2]) is that MatchingRef examples are all dynamically generated using variable, method, and class names from users' programming environments.
There are four guiding design principles behind MatchingRef. First is readability, which is listed as a criterion that good error messages should exhibit [5]. The description from Java documentation is usually technical and causes confusion for novice programmers. Hence, we provide explanations that are less cryptic and more familiar in wording. Second is learning by examples. Examples have been shown to be effective way to learn and fix programming errors, such as in online forum like Stack Overflow [7]. Therefore, we include examples in each suggestion so that users can have a concrete idea on how to fix the problems. Third is familiarity, a common design principle across domains [3]. MatchingRef matches elements in the fixing examples with the original code of the users. Finally, our system is intended to reduce cognitive load by customizing the pages to users' code to show the relevant information. According to Cognitive Load Theory (CLT), humans have a finite ability to efficiently process input [6]. As MatchingRef provide users with matching error messages and matching names, their brain only needs to process useful information such as ways to fix the errors or roots of the errors. Users can avoid reading some information in the page multiple times such as variable names or class names because they are already familiar with them.
We conducted a within-subjects pilot study (n = 4) to evaluate whether MatchingRef improved novices' performance and comprehension while debugging compiler errors. Participants interacted with two designs of our system, one with matching variable names in the examples and one without this feature. Otherwise, the systems were identical. The participants were students in introductory computer science courses that use Processing. Due to the small sample size, we could not detect significant differences in task completion time. Although the conclusions we can draw are limited, we are encouraged to evaluate MatchingRef in a more formal study.
- Brett A. Becker. 2016. An Effective Approach to Enhancing Compiler Error Messages. In Computing Science Education (SIGCSE). ACM, 126--131. https://doi. org/10.1145/2839509.2844584Google Scholar
- Paul Denny, Andrew Luxton-Reilly, and Dave Carpenter. 2014. Enhancing Syntax Error Messages Appears Ineffectual. In Innovation and Technology in Computer Science Education (ITiCSE). ACM, 273--278. https://doi.org/10.1145/2591708.2591748Google ScholarDigital Library
- Alan Dix, Janet E. Finlay, Gregory D. Abowd, and Russell Beale. 2003. Human Computer Interaction (3rd Edition). Prentice-Hall, Inc., USA.Google Scholar
- Björn Hartmann, Daniel MacDougall, Joel Brandt, and Scott R. Klemmer. 2010. What Would Other Programmers Do: Suggesting Solutions to Error Messages. In Human Factors in Computing Systems (CHI). ACM, 1019--1028. https://doi.org/10. 1145/1753326.1753478Google Scholar
- James J. Horning. 1976. What the Compiler Should Tell the User. In Compiler Construction, An Advanced Course, 2nd Ed. Springer-Verlag, 525--548.Google Scholar
- John Sweller. 1988. Cognitive load during problem solving: Effects on learning. Cognitive Science 12, 2 (1988), 257--285. https://doi.org/10.1016/0364-0213(88) 90023-7Google ScholarCross Ref
- Emillie Thiselton and Christoph Treude. 2019. Enhancing Python Compiler Error Messages via Stack Overflow. In Empirical Software Engineering and Measurement (ESEM). 1--12Google Scholar
Index Terms
- MatchingRef: Matching Variable Names in a Reference Page to Help Introductory CS Students Fix Compiler Errors
Recommendations
Applying Software Engineering Anti-patterns to Programming Error Messages
SIGCSE 2023: Proceedings of the 54th ACM Technical Symposium on Computer Science Education V. 2Programming error messages (PEMs) have long been a hindrance to novice programmers. This work aims to establish a catalog of PEM anti-patterns--- common, reoccurring features of PEMs that make them unhelpful or actively harmful to programmers. The goal ...
What makes a programming error message good?
UKICER '22: Proceedings of the 2022 Conference on United Kingdom & Ireland Computing Education ResearchProgramming error messages (PEMs) often prove to be troublesome for novice programmers. Guidelines to improve PEMs often lack theoretical or empirical justification. This research will establish a theoretical foundation for what makes a “good” PEM, ...
Language Choice in Introductory Programming Courses at Australasian and UK Universities
SIGCSE '18: Proceedings of the 49th ACM Technical Symposium on Computer Science EducationParallel surveys of introductory programming courses were conducted in Australasia and the UK, with a view to examining the programming languages being used, the preferred integrated development environments (if any), and the reasons for these choices, ...
Comments