Learning syntax and programming languages

Most introductory educational programming courses and textbooks focus on teaching the features of a specific language and how to use them. The volume of features in many languages requires such focus and acquiring such knowledge plays a large part of program development. Both individual laboratory-based programming tasks and collaborative work should be used in introductory courses. Problem solving should be at the heart of teaching programming. It is suggested that language features only be introduced as they become applicable to specific problems. However, problem solving in and of itself, it is not enough.

One of the biggest problems in some introductory programming courses in that the content is largely language specific. Students are presented with textbook problems and solutions and to a small extent are charged with the task of translating solutions into source code. This teaching technique bypasses the important process of comprehending, analyzing, strategizing solutions for real world problems.

M.C. Linn describes a chain of cognitive accomplishments by students in learning programming. The first link consists of acquiring language skills. Problem solving should be the vehicle used in learning language features. Learning features and learning problem solving should not be thought of as two distinct tasks. In earlier days, BASIC programming language was used in introductory courses, but since has changed to more challenging languages. This may be in part that educators recognized that syntax and semantic skills alone are not adequate in preparing for real world programming and that these skills do not translate well across languages for novice programmers.

A second link consists of design skills. The designing aspect of programming involves using computer language features to solve problems. There are two skill sets students use in program design: templates and procedural. Templates consist of code patterns that of a single language feature that can be drawn upon for reuse by students. “If programmers develop a repertoire of effective templates, then they are likely to program more effectively and to identify and reuse algorithms for problem solutions rather than reinvent them. Students can often employ templates they could not invent themselves. By using these templates they can ‘stand on the shoulders of giants’ and solve more interesting and complex problems than would be possible if they had to invent all their own templates. Even if they do not fully understand a template at first, the experience of using a well designed one will help students comprehend the technique in the template and the role of templates in general” (Linn, 1985). As students apply templates from existing repertoire, they advance beyond simply translating pseudo code to syntax, and become better equipped to solve programming problems. Procedural skills consist of planning, testing, and reformulation based on test results. This is accomplished by combining templates and language features.

This entry was posted in Uncategorized. Bookmark the permalink.