Resumen:
Today, programming courses are essential at the university level because they allow
students to develop the skills to apply or create new computer technologies, in
addition to oral and written language, computing and mathematical skills. However,
according to various studies, students often have difficulties during the coding
process, one of the factors is the interpretation of compiler error messages, which
by not fully understanding them either due to the language and its structure, can
frustrate or discourage them. The difficulty in interpretation is because a specific
error can produce different compiler messages depending on the context of the
program code.
This problem has been addressed using different approaches, on the one
hand, those that propose repairing the code and on the other, those that make the
compiler error messages more understandable.
In this work, error-based learning is considered and instead of fixing errors in
the code, compiler error messages are used to provide feedback on syntax errors to
programming students. The feedback consists of four components: a translation of
the message into Spanish, syntax information about the language element, the
relationship of the error to possible causes, and the topic to be reviewed.
The information provided is intended to help students understand the error so
they can rewrite the code and compile it correctly. To achieve this goal, a supervised
learning predictive model was built whose function is to predict the syntax error
according to the compiler error message. The corpus or set of documents was
generated through a process of injecting errors into model programs, subsequently
labeled according to the type of syntax error. The machine learning algorithms used
were Decision Tree, Support Vector Machine, Random Forest, Multi-layer
Perceptron and K-Nearest Neighbors, trained with 80% of the corpus and evaluated with the remaining 20%, achieving an accuracy greater than 90% for make new predictions and subsequently give feedback.