Dwindling CS enrollments
I keep finding articles that report enrollment numbers in college computer science departments continue to dwindle. A dominant reason suggested is the perception that programming is hard, boring, and no fun. One of those articles reported ...
Tucker Balch, an associate professor at Georgia Tech, told the AP that the [school's Robotics course] is an attempt to combat "prime number" syndrome. That disease, he said, afflicts computer science departments that typically ask newcomers to write dull programs performing mathematical algorithms.
Other programs use drag-and-drop, GUI driven, multi-media rich, programming environments to stimulate interest.
The former approach requires the purchase of (and its labs are constrained by) robotics hardware. The latter requires installing a development environment like Alice or Scratch.
Instead - I suggest that games and puzzles are an excellent vehicle for stimulating interest and practicing programming. Consider Mastermind - the simple code-breaking board game. What do you think about the following series of labs? Does this pilgrimage address the "boring and no fun" rap on the study of programming? Does this pilgrimage make the Mastermind domain doable in an introductory course?
- prompt, receive input, report input
- in a loop: prompt, receive input in 4 scalar variables, report input
- replace 4 scalar variables with one array of 4 elements
- convert 4 integer inputs to 1 string input, validate input, tokenize input
- add hard-wired answer array and compute "totally correct" response
- populate answer array with random values
- compute "partially correct" response
Other games and puzzles that could contribute to this approach are: Cracker Barrel peg game, fifteen puzzle, Set card game, alphametics puzzles, Sudoku, Wheel of Fortune, jumble word puzzles ... www.vincehuston.org/teaching
Additionally - I propose an earlier emphasis on the concepts of algorithm and data structure. Are we otherwise guilty of low expectations? I'm not talking about: lists, trees, graphs, search, sort, O-notation. I'm thinking about a lunch-bucket worldview that: life-on-the-job is a daily pilgrimage to craft algorithms and data structures. The indirection and leverage of using arrays to access arrays is not a traditional data structures topic, but it is life in the real world. Using a map of pointers-to-function (or the dynamic binding of a virtual function hierarchy) to replace an ungainly "case" statement is an act of obstinate elegance.
In the Mastermind example, suggesting that the computation of the "totally correct" response is an algorithm, may seem trivial; but for the beginner - it is an act of algorithm. Computing the "partially correct" response may seem too advanced for the beginner; but I propose that it is an invaluable challenge. Someone once suggested, "If you can only think of one way to solve a problem - you don't truly understand the problem." For the "partially correct" algorithm, I created a "brute force" solution; and then upon further reflection, I created an "elegant" solution whose correctness is demonstrably easier to argue.
In the Cracker Barrel peg game: how should jump requests be validated and implemented? Is it algorithm or data structure? Does this strategy to emphasize "a higher moral order" in a first semester programming course address the "boring and no fun" rap on the study of programming?
A totally miscellaneous quote ...
There are lots of applications in service where the most sophisticated algorithm is bubble sort, and the most sophisticated data structure is linked list. [Scott Meyers]