On Compiler Error Messages: What They Say and What They Mean

Programmers often encounter cryptic compiler error messages that are difficult to understand and thus difficult to resolve. Unfortunately, most related disciplines, including compiler technology, have not paidmuch attention to this important aspect that affects programmers significantly, apparently because it is felt that programmers should adapt to compilers. In this article, however, this problem is studied from the perspective of the discipline of human-computer interaction to gain insight into why compiler errors messages make the work of programmers more difficult, and how this situation can be alleviated. Additionally, because poorly designed error messages affect novice programmers more adversely, the problems faced by computer science students while learning to program are analyzed, and the obstacles originated by compilers are identified. Examples of actual compiler error messages are provided and carefully commented. Finally, some possible measures that can be taken are outlined, and some principles for compiler error message design are included.

[1]  José J. Cañas,et al.  Are visual programming languages better? The role of imagery in program comprehension , 2001, Int. J. Hum. Comput. Stud..

[2]  P. G. Moulton,et al.  DITRAN—a compiler emphasizing diagnostics , 1967, CACM.

[3]  Jun Yang Explaining Type Errors by Finding the Source of a Type Conflict , 1999, Scottish Functional Programming Workshop.

[4]  Randy F. Pausch,et al.  Teaching objects-first in introductory computer science , 2003, SIGCSE.

[5]  Ian Sommerville,et al.  Software engineering (6th ed.) , 2001 .

[6]  van der Veer,et al.  The user interface - concepts and design , 1995 .

[7]  Gerald M. Weinberg,et al.  Psychology of computer programming , 1971 .

[8]  Gail E. Kaiser,et al.  Retina: helping students and instructors based on observed programming activities , 2009, SIGCSE '09.

[9]  Albert N. Badre,et al.  Why Can't Smart Students Solve Simple Programming Problems? , 1993, Int. J. Man Mach. Stud..

[10]  William M. McKeeman Programming Language Design , 1976, Compiler Construction.

[11]  Scott R. Klemmer,et al.  What would other programmers do: suggesting solutions to error messages , 2010, CHI.

[12]  Tom Schorsch,et al.  CAP: an automated self-assessment tool to check Pascal programs for syntax, logic and style errors , 1995 .

[13]  Thomas K. Landauer,et al.  The trouble with computers , 1995 .

[14]  Gary Lewandowski,et al.  Debugging: the good, the bad, and the quirky -- a qualitative analysis of novices' strategies , 2008, SIGCSE '08.

[15]  G. A. Miller THE PSYCHOLOGICAL REVIEW THE MAGICAL NUMBER SEVEN, PLUS OR MINUS TWO: SOME LIMITS ON OUR CAPACITY FOR PROCESSING INFORMATION 1 , 1956 .

[16]  Eliezer Kantorowitz,et al.  Automatic generation of useful syntax error messages , 1986, Softw. Pract. Exp..

[17]  S. Greenberg,et al.  The Psychology of Everyday Things , 2012 .

[18]  Rosalind W. Picard Affective Computing , 1997 .

[19]  Ruven E. Brooks Towards a theory of the cognitive processes in computer programming , 1999, Int. J. Hum. Comput. Stud..

[20]  José J. Cañas,et al.  Mental models and computer programming , 1994, Int. J. Hum. Comput. Stud..

[21]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[22]  Keith D. Cooper,et al.  Engineering a Compiler , 2003 .

[23]  Anthony Savidis,et al.  Rapidly implementing languages to compile as C++ without crafting a compiler , 2007, Softw. Pract. Exp..

[24]  Michael Kölling,et al.  Blue—a language for teaching object-oriented programming , 1996, SIGCSE '96.

[25]  Brad A. Myers,et al.  Using HCI techniques to design a more usable programming system , 2002, Proceedings IEEE 2002 Symposia on Human Centric Computing Languages and Environments.

[26]  Clinton L. Jeffery,et al.  Generating LR syntax error messages from examples , 2003, TOPL.

[27]  Henri E. Bal,et al.  Modern Compiler Design , 2000, Springer New York.

[28]  Ivar Jacobson,et al.  The unified modeling language reference manual , 2010 .

[29]  Clifford Nass,et al.  The media equation - how people treat computers, television, and new media like real people and places , 1996 .

[30]  Jean Scholtz,et al.  Using Unfamiliar Programming Languages: The Effects on Expertise , 1993, Interact. Comput..

[31]  Rebecca T. Mercuri,et al.  Identifying and correcting Java programming errors for introductory computer science students , 2003, SIGCSE.

[32]  Bertrand Meyer,et al.  Compiler error messages: what can help novices? , 2008, SIGCSE '08.

[33]  Jurriaan Hage,et al.  Improving type error messages for generic Java , 2011, High. Order Symb. Comput..

[34]  J. Jackson,et al.  Identifying Top Java Errors for Novice Programmers , 2005, Proceedings Frontiers in Education 35th Annual Conference.

[35]  Lon Barfield The User Interface: Concepts and Design , 2004 .

[36]  Thomas R. Flowers,et al.  Empowering students and building confidence in novice programmers through Gauntlet , 2004, 34th Annual Frontiers in Education, 2004. FIE 2004..

[37]  Andrei Alexandrescu,et al.  Better template error messages , 1999 .

[38]  Elliot Soloway,et al.  Preprogramming Knowledge: A Major Source of Misconceptions in Novice Programmers , 1985, Hum. Comput. Interact..

[39]  Peter J. Brown,et al.  Error messages: the neglected area of the man/machine interface , 1983, CACM.

[40]  Matthew Flatt,et al.  ProfessorJ: a gradual introduction to Java through language levels , 2003, OOPSLA '03.

[41]  Dan Grossman,et al.  Searching for type-error messages , 2007, PLDI '07.

[42]  Thomas Reps,et al.  Programming Techniques and Data Structures , 1981 .

[43]  Brad A. Myers,et al.  Studying the language and structure in non-programmers' solutions to programming problems , 2001, Int. J. Hum. Comput. Stud..

[44]  Watts S. Humphrey,et al.  Introduction to the Personal Software Process , 1996 .

[45]  James Rumbaugh,et al.  OMT Insights: Perspectives on Modeling from the Journal of Object-Oriented Programming , 1996 .

[46]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[47]  Ben Shneiderman,et al.  Designing the user interface (2nd ed.): strategies for effective human-computer interaction , 1992 .

[48]  Donald O. Case,et al.  The Trouble with Computers: Usefulness, Usability, and Productivity, by Thomas K. Landauer , 1996, J. Am. Soc. Inf. Sci..

[49]  Boris Beizer Software is Different , 1998 .

[50]  John R. Anderson,et al.  Novice LISP Errors: Undetected Losses of Information from Working Memory , 1985, Hum. Comput. Interact..

[51]  Sue Fitzgerald,et al.  Debugging: finding, fixing and flailing, a multi-institutional study of novice debuggers , 2008, Comput. Sci. Educ..

[52]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach (McGraw-Hill Series in Computer Science) , 2004 .

[53]  Chris Burrell,et al.  Augmenting compiler error reporting in the Karel++Microworld , 2007 .

[54]  Natalie J. Coull,et al.  SNOOPIE : development of a learning support tool for novice programmers within a conceptual framework , 2008 .

[55]  David Carrington,et al.  PSPSM in the Large Class , 2001 .

[56]  Alireza Ebrahimi,et al.  Novice programmer errors: language constructs and plan composition , 1994, Int. J. Hum. Comput. Stud..

[57]  Michael Kölling,et al.  The BlueJ System and its Pedagogy , 2003, Comput. Sci. Educ..

[58]  James J. Horning,et al.  What the Compiler Should Tell the User , 1976, Compiler Construction.

[59]  Mickey Williams Microsoft Visual C , 2002 .

[60]  David Carrington,et al.  PSP in the large class , 2001 .

[61]  Bertrand Meyer,et al.  EMPIRICAL STUDY OF NOVICE ERRORS AND ERROR PATHS IN OBJECT-ORIENTED PROGRAMMING , 2006 .

[62]  Kent L. Beck,et al.  Extreme programming explained - embrace change , 1990 .

[63]  Ceriel J. H. Jacobs,et al.  Parsing Techniques - A Practical Guide , 2007, Monographs in Computer Science.

[64]  Ben Shneiderman,et al.  Designing computer system messages , 1982, CACM.

[65]  Richard M. Stallman,et al.  Using the GNU Compiler Collection , 2010 .

[66]  B. Schneirdeman,et al.  Designing the User Interface: Strategies for Effective Human-Computer Interaction , 1998 .

[67]  Gordon B. Davis,et al.  A study of errors, error-proneness, and error diagnosis in Cobol , 1976, CACM.

[68]  Matthew C. Jadud,et al.  Methods and tools for exploring novice compilation behaviour , 2006, ICER '06.