We're Teaching Programming Wrong


Summary

Event-based programming is more natural for non-programmers than imperative or object-oriented styles.

Rule

We're teaching programming the wrong way. Interesting study of how people naturally express solutions to problems concludes that starting with imperative programming languages may not be the best way to teach programming skills. What works? Event-based and rule systems, naturally. Maybe we ought to use KRL for introductory programming. I'm willing to try it.

The majority of the statements written by the participants were in a production-rule or event-based style, beginning with words like if or when. However, the raters observed a significant number of statements using other styles, such as constraints, other declarative statements (that were not constraints), and imperative statements.

The dominance of rule- or event-based statements suggests that a primarily imperative language may not be the most natural choice. One characteristic of imperative languages is explicit control over program flow. Although imperative languages have if statements, they are evaluated only when the program flow reaches them. The participants’ solutions seem to be more reactive, without attention to the global flow of control.

Studying the Language and Structure in Non-Programmers’ Solutions to Programming Problems


Please leave comments using the Hypothes.is sidebar.

Last modified: Thu Oct 10 12:47:19 2019.