Programming Allowing by Example: An Instructional Approach the Introductory Students to Quickly Grasp Power and Excitement of Programming Per-Gunnar Johansson Dept of Mathematics, Statistics and Computer Science V5xjij University, S-351 95 VaxjG, Sweden Telephone: +46-470 7086 30 Per-Gunnar. Johansson @ masda.hv.se 1. INTRODUCTION The approach used has been to have students study complete programming examples instead of having them use traditional textbook materials. The example programs used describe different language usage s proceeding from simple I/O and variable assignment operations to more difficult ones involving the declaration and use of compositedata types and the utilisation of subprograms. This researchhas continued into the Spring of 1998 in the Computer Sciencefor TeachersEducation Programme.The programming portion of this course of study consumed approximately one fifth of the total time, taking place over five weeks and consuming one quarter of the student s time during that period. Another part of the course included the art of making algorithms. the students had the use of the departmental computing facilities with an instructor available to answerquestionsfor four of thosehours. 4. THE RESULT Severalquestionnaireswere administeredto the participants during the instruction. These included questions about the student s: l basic understanding of various statementtypes l personal appraisal of his/her knowledge of thesesame statementtypes l private opinion as to the quality of the lectures and the appropriatenessof the assignedproblem The results of the questionnairesbecameone basis for each succeedinglecture. The results of the study showed that introductory program knowledge, on the part of students studying by examples only, was at least the same as the level of knowledge achieved by studentsusing the traditional approach.At the same time, a significant portion of the students taught by examples commented was to the ease of learning programming, an experience not duplicated with students learning by the more traditional method. 2. THE PURPOSE The purpose of the study was to see to what extent it was possible to learn basic programming only by studying code examplesand then proceed directly into actually producing working codes. The purpose of this investigation has not been to advocate the elimination of traditional textbooks, only to come to an understanding as to the possibility of doing so at the introductory level of programming instructions. 5. CONCLUSIONS The important conclusions from this researchare: (i) Teaching introductory programming by example alone works and allows the student to write more quickly working programs.This results in a much earlier appreciation of the true power and excitement of programming. (ii) However, the deeperknowledge essentialto have a sure grasp of programming can only be achieved by studying programming theory and methods in traditional texts, in combination with continuous practice. 3. THE STUDY The particular course involved had three lectures of 90 minutes each in programming. At the beginning of each lecture the students got a folder with approximately 20 pages of examples in Ada. This code was heavily commented.During the lecture the students were led stepby-step through each example, with a great deal of time available for questions. At the end of each lecture folder sevenproblems were assignedwherein the studentshad to write programs by themselves.Five of the problems were similar to the examples in the folder. The other problems required original thinking. Additionally, after eachlecture
/lp/association-for-computing-machinery/programming-by-example-poster-an-instructional-approach-allowing-yujyvTGPtT