Kill two birds with one stone: Teach procedural query languages
Authors: Elliot Soloway
Venue: Proceedings of the ACM '82 conference (1982)

What type of query language should casual users be taught: procedural or non-procedural? We will argue in favor of procedural languages for two reasons: (1) they seem to be easier to learn (2) they seem to facilitate improved problem solving skill. Empirical results &mdash; plus a healthy dose of speculation &mdash; will be used to support this claim. In a carefully controlled experiment, Welty and Stemple (1981) have shown that non-programmers can learn to use a procedural language better than they can a non-procedural language. Interesting to our purposes, the difference between the languages showed up most clearly when the task (the query) is at least of moderate difficulty. Thus, a procedural language seems to permit the non-programmer to achieve his primary goal: access to a data base. Our research clinches the argument in favor of procedural languages: as a secondary goal, non-programmers learn new problem solving skills. We have carried out a wide range of experiments comparing the performance &mdash; and understanding &mdash; of students using traditional algebra (a non-procedural language) to solve word problems with those using programming to solve the same problems. We have found, for example, that students write correct computer programs more often than students write algebraic equations, for the same problems &mdash; even though the algebraic expression in the program is the same as that required by the algebraic solution! Our analysis indicates that students use different notions of variable, equals, etc, in the programming context, than they do in the algebraic context. A member of our group, J. Bonar (1982) has identified natural language plans which non-programmers seem to use. In agreement with L. Miller (1980), Bonar indicates that these plans are non-procedural, i.e., people seem to naturally use non-procedural descriptions. However, he has found that when students use these non-procedural plans for more difficult programming problems, they lead to buggy programs. In contrast, those students who have learned the programming plans do not seem to have the same difficulties. These plans deal specifically with looping &mdash; hence they are quite procedural. Apparently, they procedural factors in programming help the novice programmer to develop new problem solving skills. The lesson we draw is that starting people off with a procedural query language is good for two reasons: they can access data bases, and they can develop new problem solving skills. Once the novice has progressed to the intermediate or advanced stage, one might want to teach a non-procedural language; we have no evidence one way or the other on this matter. One final comment, on the negative effects of teaching non-procedural languages: the success with APL notwithstanding, we need to tread lightly lest just plain folks learn as much about using non-procedural languages as they learned about algebra &mdash; precious little. Thus, we feel that the procedural/non-procedural controversy in query languages is an excellent &mdash; and important &mdash; forum for exploring the general issue of computational literacy.