most common technique they reported for avoiding race conditions was
subdividing the resources. Our study
provides a basis for a constructivist
approach to teaching concurrency, allowing instructors to build on these
ideas. Moreover, the study was independent of technological assumptions, making it relevant regardless
of technology or pedagogical practice
used.
Background
We have conducted a number of com-
monsense computing projects over
the past five years, all with the same
basic goal of identifying the common-
sense knowledge beginners bring to
the study of CS. Our foundation was
the constructivist theory about how
people learn, starting with what they
already know and building knowledge
on that foundation, rather than re-
ceiving it passively from an instructor.
Each learner’s background, culture,
and previous knowledge define his/
her starting point. Bransford et al. 4
argued that learning must engage stu-
dents’ preconceptions to be effective.
Yifat Ben-David Kolikant’s cinema-tickets assignment.
cinema tickets Problem
A ticket office sells movie tickets for a certain cinema. the next client always gets the best-available
ticket. software decides the next-best-available seat and prints the ticket.
Assumptions:
• the movie is screened only once;
• this is the only office selling tickets for the movie;
• each client can buy only one ticket; and
• Many people are waiting to buy tickets.
the software defines several procedures:
Function
bestAvailableseat()
Input: hall
Return value: best-available
seat in the hall;
– 1 if no seat is available.
Procedure
Mark Availableseat(seat)
Input: seat is the place of
an available seat in the hall.
output: The place of the seat
is marked as taken.
Input: seat is the place of
an available seat in the hall.
output: A ticket for place
seat is printed.
Procedure
PrintTicket(seat)
A client is handled through these steps:
Seat <= BestAvailableSeat()
If Seat <> – 1 then
MarkAvailableSeat(Seat)
PrintTicketSeat(Seat)
since waiting in line takes too long, the hall owners added another ticket office. both offices are to be
open at the same time and sell tickets for the same screening. each office has its own printer for
printing the tickets it sells; ignore money issues. the system must be developed by specifying:
1. required hardware (screens, printers, keyboards) and how it is to be distributed in the system;
and
2. Pseudocode for the system’s software (selling tickets through two offices); the above
procedures can be used, with no need to redefine them.
beliefs about a particular topic are
also considered preconceptions, as
explored by several researchers:
˲ ˲Miller10 analyzed “natural language” programs by students who
previously had not taken a formal
programming course, covering the
idea of writing computer programs
in natural language, and found that
a number of standard programming
concepts showed up in these natural-language descriptions;
˲ ˲ Onorato and Schvaneveldt11 also
looked at natural-language descriptions of a programming task, comparing survey subjects drawn from a variety of student categories: naïve, with
no programming experience; beginner, currently taking a first programming course; and expert, with significant programming experience. Along
with the differences between experts
and novices, they also found differences between the naïves and the beginners, though both groups lacked
programming experience;
˲˲Studying the misconceptions
of novice programmers, Bonar and
Soloway3 focused on preprogramming knowledge, calling it “
step-by-step natural language programming
knowledge”; they distinguished it
from knowledge of the programming
language Pascal the students were
learning in their introductory course.
They found that many of the observed
bugs in novice-programmer-written
code could be explained by a mismatch in students’ knowledge in
these domains; and
˲ ˲ Gibson and O’Kelly8 looked at a
variety of search problems (with precollege students) and Towers-of-Ha-noi problems (with beginners), finding both groups showed “algorithmic
understanding” of how to solve them.
In our own prior work beginning
in 2005, we sought to identify student
preconceptions that could be leveraged in teaching beginning computing concepts. To investigate student
preconceptions about sorting, we
asked 118 beginners to describe in
words how they would sort a list of
numbers into ascending order. 14 A
majority (69%) described a coherent algorithm, with many giving versions of selection or insertion sort.
However, most treated numbers as
strings, manipulating them digit by