Teaching program development
David Gries · Journal of computing sciences in colleges · 2005
Few introductory programming texts--and therefore few introductory programming courses-- teach the DEVELOPMENT of programs (or algorithms). Instead, they just present completed algorithms, one after the other, with little attention paid to how they were developed. This results in programmers who simply hack, who have no conscious idea about how they develop programs and why.It doesn't have to be that way. Instead, one can teach the rudiments of a theory of program correctness and then show how the ideas can be used in a PRACTICAL way in developing programs. Programming becomes a science --a department of practical work in which the work gets done by conscious application of principles-- as opposed to an art, where the work requires merely knowledge of traditional rules and expertise acquired by habit.Even in the first programming course, teaching the development of loops as shown above can result in increased efficiency and effectiveness in students' programming. Further, many algorithms (e.g. searching and sorting) become memorable --not because one memorizes code but because one can develop them at will.