Академический Документы
Профессиональный Документы
Культура Документы
towards computation and the use of technology. This study used a new curriculum
tional thinking to undergraduate students who are not computer science majors. This
course is intended to engage a broad range of students, including those not ordinarily
from an information technology course. The traditional curriculum for this informa-
tion technology course was modified to include topics from the computational thinking
not selected for the treatment group, used as the comparison group. All students in
the study took a computer anxiety survey at the beginning and end of the semester.
The participants also completed frequent surveys to report on their level of anxiety
and insights into the efficacy of the instructional methods being used in the classroom.
In addition to the survey data, the participants weekly lab reports were included in
the qualitative data collected about the use of computational thinking strategies in
problem solving. Finally, semi-structured interviews were conducted with each mem-
ber of the treatment group to gain insight into how they used technology before
The qualitative data were encoded and analyzed for evidence of the course’s im-
gies in problem solving. This study found that when students participate in a com-
by
A Dissertation
LIST OF TABLES ix
ACKNOWLEDGMENTS x
DEDICATION xi
1 Introduction 1
Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Theoretical Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2 Literature Review 13
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Computational Thinking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Related Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
iv
Related Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3 Methods 33
Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Quantitative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Qualitative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Intervention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4 Results 47
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
v
Research Question 2: Do students who participate in formal training in
computational thinking produce quality solutions to computational
problems? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Metanarrative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
5 Conclusions 67
Significance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Major Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
APPENDICES
vi
B Computational Thinking Problem Solving Inventory (CTPSI) 90
C Grading Rubric 95
D Interview Questions 96
REFERENCES 172
vii
LIST OF FIGURES
viii
LIST OF TABLES
4.1 Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
ix
ACKNOWLEDGMENTS
This project could not have been completed without the support of my family,
mentor and committee chair Susan K. Johnsen. Susan, I will miss our weekly meet-
ings. Your guidance and support throughout this process have help to shape me as
out to the Department of Computer Science, it is a joy to work with this special group
of friends.
Finally, I would like to thank my family. Tracy, your love and support mean
the world to me. Katie and Rachel, I am so proud of you, you fill my heart with joy.
Mom, you and Dad helped to shape me into the man I am today. You formed the
x
DEDICATION
To Tracy
xi
CHAPTER ONE
Introduction
Computational thinking (CT) has existed since the beginning of computer sci-
ence. It was originally known as algorithmic thinking in the 1950s and 1960s (Denning,
gies used by computer scientists; it is a way humans solve problems, not computers
(Wing, 2008). The constraints imposed by the digital computer is what makes the
problem solving computational. Many problems are not easily solved using a com-
would facilitate painting a picture or getting a good night’s sleep. However, if a prob-
lem can be abstracted into a computational framework, then a wide rage of previously
unavailable strategies can be brought to bear on the problem solving process (NRC,
2009).
lem into its parts, and then solving each part separately or choosing an appropriate
problems, making abstractions, and phrasing solutions in ways that can be satisfied
computationally. These skills range from algorithms and data structures to presen-
tations and visualizations (Hambrusch, Hoffmann, Korb, Haugan, & Hosking, 2009).
Although many of these skills are used in non-computational problem solving, the
full extent of their power is only realized when the burden of computation is removed
from the human and given to a computational tool such as a digital computer.
1
Another important computational skill is recursion. This is the idea that a
to a trivial state. The solution to the trivial instance is then used to construct
a solution to the more complex original problem. The key point is that recursion
the problem solver to find links between problems and reuse solutions (Qualls &
alter the way many problems are solved, in a variety of fields (Curzon, Peckham,
Taylor, Settle, & Roberts, 2009). The skill of problem abstraction can be directly
increasing importance and interest. Computer technology has become nearly ubiqui-
tous in the last decade, but this technology holds little utility if people are not able to
for everyone, not just for computer scientists.” She defines computational thinking
ing in the United States. At the very same time the demand for computer scientists
is increasing (Board, 2010). The Bureau of Labor and Statistics estimates that the
number of computer science jobs in the United States will increase by 29.2% during
2
the ten-year period from 2006 to 2016 (Bureau of Labor Statistics, 2007). Many of
these jobs are in highly sensitive areas involving national security, defense and the fi-
nancial/banking industry. These jobs cannot be filled by foreign nationals. The result
is that many of these jobs are filled by individuals who are not fully qualified. The
One indication of the importance of this way of thinking is that the National
Science Foundation (NSF) has recently begun funding research that seeks to develop
course work and methodologies for teaching computational thinking. In 2009, “the
Directorate for Computer and Information Science and Engineering (CISE) of the
National Science Foundation released a revised solicitation for the CISE Pathways to
p. 4). In the revised solicitation all grant proposals must include computational
and understanding of technology are at a disadvantage. They do not know what prob-
lems can be solved by computers and when and how technology can be appropriately
applied to make their lives easier and increase the quality of the human experience
(Wing, 2008).
Issues
Several key issues motivate the teaching of computational thinking and the
study of the impact of this way of thinking. First, there is a need for participants
problem solving.
3
Finally, there is a need to correct a poor public perception of careers in com-
Computational Thinking has broadened the range of the problem solving skills
Students and practicing professionals in information-based fields, like science and en-
gineering, require a basic competency with computational tools, but this ability is
any modern society requires the use of technology, an understanding of its capabili-
life. In some areas the divide between the creation of technology and its application
has created a situation where particular individuals are unable to adequately use
computational tools. It is not uncommon for individuals who use technology, even
proficient users of technology, to be unfamiliar with best practices and even what
sorts of computing tasks are possible (Dziuban, Moskal, & Hartman, 2005).
problem solving skills. In a recent study conducted by Hong Qin (2009) found that
when computational thinking emphasized problem solving, students were able to rec-
ognize the common pattern of thinking processes among diverse problems and appre-
ciated the value of thinking beyond solving a particular problem. They were able to
generalize one problem into a class of problems with similar solution strategies. This
was true even for students who previously seemed uncomfortable during one-on-one
thinking from the act of programming (Qualls & Sherrell, 2010). Programming is
4
at problems through a filter designed to optimize the potential benefit of applying
gramming but is not unique to computer science (Denning, 2009). To provide the
greatest impact and make computational thinking accessible to the maximum num-
Teaching computational thinking may also help to correct a poor public percep-
socially marginalized individuals who spend the majority of there time isolated from
human interaction while writing computer software are not accurate. This negative
(Hambrusch et al., 2009). Computing professionals spend the majority of their time
interacting with others and looking for ways to abstract problems that allow them to
Theoretical Framework
world view. This ontological perspective acknowledges the existence of a single reality
with multiple interpretations of that reality. Although there is a single reality all
Because this research seeks to investigate factors influencing how people learn
and what impact learning has on the learner’s perception, key features of construc-
tivism interpreted through the lens of Kolb’s Experiential learning theory (ELT) will
be used as the theoretical framework for this study. The key attributes of construc-
nicating knowledge.
through their senses within some context. People actively construct their own sub-
learning theories through its emphasis on experience . ELT traces its roots to the
work of Dewey, Lewin, and Piaget (D. A. Kolb, Boyatzis, & Mainemelis, 2000).
learning and development” (D. Kolb, 1984). The ELT holds that learning takes
four distinct forms. Two modes of grasping experience, Concrete Experience (CE)
Reflective Observation (RO) and Active Experimentation (AE) (D. A. Kolb et al.,
Concrete Experience is learning through first hand experience. In the first form
of learning the learners senses are used to perceive the world and these sensory inputs
are then used to construct meaning. The second modality of learning is analytical.
6
Figure 1.1. Experiential Learning Theory (A. Y. Kolb & Kolb, 2005, 195)
sensation. These two modalities of learning are mutually exclusive and require the
learner to choose one or the other (D. A. Kolb et al., 2000). In learning a new
task some learners prefer to watch a mentor or expert and carefully analyze the new
information to construct new meaning before attempting to apply these new skills.
Other learners prefer to discover for themselves how things work. It is part of the
human condition that causes these two modalities of learning to be mutually exclusive.
a car (D. A. Kolb et al., 2000). “We resolve the conflict between concrete or abstract
and between active or reflective in some patterned, characteristic ways. ”(D. A. Kolb
7
The four-stage learning cycle described above was used to explain how the par-
ticipants in this study are learning to use computational thinking as a problem solving
strategy. First, the learners were presented with a problem that could be solved com-
solution to this problem. This initial problem was followed by additional similar prob-
lems that allowed the learners to practice the computation problem solving strategy.
Each unit in the computational thinking curriculum provided the learner with
each example problem was the concrete experience (CE) that provided an opportu-
nity for reflective observation (RO). Once these RO are assimilated into an abstract
concept the learners formed an abstract hypothesis (AH) that was used during the
module was conducted during the weekly labs where the learners were asked to apply
the new problem solving strategy to a problem similar to the one presented by the
instructor.
computer science should teach a course called “Ways to Think Like a Computer
science majors. These courses should help the students answer questions like. What is
about problem-solving and about the field of computer science (Wing, 2006). In a
With the rich collection of computational tools available to all members of our modern
8
society there is a need to educate the general public about what is possible with the
thinking can both increase the use of this problem solving strategy and positively im-
pact the learners’ attitudes towards the use of technology in problem solving. Qualls
(2010) notes that educators must not wait until high school or college to teach these
that all citizens are well prepared to live in our modern society (Qualls & Sherrell,
2010).
There are few studies represented in the research literature that address the
topic of computational thinking. The field has defined what is, and is not, computa-
tional thinking (Wing, 2006). Researchers are just now beginning to publish results
of computational thinking studies with early articles in the area focusing on anecdotal
Results from this study will help to inform educators and students about the
need to know what computational thinking is, what types of problems can be solved
Research Questions
An important initial step in any research is the careful construction of the re-
search questions (Yin, 2008). Both qualitative and quantitative questions were asked
thinking (CT).
tational thinking. Research question one (RQ1) looked at what effect CT training
(RQ2) looked at how formal training in CT impacts the quality of the computational
9
solutions. Research question three (RQ3) investigated how formal training in CT
The qualitative strand also investigated three effects of formal training in CT.
Research question four (RQ4) investigated the effect of training in CT on the learn-
ers’ attitudes about CT. Research question five (RQ5) looked for factors that impact
computer anxiety when learners are taught CT. Research question six (RQ6) investi-
gated how formal training in CT changes they war the learners solve computational
problems.
The final two questions, research question seven (RQ7) and research question
eight (RQ8), were answered by combining the evidence from the qualitative and quan-
about the use of computation in problem solving and, RQ8 investigated the impact
The following are research questions for each category in this dissertation.
RQ4 In what ways does formal training in computational thinking change attitudes
10
RQ5 In what ways does formal training in computational thinking change computer
RQ6 In what ways does formal training in computational thinking change the com-
RQ7 How does formal training in computational thinking impact the learners’ atti-
RQ8 How does formal training in computational thinking impact the learners’ un-
Each question was crafted to guide this study in determining the impact of
the treatment group. Different dimensions of each question were investigated through
Conclusion
Computer technology has become nearly ubiquitous in our modern society, but
this technology holds little utility if people are not able to use it effectively. The
influence of computers in society for both professionals and students are of increas-
ing importance and interest. Computational Thinking has broadened the range of
the problem solving skills needed to be a productive member of any modern society
(Curzon et al., 2009). Despite the increase in availability and use of computational
tools, the number of students selecting computer science as a college major is declin-
ing in the United States (Board, 2010). This study seeks to determine the impact
computation and the use of technology in problem solving. The study also docu-
11
There are few studies represented in the research literature that address the
topic of computational thinking. The field has already defined what is, and is not,
computational thinking (Wing, 2006). Researchers are just now beginning to publish
results of computational thinking studies with early articles in the area focusing on
anecdotal results and reports of best practices. Chapter two of this dissertation
reviews the relevant literature in the area of computational thinking. After outlining
the current state of research in the field of computational thinking, this literature
review demonstrate the need for additional research in this field of study.
12
CHAPTER TWO
Literature Review
Introduction
In a technology rich society, citizens with the ability to make effective use of
als who lack the skill to effectively use and understand the application of technology to
problem solving. Amber Settle and Ljubomir Perkovic (2010) described three skills
critical for the competent participation in a modern society. The first skill is the
ability to use basic computer applications often described as computer literacy. The
second skill is a high level understanding of the workings of a computer system, often
referred to as computer fluency. The third skill is the ability to apply computational
computational thinking and is arguably the most critical of the three skills (Settle &
Perkovic, 2010).
the physical, social and theoretical domains (Settle & Perkovic, 2010) and provides
new ways to solve problems that were previously unavailable or impractical due to
human limitations (Qin, 2009b; Curzon et al., 2009; Allan, Barr, Brylow, & Hambr-
usch, 2010). Problem solving using computational thinking seeks to create knowledge
rather than just simply using information (Adams, 2008; Denning, 2009). Finally,
computational thinking enhances creativity and innovation (Settle & Perkovic, 2010;
The importance of computational thinking has been evident in the sciences for
problem solving skill has begun to impact a much broader range of academic and
13
professional fields, and even the personal lives of individuals living in a world where
computationally is occurring at an early age and with increased frequency (Lu &
Fletcher, 2009). Computational thinking is a fundamental skill for everyone, not just
the computer scientist, and should be integrated into the set of skills taught to all
Computational Thinking
The concept of computational thinking has been around for centuries, since the
very beginnings of mathematics (Salinger, Plonka, & Prechelt, 2008). However, the
tions of the Association for Computing Machinery in 2006. In this seminal work,
range of subjects (Qin, 2009b; Wing, 2006). Put in other words, Computational
14
Others have built on Wing’s definition by identifying attributes of computa-
tional thinking not explicitly mentioned in her definition. Qin suggested that, “com-
tional thinking offers an important skill set in modern sciences (Qin, 2009a, p. 188).”
to identify the key characteristics of computational thinking. Working from the un-
Orr, Wallace and Zhang (2010) identified the following list of computational thinking
characteristics:
• Mathematical modeling
15
Of these characteristics, several researchers have suggested that abstraction is
become more complex, the use of abstraction becomes increasingly important (Aho,
2011). The two key attributes of abstraction that must be considered when using
computational thinking as a problem solving strategy are the process of leaving out
school and at the university level, find it difficult to use abstraction as a method
for simplifying problem solving. When asked to solve problems that could be solved
easily with abstraction, many students preferred to use the more complex solution
a compelling topic for investigation and research. A key issue, however, is how to
motivate students at an early age to engage with computational thinking, and to see
its relevance (Good et al., 2008). Recently there have been a number of efforts to
promote formal training in computational thinking. Several of these efforts are inter-
Musical Live Coding in Scratch”, Ruthmann, Heines, Greher, Laidler and Saulters
tion. In this course students use a programming environment called Scratch to create
music using basic programming concepts like loops, initialization, variables, modu-
16
only report anecdotal evidence but the course seems to have a positive impact on the
Repenning, Webb and Ioannidou (2010) report on an after school program tar-
geted at middle school students. In this program game development is used as the
quirement checklist of computational thinking tools have been developed that includes
curriculum, teacher training, standards and authoring tools (Repenning et al., 2010).
Early results from this program have shown unusually high levels of student engage-
ment. “Students who are usually not engaged, are showing strong interest. Students
et al., 2010, p. 269). This development effort has produced the set of computational
thinking tools designed to teach computational thinking. These tools are designed to
foster training with the potential for creating systemic impact on the K-12 curriculum
(Repenning et al., 2010). Key to the success of these tools are the following set of
characteristics.
vestigated by Peng (2012). In this study a computational drum kit (drumbots) with
17
programmable behaviors were used to integrate computational thinking in music ed-
drumbots. “Each drumbot records beat patterns from the outside world or its pre-
cursor, replays the patterns in selectable ways, and passes the rhythm to its neighbors
along the drum-bot’s surface in 3D space (Peng, 2012, p. 401).” These activities allow
tion, and iteration. Although this efficacy development effort had not been formally
studied, the initial empirical observation is that the environment is engaging for both
children and adults and has the clear potential for teaching computational concepts.
efficacy of Google’s Computer Science for High School with respect to teacher train-
ing. The researchers conducted two workshops separated in time by several months to
determine what impact this training had on the participants. The results of this study
identified four training modules that had immediate impact on the teachers attend-
ing the training. The most useful training was related to computer science careers.
The researchers discovered that many public school educators did not have a clear
using Google sites with students, computer science in the New Jersey core curriculum
2012). This study showed that this type of training helped the high school teachers
importance of this finding is that once trained the high school teachers are better pre-
18
Another public school initiative, focused on middle school and high school stu-
(Lee et al., 2011). In this article the authors present a use-modify-create frame-
The authors suggest three concrete steps to support the development of computa-
tional thinking. First, they recommend the use of a rich computational environment.
proposed. The three stages are to use, modify, and create. In the use stage the learn-
ers use an existing computational tool to solve some computational problem. In the
modify stage, an existing tool is modified to enhance or alter its functionality, thus
in the create stage; the learners create their own computational tool. The final step
transfer their computational thinking skills form one domain to another. The article
early age and that this study demonstrated the practicality of early exposer to com-
In the state of Alabama the Alabama Math, Science, and Technology Initiative
emphasizes learning by doing in the STEM fields. Jenkins (2012) argues that compu-
tational thinking should be integrated in to the public school math K-12 curriculum.
could easily be integrated into the existing high school mathematics curriculum. The
findings from this study indicate that the Alabama high school math teachers were
19
• were open to using a programming language as a tool in a math-
ematics classroom;
• became more aware of how writing a computer program helped
them to abstract, generalize, and write a convincing argument;
• were eager to learn more about the programming language,
• and were willing to learn more about how to incorporate the
use of a programming language in their mathematics classes
(Jenkins, Jerkins, & Stenger, 2012, p. 152).
These results add additional support to the findings that computational thinking
is not well understood by students and educators. These findings also support the
finding that training in computational thinking has a positive impact on the learner’s
several studies have investigated the process and impact of incorporating computa-
tional thinking in courses at the university level. In the article, Teaching Computa-
graduate biology course through computer laboratory exercises. Qin noted that many
students in the life sciences are weak in computational skills and tend to avoid taking
computationally focused courses. This research showed that the life science students
were uncomfortable with one-on-one interaction with the computer. For this reason
pair programming (group work) was recommended as the most effective way to have
the students interact with the computer. This study showed that the students had a
positive affect about their learning experience and felt that they had improved their
of computer science and the department of English, that explores how computational
thinking can be used to support the teaching of English. The computational thinking
concept of modeling was used to infuse computation into the English curriculum.
English students were asked to use formal modeling as a mechanism for the description
20
and analysis of topics such as: “differences between fictional characters and real
people, how to model literary plot lines, how literature is self-describing, and how
to write clear sentences” (Howell, Jamba, Kimball, & Sanchez-Ruiz, 2011, p. 49).
Third, it allowed the learners to visually see that the relationship between the various
dimensions of the concept were not linear. This is a common misconception when
visual models are not used in the analysis of literature. Finally, modeling was used to
Related Studies
In this section research projects most similar to the work reported in this disser-
tation are discussed. These research projects focus on the impact of computational
soning. Asiala, Brown, DeVries, Dubinsky, Mathews and Thomas (1996), describe
learner”(Asiala et al., 1996, p. 4). The researchers use a specific theoretical per-
spective based in part on Piagets concept of reflective abstraction to explain how the
21
learner will construct new knowledge and come to understand the concept. Second, a
instructional intervention is designed to teach the concept in a way that will cause the
learner to understand the concept as it was described in the analysis. Finally, data
the efficacy of the intervention. As the researcher moves through each of the three
phases of the framework, the theory and instructional intervention are refined. To
to help gain insight into the cognitive constructs being used by the participants.
In this study there were two major findings. First, the APOS framework was ef-
its derivative. Second, students who participated in a curriculum designed with the
APOS framework had a better understanding of the key concept when compared
with students who took the traditional calculus courses (Asiala, Cottrill, Dubinsky,
Clark, Master, St. John, Tolias and Vakil (1999) and Weller, Clark, Dubinsky,
Loch, McDonald and Merkovsky (2003) found that when coursers were taught us-
ing the APOS framework there was an observable improvement in the participants
attitudes toward mathematics. This finding suggests that student attitudes can be
and computational thinking are closely related, it is postulated that formal training
(Clark, Master, John, Tolias, & Vakil, 1999; Weller et al., 2003)
22
was found between ethnic groups, females consistently demonstrated higher levels of
math anxiety. This study also found that students with high math anxiety tended to
perform worse on math assessment when compared to students with low math anxi-
ety. This study also reported on the efficacy of interventions to reduce math anxiety.
Both behavioral and cognitive treatments were used to reduce the participant’s math
faulty beliefs and building self-confidence, and cognitive restructuring combined with
anxiety. This reduction in math anxiety had a corresponding increase in math per-
The article also showed that systematic desensitization, or repeated experience with
project where computational thinking was integrated into a middle school curricu-
lum through interactive journalism. The researchers designed and tested a program to
They hypothesized, Can typical middle school students learn and enjoy using com-
puter skills to create an interactive online magazine (Wolz, Stone, Pearsom, Pulimood,
& Switzer, 2011, p. 14)? To test this hypothesis, 36 rising eighth graders were admin-
test, a career decision making survey, a mathematics efficacy test, a mathematics in-
terest survey, and a story telling problem solving activity designed to elicit evidence
also anticipated that the teachers would show an increased confidence in using com-
putational thinking skills and tools in the classroom. The students and the school
23
faculty participated in a summer institute that focused on the similarities between
computational thinking and the journalistic process. During the summer institute,
the faculty were trained first and then their students were trained in computational
thinking. Sixteen of the 36 students were used as the treatment group completing
Unfortunately, within the first few weeks of the study, the comparison group was
compromised when the project participants shared their experiences with members of
the comparison group. As a result, the formal treatment methodology was abandoned,
leaving the researchers to focus on the analysis of the participants post-treatment at-
titudes. This analysis showed that the majority of the participants enjoyed working
with the computer program Scratch. The analysis also revealed an increased positive
affect about the field of computer science, with the participants indicating that they
felt that computer programmers worked with others and were creative. Finally, the
majority of the participants were confident that they could write a program by them-
nificant differences were found between the two groups when their test results were
Qualls, Grant and Sherrell (2011), conducted a small mixed-methods case study
rithms, abstraction, and efficiency. In this study three research questions were inves-
tigated:
24
students understanding of the three computational thinking concepts: abstraction,
efficiency, and algorithms. Face validity of the instrument was established by two
researchers and the course instructor. This assessment was administered at the be-
ginning and again at the end of the course. In addition to the quantitative data,
qualitative data was collected during two focus group interviews. The interview pro-
tocol was aligned with the research questions and the focus groups were conducted at
midterm and again at the end of the semester. Six of the 23 participants volunteered
to participate in the focus group interviews. The qualitative data were analyzed using
In answering the three research questions both the qualitative and quantitative
data suggested that the participants understood the concept of an algorithm. These
same data revealed that the participants lacked an understanding of both efficiency
and abstraction. The qualitative results showed that there was no statistically sig-
findings did, however, determine that the course had a statistically significant impact
rithm. The qualitative data revealed that the participants had a clear and correct
understanding of the concept of an algorithm. The qualitative data also revealed that
that it was an important concept. Finally, the qualitative data showed that the par-
ticipants associated efficiency with productivity and time saving measures. Although
this is a valid understanding of the term it does not reflect a clear understanding of
how efficiency is related to computational thinking. This study used methods similar
to those reported in this dissertation, however, the participants in this study were en-
rolled in an introductory computer science course suggesting that there was a strong
self-selection bias.
25
Each study reported in this section has some strong similarity to the work
liberal arts program. Qualls, Grant and Sherrell (2011) is the most similar study
and Thomas (1996) has strong similarities in methodology and theoretical framework
but is applied to the field of mathematics. Each of these studies serves to inform
this research effort and help to demonstrate the gap in the literature with respect to
in this study. Experiential Learning Theory provides a holistic model of the learning
process and a multi-linear model for adult development (D. A. Kolb et al., 2000). ELT
is a well-developed theory that has received careful analysis and extensive testing in
the field of educational research (Healey & Jenkins, 2007). ELT emphasizes experience
rather than cognition or behavior to explain learning. The origins of ELT can be
found in the experiential works of Dewey’s pragmatism, Lewins social psychology, and
To understand experience some learners rely on their senses while other use a
use both experience and symbolic representation to understand new information but
because it is difficult to use both simultaneously, they were prefer one method of
the other. Both the context and content of the new information can influence this
26
watch others who are involved in the experience and reflect on what happens, while
others prefer to directly test their understanding (A. Y. Kolb & Kolb, 2005). Thus,
Experiential learning theory is based on these four learning modes that combine
& Prosser, 1996). The two dimensions undergird the learning cycle: the abstract
flective observation dimension. These form the two main dimensions of the learning
process. The first dimension is how learners perceive or understand experience, and
the second is how learners process or transform what they experience (Healey &
Jenkins, 2007).
The two modes for understanding experience are Concrete Experience and Ab-
stract Conceptualization and the two modes of transforming experience are Reflective
experience, feelings and emotions to engage with the world , while Abstract Concep-
tualization uses a symbolic representation of the experience rather than the physical
transforming this experience into plans to guide future actions. Active Experimen-
tation is the process of testing the plans formed in Reflective Observation (Kayes,
2005).
the learning cycle concrete experiences (understood from direct experience with the
world) are the basis for observations and reflections. These reflections are assimilated
and distilled into abstract concepts from which new implications for action can be
drawn. These implications can be actively tested and serve as guides in creating new
27
This process is portrayed as an idealized learning cycle or spi-
ral where the learner ”touches all the bases”-experiencing. reflect-
ing. thinking. and acting-in a recursive process that is responsive to
the learning situation and what is being learned. Immediate or con-
crete experiences are the basis for observations and reflections. These
reflections are assimilated and distilled into abstract concepts from
which new implications for action can be drawn. These implications
can be actively tested and serve as guides in creating new experiences
(A. Y. Kolb & Kolb, 2005, p. 194).
Healey (2007) reports on a project that used ELT as the theoretical framework
for teaching a college level geography course. In this study ELT was found to provide
a theoretical rationale for what teachers were already doing in the classroom and
offered insight into how to improve classroom instruction (Healey & Jenkins, 2007).
Experiential Learning Theory also makes explicit the importance of having the learn-
ers reflect on what they have experienced, providing them with the opportunity to
proach to teaching computational thinking. Each week the participants were asked
the participants were asked to reflect on what they had experienced. Reporting on
their perception of the utility of each computational strategy, how they felt about
using the strategy, and their perception of how effective they would be in using these
problem solving strategies in the future. ELT is well suited for this type of instruc-
tional intervention, intentionally having the participants experience the problem solv-
ing strategies before asking them to reflect on each activity and develop an abstract
concept that can then be applied in a future problem solving situation. The use of
well supported by the literature and provides an effective tool for investigating the
28
Related Theory
Researchers such as Jerome Bruner and James Greeno have proposed theories of
learning and problem solving that are closely related to Experiential Learning Theory.
Although these theories are not explicitly used in this research, they serve to inform
ture), and symbolic representation (words) (Bruner, 1964). The enactive represen-
tation is the earliest representation to appear and involves encoding action based
information and storing it in the learner’s memory (McLeod, 2008). This type of
variety of motor tasks that are easy to perform (driving a car, walking, throwing a
ball, etc.) they frequently find them difficult to describe in pictures or words but can
sentation information is stored visually in the form of images (McLeod, 2008). When
learning a new subject, many learners find it helpful to have diagrams or illustrations
to help explain a new concept suggesting that the graphicsl representation of the con-
cept aids in the learner constructing their own internal image of the new information
(McLeod, 2008).
images have a fixed relation to the ideas they represent. In the symbolic representa-
that allow them to be easily manipulated and transformed (McLeod, 2008). ELT ex-
29
tends this idea of knowledge representation by providing two modes for transforming
in the context of problem solving and reasoning (Greeno, 1989). The model is based
Greeno’s four domains seem to align with the four dimensions of learning in the
ELT. The concrete domain is similar to Concrete Experience in that they both relate
to the physical world. The model domain aligns with Abstract Conceptualization
which represents the abstraction of the physical world. Reflective Observation in-
volves transforming understanding through theory building and thus is similar to the
abstract and symbolic domains. ELT extends Greeno’s theory by adding the concept
of Active Experimentation. This phase of ELT allows for the testing of the newly
transformed understanding.
Although Bruner’s and Greeno’s theories align nicely with ELT both lack some
30
for both the creation and transformation of knowledge in addition to providing a
Conclusion
The literature reviewed in this section reveals that research related to com-
putational thinking has recently received increased attention. Starting in 2006, with
Wing’s article Computational Thinking, the number of articles published on this topic
has increased significantly. The Association for Computing Machinery (ACM) is the
largest professional society in the field of computer science and computer science edu-
cation. Forty-seven articles about computational thinking have been published by the
ACM, 43 of the 47 were published in the past four years. In addition to an increase
in the number of journal articles related to this topic, the federal government has also
begun to fund research relate to the study of computational thinking. In 2009, the
Directorate for Computer and Information Science and Engineering (CISE) of the
National Science Foundation released a revised solicitation for the CISE Pathways to
Although there are many working definitions for computational thinking, the
ciency (Qualls, Grant, & Sherrell, 2011). Using this definition and key characteristics
studies have focused on two populations of learners. The first were middle school
and high school students in the public schools. Several articles report on programs
31
ability to think computationally. The second population studied, were university stu-
dents in STEM fields. Several studies looked at the impact of using computational
the university level. There is a gap in the literature that this study seeks to fill. The
non-STEM major has chosen a field that does not require a deep understanding of
computation or the application of the type of thinking that arises from solving prob-
lems using abstraction, algorithm design and the careful consideration of efficiency.
How might formal training in computational thinking effect learners who have not
32
CHAPTER THREE
Methods
Computer technology has become nearly ubiquitous in the last decade, but this
technology holds little utility if people are not able to use it effectively. Wing (2006)
not just for computer scientists.” She defines computational thinking as “. . . solving
solving strategy may involve dividing a problem into its parts, and then solving each
and decomposition when attacking a large complex task or designing a large complex
The influence of computers in society for both professionals and students are of
increasing importance and interest. Computational Thinking has broadened the range
of the problem solving skills needed to be a productive member of any modern society
(Curzon et al., 2009). This study used a new curriculum in computational thinking
graduate students who are not computer science majors. This course is intended to
engage a broad range of students, including those not ordinarily accustomed to using
computation as a problem solving tool. Both the treatment group and comparison
group come from students enrolled in an information technology course. Topics cov-
ered in this course include hardware and software systems, social and ethical issues,
33
information search strategies for research, and personal and organizational security
dents randomly selected from this course. The random assignment process used a
signed even number were placed in the treatment group and participants assigned odd
numbers were placed in the comparison group. The normal curriculum for this course
was modified to include skills such as problem abstraction and decomposition, un-
not randomly selected to be in the treatment group. To examine the effects of the
asked.
Research Questions
RQ4 In what ways does formal training in computational thinking change attitudes
34
RQ5 In what ways does formal training in computational thinking change computer
RQ6 In what ways does formal training in computational thinking change the com-
RQ7 How does formal training in computational thinking impact the learners’ atti-
RQ8 How does formal training in computational thinking impact the learners’ un-
Design
mixed methods research design, was used. This type of mixed method design is well
suited for investigating dimensions of a phenomena that cross the qualitative and
Mixed Methods Designs, illustrates the process of conducting this type of research. In
this design qualitative and quantitative data are collected and analyzed in parallel.
Each strand is completed with its own questions, data, data analysis, and inferences.
After collecting and analyzing the data from the qualitative and quantitative
This narrative provides insight into the impact of teaching computational think-
ing that cannot be discovered through the use of either qualitative or quantitative
methodologies alone. In some instances the two sources of data will complement each
other, strengthening the finding and functioning as validation of the results. In other
cases, the two sets of data may seem to disagree suggesting that the results are in
some way confounded. The mixed methods design provides an ideal structure for
developing a deeper understanding of both the extent and the circumstances under
35
Quantitative
Data Collection
'
Quantitative
Data Analysis
&
/
Compare Interpretation
8
Qualitative
Data Analysis
7
Qualitative
Data Collection
which taking a course in computational thinking (CT) impacts the learners’ attitudes
3303) at private universsity in the southwest United States. The comparison group
consisted of students enrolled in the same introductory computer literacy course but
not randomly selected to be part of the treatment group. A simple pre/post test
method was used to determine the impact of the students ability to identify and solve
problems using the strategies found in the computational thinking curriculum. The
qualitative portion of the study defined the unit of study as the students enrolled in
The first dimension investigated through the mixed method phase of this study
was the participants’ attitude towards computational thinking. The second dimen-
sion was the participants’ understanding of the nature of CT and the appropriate
36
application of CT to problem solving. The results of the mixed method phase are
presented in tabular form, with attitude and understanding on the vertical axis and
evidence from the qualitative and quantitative strands on the horizontal axis.
region of the United States, with an enrollment of 12,438 undergraduate and 2,261
graduate students (University, 2010). The participants in this study cam from a
at a provate university located in the southwest United States, during the spring
2012 semester. The students in CSI 3303 were randomly assigned to the control
and treatment groups. Historically 100% of the students enrolled in this course are
for participation in the study. Both the researcher and the other faculty member
teaching CSI 3303, had no knowledge of which students agreed to participate in the
study and which students declined to participate in the study or have access to data
collected until after final course grades have been submitted at the end of the spring
2012 term.
Instruments
Both qualitative and quantitative data were collected to address the research
questions.
Quantitative
Four instruments were used to collect the quantitative data for this study. The
strategy, when designing a solution to a problem. This instrument was field tested
37
during the fall 2011 semester at a private university located in the southwest United
States. This inventory was given at the beginning and end of the semester. This
pre/post test problem-solving exercise was then used to determine the extent to which
strategy.
Computer anxiety was measured using the Computer Anxiety Rating Scale
(CARS) (Heinssen, Glass, & Knight, 1987). Modifications were made to several
of the items to allow them to reflect the modern use of technology. The CARS is a
The CARS has high internal consistency (α = .87), good test-retest reliability (r =
The third source of quantitative data was the assessment of the quality of the
students final projects. A panel of experts reviewed each students’ work and assess its
quality using a standardized grading rubric. This same panel will assess the quality
of work for both the students in the control and treatment groups. Prior to the
panel evaluating the student projects a test review was conducted to establish the
evaluation methodology and establish inter-rater reliability. The rubric for accessing
the student work was field tested during the fall 2011.
The fourth source of quantitative data came from assessment instruments used
in the teaching of CSI 3303. The CSI 3303 curriculum calls for weekly labs that
are designed to provide opportunities for the students to apply the computational
thinking problem solving strategies. During these weekly labs students were asked to
respond to a set of Likert scale survey questions designed to assess their current level
of perceived anxiety about the content being presented in the course. This survey
also assessed each students perceived level of efficacy in using computational problem
solving strategies.
38
Qualitative
The qualitative data for this study came from three data sources. First, semi-
structured interviews were conducted with each of the twenty-four participants in the
treatment group. The questions for this interview are listed below and are labeled
IQ1 through IQ13. These interview data were used to establish a base-line level
for comparison throughout the study. The second source of qualitative data came
from the weekly labs. Each week during the lab portion of the course, students were
These weekly surveys were supplemented by end of the semester course evaluations
that were conducted with each of the participants. The participants were informed
that their professor would not see these data until the course was completed and all
grades recorded.
At the beginning of the semester each participant in the treatment group partic-
these interviews.
• IQ5 How do you feel about the use of computers and computer technology?
• IQ7 Have you ever been afraid to use a computer because you thought you
39
• IQ10 What types of problems do you solve when using a computer?
• IQ12 Do you think there are some problems that can only be solved by com-
puters?
Table 3.1 shows the mapping of interview questions to the research question
they address. This mapping was used during the data analysis of the qualitative
strand of this research. The answers to these questions provide insight into the par-
ticipants’ attitudes towards and comfort level with the use of computers and computer
technology.
40
Intervention
developed through a NFS CPATH grant as the intervention. The purpose of this one-
who are not computer science majors. This course is intended to engage a broad
This new curriculum was developed through a NSF CPATH grant, over a one-
year period. Collaborators were solicited from departments across Baylor University,
the University of Mary Hardin Baylor, and Elon University. A key component of
this development effort was the faculty support from external (non-computer science)
in which the goals for the new course were explained in detail. The collaborating
faculty then spent time on their own thinking about what problems in their respective
fields would serve as good topics for a course in computational thinking. This initial
meeting was followed by a series of half-day workshops were the collaborators worked
to more fully develop their ideas and submit written problem statements. Finally,
the collaborating faculty were invited to give a short lecture to the students in the
computational thinking course about their content topic and computational problem.
This lecture provided background on the problem from the faculty member’s domain
in addition to providing specific details about the computational problem the class
would be solving during the weekly lab. Over the course of the semester the students
had lectures from several external faculty as the course covered different problem-
was used as the participants in this study. CSI 3303 is offered in both the fall and
41
were randomly assigned to treatment and control groups. The treatment group had
the course content modified to include several lessons taken from the computational
thinking curriculum, while the control group will use the traditional CSI 3303 cur-
riculum.
Procedure
After approval was obtained from the Baylor Universities Institutional Review
Board (IRB), the researcher asked a third party to solicit students from CSI 3303 to
participate in the study. At the beginning of the semester, all students in both the
treatment and comparison groups took the computational thinking problem solving
inventory (CTPSI) and the computer anxiety rating scale (CARS). During the first
lab of the first week, each student assigned to the treatment group also sign-up for an
interview which was conducted using a semistructured interview protocol. This type
of interview uses less structured open-ended questions during the interview (Merriam,
1997).
At the beginning, middle, and end of the semester all participants in the treat-
ment group took an on-line Likert scale survey to measure their perception of their
a problem solving strategy. These data were used to investigate how the participants’
were collected during the lab portion of the computational thinking course. In these
designed to elicit feedback on their attitudes toward computer science and computa-
tional thinking.
At the end of the semester, a panel of computer science faculty used a common
rubric to assess the quality of both the control and comparison groups final projects.
For this part of the study, the comparison group consisted of students enrolled in a
traditional introduction to computer science course (CSI 1430). These projects are
42
a traditional part of these courses and are designed to provide an opportunity for
Both the CTPSI and CARS were administered a second time, at the end of the
semester. And the pre/post data was then analyzed for evidence of the impact of the
thinking and the use of technology in problem-solving. The participants were in-
formed that their professor would not see these data until the course is completed
Data Analysis
Qualitative and quantitative data from the pre/post assessments, professor as-
sessments of products, survey, and interviews were analyzed to address the research
questions (see Table 3.2). The quantitative data in this research project were ana-
lyzed using the statistical software package SPSS 16. Four quantitative sources of
data were analyzed in this research project. First the pre/post test of the computer
anxiety index were analyzed for evidence of changes in computer anxiety within the
CSI 3303 (control) group and within the CSI 3303 (treatment) group using a one-
tailed paired-sample t-test. The G*Power software package was used to determine
that a moderate effect size of 0.55 will provide a power level of 0.8 given the sample
size of 22.
Next, a one-tailed paired-sample t-test was used to look for between group dif-
the treatment an control groups, a one-tailed paired-sample t-test was used to an-
alyze the pre/post test results. Before performing this analysis nuisance variables
such as major field of study, SAT scores, class rank and gender were examined to
43
determine that there was no statistical difference in these factors between the two
groups. Assumptions of normality was also tested before the analysis was performed.
tions were performed so that the data satisfied all the assumptions of the one-tailed
The third source of quantitative data is the results from the weekly Likert scale
surveys administered in the weekly labs. These surveys were analyzed for within and
The final source of quantitative data used in this study are the end of semester
course evaluations. These evaluations are required by the university and ask the
participants to rate the course, using a seven value Likert scale, on sixteen different
items. These items measure student satisfaction, student perceptions of the quality
of the course and instructor, and how well the course was organized. Again these
data were evaluated using a one-tailed paired-sample t-test looking for between and
The qualitative data in this research was analyzed by encoding the results using
the Microsoft Excel software package. This software application allowed the interview
data and responses to open-ended survey questions to be coded for patters of responses
that generated themes within the data (Creswell, 2006). Three sources of qualitative
data were analyzed in this study. First the transcripts from the initial interview were
analyzed to determine the participants initial attitudes about and familiarity with
the use of computers and computational thinking. The second source of qualitative
data was the weekly lab surveys. These data were analyzed for evidence of change in
the participants attitudes about CT and technology. Finally, end of semester course
After collecting and analyzing the data from the qualitative and quantitative
strands a metanarritive was constructed from these initial results (Freshwater, 2007).
44
Table 3.2. Relationship Between Questions, Instruments, and Data Analyses
Research Question Instrument Data Analysis
RQ1 pre/post Paired-Samples t-Test
RQ2 rubric/prof. comments Descriptive
RQ3 pre/post Paired-Samples t-Test
RQ4 open-ended survey, interview Excel
RQ5 open-ended survey, interview Excel
RQ6 open-ended survey, interview Excel
RQ7 combined Metanarrative
RQ8 combined Metanarrative
This narrative provided insight into the impact of teaching computational think-
ing that cannot be discovered through the use of either qualitative or quantitative
methodologies alone. In some instances the two sources of data complement each
other, strengthening the finding and functioning as validation of the results. In other
cases the two sets of data seem to disagree suggesting that the results are in some
way confounded.
The first dimension investigated through the mixed method phase of this study
was the participants attitude towards computational thinking. The second dimension
was the participants understanding of the nature of CT and the appropriate applica-
tion of CT to problem solving. The results of the mixed method phase are presented
in tabular form, with attitude and understanding on the vertical axis and evidence
Limitations
private university. There is some concern about the participants being candid with
the computer science department. Participants may tend to give answers that they
feel their professor wants to hear. To address this concern the participants were
informed that their professor would not see these data until the course was completed
45
and all grades recorded. An additional limitation is the relative homogeneity of the
participants. Any findings from this study will have to be validated by studies with a
more diverse population before any generalizations can be made (Creswell & Plano-
Clark, 2011).
Researcher bias is another potential limitation of this study. Because the prin-
spective as the potential to influence the researchers interpretation of the data. The
researcher was vigilant in the data collection and analysis process to recognize this
Conclusion
A convergent parallel mixed methods design is particularly well suited for inves-
and use of computational thinking as a problem solving strategy. In this design qual-
itative and quantitative data are collected and analyzed in parallel. Once the data
were analyzed they were merged through a process of comparison and integration
(Creswell & Plano-Clark, 2011). By using a mixed methods design a deeper under-
standing of how training in computational thinking impacts the learners’ attitudes and
2011). In the next chapter of this dissertation the data analysis and findings from
46
CHAPTER FOUR
Results
Introduction
acting with the world. The act of problem solving using the same strategies employed
by computer scientists can enable unique and highly efficient solutions to problems
that might not be otherwise solvable. This study focused on how formal training in
computational thinking influenced both the attitudes towards technology and anxiety
associated with using computers. Moreover, this study also examined the frequency
of computational strategies and the quality of the students’ solutions. This chapter
will initially describe the participants and subsequently address each of the research
questions.
Participants
southwest United Staes, during the 2012 spring semester. They were selected because
they were likely to have little past experience with technology and were majoring in
fields of study that were not technology centric. Of the 54 students registered for this
course 50 consented to participate in the study. Of the four who were not included in
the study one declined to participate and three enrolled after the first week of class.
Initially 24 students were randomly assigned to the treatment group and the
remaining students were left as the comparison group. During the first few days of the
semester there were several students who either added or dropped this course from
47
Table 4.1 shows the distribution of participants by gender, 28 of the participants
were females (10 in the treatment group and 18 in the comparison group) and 22
males (12 in the treatment group and 10 in the comparison group). The average SAT
score for the treatment group was 1161 and 1136 for the comparison group. A t-test
with an F = 0.307 and p = 0.529 showed that there was no statistically significant
difference between the treatment and comparison group with respect to SAT score.
A total of eleven different majors were represented in this sample with more diversity
of majors in the treatment group. Table 4.1 shows that the most popular major was
Health Science Studies with 62% of the participants. It is important to note that none
information systems, which traditionally have a heavy focus on the use of technology
for problem solving. The final descriptive statistic reported in Table 4.1, participant
academic classification, shows that no freshmen were included in the study. The
typical participant in this study was in their junior year of college. A similar number
These descriptive statistics suggest that the treatment and comparison groups
were substantially similar with respect to gender, major field of study and academic
sured by the SAT. For these reasons no nuisance variables were controlled for when
To better understand the participants’ current use of technology and their at-
titudes about technology, each member of the treatment group was interviewed at
the beginning of the semester. These interviews revealed that the participants have a
strong positive affect with respect to computers and computer technology. They use
computers and computer technology as a tool to assist with academic activities, such
as writing papers, conducting research, and doing homework. They also reported
48
Table 4.1. Participants
Comp. Group Treat. Group Total
Female 18 10 28
Gender
Male 10 12 22
Aviation Sciences 2 3 5
Biochemistry 1 0 1
English 0 1 1
Exercise Physiology 0 3 3
General Studies 3 0 3
Major Health Science Studies 21 10 31
Instrumental Music 0 1 1
Philosophy 1 0 1
Psychology 0 1 1
Recreation 0 2 2
Studio Art 0 1 1
Freshman 0 0 0
Sophomore 8 7 15
Classification
Junior 15 12 27
Senior 5 3 8
the used computers and technology for entertainment, watching television shows and
movies on Netflix, playing video games and listening to music. Technology was also
used for social activities, communicating with family and friends through video chat,
texting, and Facebook. Finally the participants used technology in their daily lives for
online banking and informing themselves about current events. When asked how fre-
quently they used computers or computer technology, the participants reported that
their use ranged from a low of once or twice a day to a high of almost continuously
throughout the day. The typical use of technology could reasonably be characterized
as frequent daily use. The participants rarely went an entire day without using a
computer. The participants also indicated a high level of comfort with their ability
49
Research Question 1: Do students who participate in formal training in
computational thinking increase the frequency of the use of computational strategies
in problem solving when compared to students who do not?
strategy the Computational Thinking Problem Solving Inventory (CTPSI) was given
to all participants at both the beginning and end of the semester. This instrument
was field tested during the fall 2011 term with 51 participants, 22 of the participants
had at least two years experience in using computational thinking as a problem solv-
ing strategy. A factor analysis of the CTPSI revealed that it loaded on a single factor
and the instrument’s reliability was established with a Cronbach’s alpha of 0.771.
The items on the CTPSI are independent of the content taught in the computational
thinking curriculum. They are designed to measure how well the participants are
applying general computational thinking strategies rather than measuring how well
Of the fifty participants forty-nine took both the pretest and posttest CTPSI.
On the pre-test CTPSI two participants were missing one item each and on the post-
test two participants were missing one item each. Because the missing data represents
less than ten percent of the data, it was replaced with the series mean. Normality of
the data was verified using a Zskewness and Zkurtosis statistic with a threshold of
±1.95, shown in Table 4.2 (Hair, Black, Babin, & Anderson, 2010).
The pre-test and post-test CTPSI data were analyzed using a one-tailed paired-
sample t-test. The results of this analysis are reported in Table 4.3. These results
50
indicate that the comparison group did not show a statistically significant change in
While the treatment group showed a statistically significant increase on the CTPSI
with a t = 1.793 and a p = 0.044. These results suggests that formal training in
The culminating experience for the treatment group in CSI 3303, Information
the 22 students in the treatment group, 15 chose to write a computer program, the
other 7 students chose to use an existing computer application to solve some com-
effects solution quality, the programs created by the treatment group were compared
science course. It should be noted that a self-selection bias exists in the treatment
group. Only those students who chose to write a program had their work evaluated
for quality. This bias, however, is substantially mitigated because all of the students
science course.
To measure the quality of the students’ programs, a rubric was used to score each
and efficiency. Correctness is the degree to which the program successfully solves the
51
segment, could be used to solve some other computational problem. Readability is a
measure of how easy it is to read and understand the code. Documentation refers to
the extent to which comments were placed in the code to explain how the program
works and to aid in understanding what the program is doing. Finally, efficiency is a
measure of how well the program used the computing resources to solve the problem.
Efficiency refers to both time efficiency, how much processing power was used, and
space efficiency, how much memory was used. Each of these criteria was rated on a
scale from zero (0) to four (4). To control for any bias on the part of the researcher;
assisted with rating the quality of the participants’ solutions. To establish interrater
coefficient of 0.816 was obtained from an initial test of the grading rubric.
To measure the quality of the participants work, each of the fifteen (15) pro-
grams submitted by the participants were graded by both the researcher and another
researcher from the computer science department. A randomly selected set of twenty
used as the comparison group. The obtained interrater reliability for the assessment
used in this study was 0.842. Table 4.4 shows the results of the average score given
The average score for the treatment group was 11.14 out of 20 possible points,
while the average score for the comparison group was 11.45 out of 20 possible points.
Of the five criteria, correctness, readability, and documentation are the most im-
portant, because they are the criteria given greatest emphasis when teaching new
programmers. The treatment group scored slightly higher on correctness and read-
differences were found in any of the grading criteria, or in the total score earned by
52
Table 4.4. Program Quality
Criteria Group Mean Std. Dev. d t test Significance
Treatment 3.1 0.9 0.25 0.693 0.813
Correctness
Comparison 2.8 1.46
Treatment 1.89 0.66 0.20 0.556 0.582
Documentation
Comparison 2.05 0.90
Treatment 2.32 0.42 0.13 0.391 0.699
Readability
Comparison 2.23 0.85
Treatment 2.07 0.385 0.33 0.884 0.383
Efficiency
Comparison 2.30 0.909
Treatment 1.75 0.75 0.43 1.210 0.235
Reusability
Comparison 2.08 0.78
Treatment 11.14 2.47 0.08 0.239 0.813
Total Score
Comparison 11.45 4.33
each group. This finding suggests that students who participate in formal training
troductory computer science students. Given that the students in the computation
thinking course were non-computer science majors, this performance is notable. Table
4.4 shows the results of the average score given to both the treatment and comparison
group.
computer anxiety, the Computer Anxiety Rating Scale (CARS) was administered to
both the treatment and comparison groups at the beginning and again at the end of
the semester. Forty-nine of the 50 participants took both the pre and post CARS
test, 22 from the treatment group and 27 from the comparison group. In the pre-test
two participants were missing one item each and in the post-test three participants
were missing one item and one participant was missing two items. These missing
data were replaced with the series mean. Normality of the data was verified using a
53
Table 4.5. Computer Anxiety
Group N Pre Post t p d Corr Power
Comparison 27 48.11 40.20 6.375 0.001 1.22 0.798 0.99
Treatment 22 46.38 37.73 6.100 0.001 1.3 0.691 0.99
Combined 49 47.33 39.09 8.902 0.001 1.27 0.761 1.00
Zskewness and Zkurtosis statistic with a threshold of ±1.95 (Hair et al., 2010).
Table 4.5 shows that there was a statistically significant reduction in computer
anxiety for the combined sample with a p-value of 0.001 and an achieved power of 1.00.
When the treatment and comparison groups were analyzed separately, both groups
and a large effect size of 1.22 for the comparison group and 1.30 for the treatment
increased reduction in computer anxiety. However, this impact was not statistically
significant.
items were included in the lab survey that asked the participants about the impor-
Table 4.6 shows that the participants agreed that being able to solve math problems
with Python was an important skill. Although the median response was consistently
7.5 (agree) throughout the semester, there was an increase in the mode. At the begin-
ning of the semester the most common response to the importance of using Python to
solve math problems was neutral (5), midway through the semester the response be-
came trimodal (5,8,10) with a clear shift towards agreeing that solving math problems
54
with Python was an important skill. By the end of the semester, the most common
be able to write programs using Python. Both the median and mode for this item
remained neutral throughout the semester. There was only a slight shift towards
Two additional survey questions asked about the importance of writing JavaScript
and writing macros for Photoshop. Table 4.6 shows that the participants were neutral
with respect to the importance of writing JavaScript but agreed that being able to
These findings suggest that the participants’ attitudes about the importance of
the skills being taught in this course changed over time when the skill related to using
Python as a tool. However, when asked about using either Python or JavaScript
to create tools, used in problem solving, the typical participant felt neutral about
the importance of these skills. It seems that the participants find value in using
computational tools to assist in problem solving but are neutral when asked about
Another set of questions included on the lab survey asked the participants to
rate their enjoyment of the computational problem solving activities used during the
semester. Table 4.7 shows that when asked about using Python to solve simple math
problems, the median response fell throughout the semester. Although the majority
of the participants consistently reported that they enjoyed using Python to solve math
problems, there was a group of participants who found the activity increasingly less
that the activity became less novel each time the activity was performed.
55
Table 4.6. Lab Survey Questions About Importance
Question Time N Mode Median SQR Disagree Neutral Agree
Beginning 22 5 7.5 2.0 14% 23% 64%
Being able to solve simple math problems with
a computer is an important skill. Middle 20 5,8,10 7.5 2.0 10% 20% 70%
End 22 10 7.5 2.125 10% 15% 75%
Beginning 22 5 5 2.0 27% 27% 45%
56
a computer animation. The majority of the participants reported enjoying this ac-
tivity, but the percent of participants reporting that they enjoyed creating animation
The third survey question relating to enjoyment asked the participants to re-
spond to the prompt: I enjoy using Python to write programs. At the beginning of
the semester the typical response was neutral. However, as the semester progressed
there was a slight increase in agreement with this statement. Although there was a
slight decrease in enjoyment of the repeated tasks, when asked about using python
Two final survey questions asked the participants to rate their enjoyment of
using JavaScript to create web pages and writing macros for Photoshop. In both of
these survey questions the participants found these activities enjoyable. Table 4.7
shows that 86% of the participants found writing macros for Photoshop enjoyable
with none of the participants reporting that this activity was not enjoyable.
in solving computational problems was found in the free response items of the lab
survey and the end of semester course evaluations. On the survey taken near the
beginning of the semester only one of the participants self-reported that they had
used Python to solve a problem outside of class. Response (605) “Yes, but just as
a calculator.” By the end of the semester three participants self-reported that they
had used Python for a task not associated with the class. Response (1477) stated,
“yes, tax return (I just used the simple math functions)”. Five participants reported
not using Python outside of class but used the word “yet” to qualify their response.
They stated that they had not “yet” used Python outside of class. This seems to
suggest that they can see themselves using Python at some point in the future.
57
Table 4.7. Lab Survey Questions About Enjoyable
I enjoy using Python to write programs. Middle 20 7 6 1.0 20% 15% 65%
At the beginning, middle and end of the semester, the participants in the treat-
ment group were asked to complete a survey about the course and the use of com-
putational thinking. Because the survey was repeated throughout the semester it is
possible to compare the students responses over time. The survey questions used a
Likert scale from zero (0) to ten (10) with zero indicating Strongly Disagree and ten
The questions about feeling nervous seem to be the most relevant when in-
vestigating anxiety. Table 4.8 shows the treatment group’s response to the prompt,
“Solving simple math problems with Python makes me feel nervous.” The treatment
group had an initial median response of 2.5, indicating that as a group they did not
feel nervous about using a computer to solve simple math problems. It is interesting
to note that the treatment groups median response dropped each time it was mea-
sured indicating that they were increasingly less nervous about using a computer to
End 22 0 1 2.125
59
Table 4.9. Nervousness: Math Problems vs. JavaScript and Photoshop Macros
Pair N Z p
Math Prob vs JavaScript 22 -3.575 0.0004
Math Prob vs Photoshop Macro 22 -3.610 0.0003
Python makes me feel nervous, is shown in Table 4.8. Although the level of self-
reported nervousness is higher, the median response drops throughout the semester
Two additional items about nervousness were also asked three times during the
semester.
The response to each of these items was shifted slightly towards disagree but
did not show a pattern of gradually decreasing (or increasing) over time.
Two final nervousness items were only asked once, because they related to
instructional activities that occurred near the end of the semester. These two items
were:
• Creating the JavaScript program for a web page makes me feel nervous.
feel nervous.
Table 4.8 clearly shows that the level of nervousness was significantly higher
for the activities encountered towards the end of the semester. A Wilcoxon Signed
Ranks Test, reported in Table 4.9, was used to verify that the level of nervousness was
statistically significant (p < 0.001) higher when compared to the level of nervousness
associated with using the computer to solve math problems or create animations.
60
Table 4.10. Lab Survey Questions Comfortable
Question Time N Mode Median SQR
Beginning 22 10 10 1.0
I am comfortable using a computer to solve
simple math problems. Middle 20 10 10 1.0
End 22 10 9 1.0
Beginning 22 4 6.0 1.25
I am comfortable using a computer to create
animation programs. Middle 20 7 6.5 1.5
End 21 5 6.0 1.25
I am comfortable using a computer to create
a JavaScript programs in a web page. End 22 5 5 1.625
I am comfortable using Photoshop to create
rules/actions for batch processing of graphics. End 22 1 4 1.75
vous, survey questions were also asked about the level of comfort when solving com-
putational problems. Table 4.10 shows that the participants felt comfortable, with
a median response of 10 (strongly agree), solving math problems with Python. This
question was asked three times during the semester and over that time there was no
Table 4.10 shows that the participants remained consistent throughout the
semester. Their initial median response was six (6), which suggest that the typical
participant slightly agreed that they were comfortable writing animation programs in
Python. The level of comfort related to solving simple math problems with Python
did not change throughout the semester. This question was also asked three times
during the semester and over that time there was no significant change in their re-
sponse.
Table 4.10 shows the comfort level with respect to writing JavaScript and writ-
ing macros for Photoshop. These were the more complex tasks that were presented
at the end of the semester. In addition to being complex because they were intro-
duced at the end of the semester there was a limited amount of time to practice these
skills. The median response for JavaScript was five (5), indicating that the typical
participant neither agreed nor disagreed with the statement: I am comfortable writ-
61
Table 4.11. Lab Survey Questions Assistance
Question Time N Mode Median SQR
Beginning 22 6 6 2.125
I believe I could make another Python
animation program without assistance. Middle 20 4 5 2.375
End 22 4 4 2.125
I believe I could make another JavaScript
program without assistance. End 22 6 6 1.5
I believe I could use Photoshop to make
another rule/action for batch processing of End 22 6 6.5 1.25
graphics without assistance.
ing JavaScript. The median for the Photoshop macro was four (4), which indicates
that the typical participant was slightly uncomfortable writing Photoshop micros.
Another set of survey questions asked the participants to rate their ability to
shows the response to the survey question: I believe I could make another Python
animation program without assistance. This chart shows that at the beginning of
the semester the median response was a six (6) indicating that the typical student
in the treatment group slightly agreed that they could write a Python animation
program without assistance. Each time this question was asked the median response
decreased, indicating that the participants increasingly believed that they could not
create a Python animation program without assistance. By the end of the semester
the median response was four (4) indicating a slight disagreement with the statement.
Table 4.11 shows the participants response when asked the same question about
creating a JavaScript program or writing macros for Photoshop. The chart indicates
that the typical participants slightly agree that they could repeat these tasks without
assistance. Again these were the lessons presented toward the end of the semester
and were typically more complex with a limited amount of time for practice.
62
Metanarrative
To answer the final two research questions (RQ7 and RQ8) evidence from the
first dimension investigated through the mixed method phase of this study is the
mixed method phase are presented in Table 4.12, with attitude and understanding on
the vertical axis and evidence from the qualitative and quantitative strands on the
horizontal axis.
impact the learners’ attitudes towards the use of computational strategies in problem
solving? can be answered by combining the findings from the qualitative and quan-
titative strands, reported in Table 4.12. Both the strands show that initially the
participants were nervous about using computational tools for solving problems. At
the beginning of the semester the qualitative strand revealed that the participants
felt some anxiety about their ability to use computational thinking as a problem
solving strategy. This finding is strengthened by the qualitative strand that showed
feeling nervous and had anxiety about using computational tools, like Python, to
frequently each day, they did not report that they solved problems with computers
that required them to use computational thinking. The types of problems solved
of anxiety dropped and their ability to identify computational problems and apply
computational thinking to problem solving increased. By the end of the training, the
63
Table 4.12. Mixed Methods Data
64
participants reported that they enjoyed using computational tools in problem solving.
They also indicated that they felt this was an important skill and there was evidence
that some of the participants would use these new skills in their personal lives. Re-
search question eight: How does formal training in computational thinking impact
can also be addressed by combining the qualitative and quantitative data reported
in Table 4.12. The qualitative strand showed a shift in the participants’ belief that
they could use Python to create a computer animation without assistance. They
also reported that they felt confident that they could use computation as a problem
tional Thinking Problem Solving Inventory (CTPSI) score. The CTPSI measures the
ing strategy. Additional quantitative evidence suggests that the participants were
able to create quality computational solutions at the same level as introductory com-
puter science students. Taken together the two stands provide strong evidence that
Conclusion
argument can be constructed about the impact of this type of training. The data
suggests that the participants in this study increased their understanding of compu-
tational thinking. They were able to solve problems in ways that were not available to
and ability to apply, computational thinking, there was also a shift the participants
65
attitudes about computational thinking. The participants reported an increased the
66
CHAPTER FIVE
Conclusions
Significance
find any facet of a technology rich society, that has not been impacted by computers
or computer technology. The personal computer, cell phones, cash registers, home
entertainment equipment and even automobiles all use a digital computer. In this
technology rich environment problem solving is enhanced if the problem solver can
think computationally, looking for ways that problems can be solved from a compu-
just those who use digital technology (Wing, 2006). Computational thinking offers
fresh insights into ways of seeing problems and provides new ways to solve problems
Three critical skills needed for competent participation in a modern society are
the ability to use basic computer applications often described as computer literacy,
a high level understanding of the workings of a computer system and the ability to
a technologically advanced society, citizens who lack a solid foundation in, and un-
computers can solve and when and how technology can be appropriately applied to
make their lives easier and increase the quality of the human experience (Wing, 2008).
67
The importance of computational thinking has been evident in the sciences
for some time. More recently, however, the importance of computational thinking
as a problem solving skill has begun to impact a much broader range of academic
and professional fields, and even the personal lives of individuals living in a world
early age and with increased frequency (Lu & Fletcher, 2009). At the same time that
the ability to use computation in problem solving is increasing in its importance, the
United States (Bureau of Labor Statistics, 2007). The Bureau of Labor and Statistics
estimates that the number of computer science jobs in the United States will increase
by 29.2% during the ten-year period from 2006 to 2016 (Bureau of Labor Statistics,
2007). While the same time that the number of students studying computation is
decreasing, the demaind for this skill set is grwoing dramatically. One potential
number of students who select computer science as their undergraduate major field
of study.
Research Questions
mixed method study. The three qualitative and three quantitative questions were
the data were collected and analyzed each of the six research questions were answered.
The findings from answering these initial research questions were then used to con-
struct a metanarrative. This metanarrative was then used to answer the final two
68
strategy. The three quantitative research questions were:
RQ4. In what ways does formal training in computational thinking change attitudes
RQ5. In what ways does formal training in computational thinking change computer
RQ6. In what ways does formal training in computational thinking change the
structed from the findings from the first six questions looked at attitudes and under-
standing of the participants with respect to computational thinking. The two mixed
RQ7. How does formal training in computational thinking impact the learners’
RQ8. How does formal training in computational thinking impact the learners’
69
The next section of this chapter takes a closer look at the key concepts investigated
in this study.
Major Concepts
This convergent parallel mixed method research study takes a pragmatic onto-
logical world view. This ontological perspective acknowledges the existence of a single
reality with multiple interpretations of that reality (Creswell & Plano-Clark, 2011).
the assertion that there is one reality and constructivist because reality is interpreted
Kolb’s Experiential Learning Theory (ELT) is used to frame this research. ELT
differentiates itself from other cognitive learning theories through its emphasis on
experience . The ELT holds that learning takes four distinct forms. Two modes
(AC), and two modes of transforming experience, Reflective Observation (RO) and
learning cycle the learner is presented with a problem. The instructor then demon-
strates how to construct a solution to this problem and then similar problems are
presented providing the learner with opportunities to practice their problem solving
strategy.
to a given problem type. The presentation of each example problem is the concrete
experience (CE) that provides an opportunity for reflective observation (RO). Once
these RO are assimilated into an abstract concept the learners can form an abstract
hypothesis (AH) that will be used during the active experimentation phase of the
learning cycle, realized when each learner solves new problems on their own. Using
70
the theoretical framework provided by ELT embedded in a pragmatic world view, the
the influence of this type of training on the participants computer anxiety and their
may not, require the use of a computer to solve problems using this problem solving
strategy. Computational thinking is a way of thinking that uses concepts and strate-
als avoid learning about them in part because of computer anxiety (Heinssen et al.,
1987). Computer anxiety is a distinct construct that can be defined as fear or ap-
prehension when using or considering using a computer (Leso & Peck, 1992). This
type of fear may contribute to individuals’ avoiding the use of computers in problem
solving preventing them from learning to think computationally. This type of anxiety
may also cause individuals to develop a negative affect about the use of technologies
they fear and feel they do not, or cannot, fully understand. How formal training in
computational thinking impacts both anxiety and attitude is discussed in the next
section.
Results
the 2012 spring semester. They were selected because they were likely to have little
experience using computational thinking as a problem solving strategy and were ma-
joring in fields that did not require a deep understanding of how computers work or
how to program computers. Of the 54 students registered for the course 50 consented
to participate in the study. One student declined to participate in the study and the
71
other students not included in the study registered for the course after the first week
of classes.
Initially 24 students were randomly assigned to the treatment group and the
remaining students formed the comparison group. During the first few days of the
semester several students either added or dropped this course from their schedule.
and comparison groups were substantially similar with respect to gender, major field
of study and academic classification. There was also no significant difference in aca-
demic aptitude as measured by the SAT. For these reasons no nuisance variables were
to all participants at both the beginning and end of the semester to investigate how
and post-test CTPSI data were analyzed using a one-tailed paired-sample t-test. The
results of this analysis revealed that the treatment group had a statistically significant
increase in their CTPSI score, while the comparison group did not. The comparison
group also had an overall increase in their CTPSI score but the increase was not
statistically significant. The results of the analysis suggest that formal training in
The culminating experience for the treatment group in the Information Tech-
the 22 students in the treatment group, 15 chose to write a computer program, the
other 7 students chose to use an existing computer application to solve some com-
72
affects solution quality (RQ2), the programs created by the treatment group were
computer science course. To measure the quality of the participants work, each of the
15 programs submitted by the participants was graded by both the researcher and a
second researcher from the computer science department. A randomly selected set of
was used as the comparison group. No statistically significant differences were found
in any of the grading criteria, or in the total score earned by each group. This finding
students. This result is notable given that the students in the computational thinking
The Computer Anxiety Rating Scale (CARS) was administered to both the
treatment and comparison groups at the beginning and again at the end of the
computer anxiety (RQ3). Both the treatment and comparison groups showed a sta-
tistically significant reduction in computer anxiety with the treatment group having a
slightly larger reduction in computer anxiety. This finding suggests that participating
several items were included in the repeated lab surveys that asked the participants
lem solving strategy. Additional insight into the participants’ attitudes was gained
A careful analysis of the survey responses showed that the participants attitudes
use computational tools in problem solving. However, when asked about using either
Python or JavaScript to create problem solving tools, the typical participant felt
neutral about the importance of these skills. It seemed that the participants found
value in using computational tools to assist in problem solving but were neutral when
asked about the importance of creating computational tools for problem solving.
Another set of questions included on the lab survey asked the participants to
the majority of participants consistently reported that they enjoyed using Python
to solve math problems, a group of participants found the activity increasingly less
that the activity became less novel each time the activity was performed. Although
there was a slight decrease in enjoyment of the repeated tasks, the participants seem
to enjoy the activity, when asked about using python to create tools. When asked
about their enjoyment when solving computational problems only once, 86% of the
participants found them enjoyable with none of the participants reporting that this
in solving computational problems was found in the free response items of the lab
survey and the end of semester course evaluations. On the survey taken near the
beginning of the semester only one of the participants self-reported that they had
used Python to solve a problem outside of class. By the end of the semester three
participants self-reported that they had used Python for a task not associated with
the class, and five participants reported not using Python outside of class, but used
the word “yet” to qualify their response. They stated that they had not “yet” used
Python outside of class. This seems to suggest that they can see themselves using
74
To investigate the participants level of anxiety associated with using computa-
tional thinking as a problem solving skill (RQ5), several items were included in the
repeated lab surveys that asked the participants to respond to questions about feeling
nervous while solving problems requiring the use of computational thinking. To cross
validate the items asking about feeling nervous, a second set of questions were asked
about the same activities but asked the participants to rate their level of comfort in
The treatment group’s median response, when asked about being nervous when
using computational thinking, dropped each time it was measured indicating that
they were increasingly less nervous about using computational thinking for problem
solving. This finding complemented other results that showed participants became
increasingly comfortable using computational thinking when they were asked to solve
problems similar to ones they had previously solved. There was some evidence of
a lower comfort level at the end of the semester when the participants were solv-
ing the most complex problems presented during the semester and did not have an
A final set of questions asked on the repeated lab survey was designed to de-
(RQ6). As the semester progressed the participants increasingly believed that they
could successfully apply computational strategies that they previously did not pos-
sess at the beginning of the semester. By the end of the semester they agreed slightly
that they could successfully apply computational problem solving strategies to the
types of problems presented during the first half of the semester. For more complex
problems presented toward the end of the semester, the typical participants believed
that they would need some assistance to successfully apply a computational problem
solving strategy. This is not unexpected given that these problems were presented
toward the end of the semester and were typically more complex and the participants
mixed methods research study, a metanarrative was constructed to answer the final
two research questions. By combining evidence from both strands a more complete
titudes of the participants was developed. Research question seven (RQ7) asks: How
does formal training in computational thinking impact the learners’ attitudes towards
that at the beginning of the study the participants were nervous and self-reported
having anxiety about using computational tools for solving problems. Although the
participants reported using computers frequently, they were not using computers to
solve problems requiring the use of computational thinking. The types of problems
activity. By the end of the training, the participants reported that they enjoyed using
computational tools in problem solving. They also indicated that they felt this was an
important skill with evidence indicating that some of the participants would use these
new skills in their personal lives. This finding suggests that formal training in compu-
tational thinking has a positive impact on the attitudes of the participants, reducing
their computer anxiety and improving their affect towards the use of computational
Finally, research question eight (RQ8) looked at the impact of formal training
application to problem solving. The data collected in the qualitative strand revealed
participants that they could use Python to create a computer animation without as-
76
dence suggests that the participants were also able to create quality computational
Taken together the two strands provide strong evidence that students who partici-
supports the finding that formal training in computational thinking both improves
solving strategy. In the next section of this dissertation these relationship of these
Discussion
The literature reviewed for this study provided a working definition of com-
putational thinking in addition to providing the motivation for this research. The
informed by findings drawn from the current body of knowledge in the area of com-
putational thinking. Finally, evidence was discovered about the impact of formal
A review of the literature suggests that the ability to use computational think-
ing as a problem solving strategy is an important skill in any modern society. This
critical skill for the competent participation in a modern society (Settle & Perkovic,
2010). This problem solving strategy offers fresh insights into ways of seeing problems
in the physical, social and theoretical domains (Settle & Perkovic, 2010) and provides
new methods for solving problems that were previously unavailable or impractical
due to human limitations (Allan et al., 2010; Curzon et al., 2009; Qin, 2009b). Prob-
lem solving using computational thinking seeks to create knowledge rather than just
77
simply using information (Adams, 2008; Denning, 2009). This research sought to dis-
cover effective ways to teach computational thinking and measure the impact of this
type of instruction on both the attitudes of the participants towards the use of com-
thinking requiring the problem solver to simultaneously think at multiple levels of ab-
become more complex, the use of abstraction becomes increasingly important (Aho,
2011). The two key attributes of abstraction that must be considered when using
computational thinking as a problem solving strategy are the process of leaving out
Two studies, Qin (2009) and Howell (2011) provided evidence about the impact
2009b) and (Howell et al., 2011). These two studies found that integrating compu-
tational thinking had a positive influence on the participants’ attitude towards the
understanding of this problem solving strategy. The evidence from the literature was
rigor, no evidence could be found about the impact of formal training in computa-
78
This study had similar findings that formal training in computational thinking
tends to reduce computer anxiety, increase the participants’ ability to properly use
the participants attitude towards the use of computational tools in problem solving.
Moreover, the findings in this study are supported by a rigorous experimental model
There is relatively little evidence in the literature about the impact of formal
about the impact of anxiety of student performance in the closely related field of
mathematics . Hembreem (1990) found that both behavioral and cognitive treat-
ments were effective in reducing math anxiety. The reduction in math anxiety is
1990). This study found that formal training in computational thinking reduced the
semester progressed the participants increasingly believed they could successfully ap-
ply computational problem solving strategies to the types of problems presented dur-
ing the first half of the semester. It is also reasonable to speculate that the improved
Evidence from this study also showed that the participants’ attitude toward the
As the training progressed, the participants increasingly believed that their ability
Again, there is little evidence in the literature relating to the perceived importance
research.
79
The evidence from the literature suggests that formal training in computational
problem solving (Repenning et al., 2010). Similar results were found in this study.
particularly true with the simpler problems presented at the beginning of the course.
The participants reported that the more complex problems presented toward the end
of the semester were less enjoyable. This may be due to the limited amount of time
solving strategy. Not only did the participants ability to correctly apply computa-
tional strategies in problem solving increase, but the quality of their solutions were
not surprising, given the reduction in anxiety and the improvement in the quality
positive attitude toward the use of computational thinking as a problem solving strat-
egy. This finding is similar to the results reported by Howell et at. (2009) and Qin
problem solving strategy. At the end of the semester each of the 22 participants’
was required to select a computational problem, not discussed in class, and create a
computational solution for the problem. Each of the participants successfully demon-
strated the ability to use computational thinking to solve a unique problem from a
lected a problem related to their major field of study. Fifteen of the 22 participants
80
chose to write a program to solve their problem. The final projects were of similar
the beginning of the semester, several sample programs were presented by the instruc-
tor. As the program was developed, each participant was asked to follow along and
create the same program. On several occasions after completing the demonstration
a participant would comment that they had typed the exact same code but got a
different result. A pattern of misunderstanding was identified, the students did not
understand that the order of the instructions was important. After clarification and
were all frequent and competent users of technology for information gathering, en-
or even understand how to begin the problem solving process. By demonstrating this
process, and having the participants follow along at their own computers, the partic-
ipants were quickly able to reproduce the solutions demonstrated by the instructor.
The next step was to have each participant use the new problem solving strategy
to solve a similar problem and finally to transfer this problem solving strategy to a
new domain. This type of experiential learning proved to be an effective method for
Theory.
81
An unexpected finding was that many of the participants did not understand
that the order of instructions in an algorithm was a critical attribute. The researcher
was surprised to discover many of the participants becoming frustrated when there
computational solutions (programs) would not work. They believed that they had
accurately replicated the example presented in class, but were getting a different re-
sult. When their work was examined, it was discovered that they had typed each
instruction correctly but had altered the order of the instructions in the program.
The participants lacked a deep understanding of one of the most fundamental prin-
ciples of an algorithm, the order in which the instructions are executed is critically
important. Since observing this phenomenon in the treatment group of this study
the researcher also discovered the same misunderstanding within a small subset of
traditional introductory computer science students. After making there error clear to
the learner the mistake is quickly corrected. This finding has important implications
to problem solving. Additionally, the participants reported enjoying the use of com-
was evidence the participants were able to transfer computational problem solving
strategies to new problem domains. It is clear from these findings that formal train-
82
Limitations
convenience sample used to select the participants. The lack of random sampling
from the population of all non-technical undergraduate majors limits the ability to
generalize the results of this study. This limitation was somewhat mitigated by the
A second notable limitation of this research is the fact that the principal re-
searcher was also the professor of record for the treatment group. Specific steps were
taken to control for this limitation. A third party was used to inform the partici-
pants about the study and to obtain their informed consent. To help control for bias
caused by a desire to please the researcher, participants were not informed that their
professor was the principal investigator until after all the data had been collected.
This study is also limited by threats to the validity and reliability in both the
qualitative and quantitative strands. Within the qualitative strand validity is the
extent to which the results seem plausible. Triangulation was used to ensure that
the qualitative results were valid. Qualitative data were collected from interviews,
frequent lab surveys, the course evaluations, the researcher’s observations, and the
participants’ computational solutions. Using evidence from all of these sources pro-
vided an effective method for establishing the validity of the qualitative findings.
This study is also limited by the validity and reliability of the instruments
used to collect data about the participants. The validity of the Computer Anxiety
Rating Scale (CARS) was established through the literature. This instrument was
first published in 1987 and has been validated by numerous studies over the past
developed specifically for this study. A panel of computer scientists reviewed this
instrument to establish its face validity. This instrument was also field tested in the
fall of 2011 to establish its reliability. A third source of quantitative data was collected
83
through the evaluation of the participants projects. These projects were evaluated by
two different computer science professors’ who had a high level of interrater reliability.
The reliability of the CARS was established through the published literature. This
instrument has an alpha of 0.87 and test-retest reliability with an r = 0.70. The
CTPSI has acceptable reliability with a Cronbach’s alpha of 0.771. The reliability
of the qualitative data was established by triangulating the data and collecting data
grounded using Kolb’s Experiential Learning Theory (ELT). It is assumed that this
theory is sound based on evidence found in the literature. ELT provides a rich and
descriptive theoretical framework for this study; however, no theory can be completely
correct.
Future Work
Interest in computational thinking has increased significantly over the past sev-
eral years; however, there is still a relatively small body of research focused on this
topic. There are no known published instruments that measure this construct. The
Computational Thinking Problem Solving Inventory (CTSPI) may in fact be the first
items need to be developed and tested to improve both the reliability and validity of
the CTPSI.
thinking has significant benefits. For this reason, the curriculum used in this study
to be created that are designed to teach public school and university level educators
about effective strategies for teaching this content. This researcher envisions offering
84
solving strategy. There seems to be a particularly good fit for this type of problem
veloped to address varying levels of difficulty and the diverse interests of individuals
who might benefit from this type of training. The current collection of modules was
for all levels of the public school system. To realize the greatest possible benefit
This study asked the participants about problem solving as individuals. Two
tigated. The first question would investigate the participants confidence that they
investigates how comfortable they would feel working in this type of group. Addi-
tional question one: Do you feel you could contribute to an algorithmic problem-
nars for both students and teachers. One potentially powerful training model would
be to have the participants, either public school teachers or education majors, help
Conclusion
This work extends the body of knowledge about computational thinking in sev-
eral important ways. First it confirms the anecdotal evidence through a rigorous
experimental model. This study showed that formal training in computational think-
85
ing reduces computer anxiety and increases the participants’ ability to correctly use
computational thinking as a problem solving strategy. This study also showed that
attitude towards the use of computational thinking. The participants in this study
reported enjoying solving problems using computational thinking, felt that this was
an important skill, and increasingly believed that they could solve problems using
86
APPENDICES
87
APPENDIX A
Computational Strategies
INSTRUCTIONS:
Please read each item below and respond to it by choosing one of the responses
on the scale from (1) to (5), where (1) = strongly disagree and (5) = strongly agree.
Do not write in numbers between these choices, only numbers 1, 2, 3, 4, or 5 are options.
I feel insecure about my ability to interpret a computer printout. (1) (2) (3) (4) (5)
I look forward to using a computer on my job. (1) (2) (3) (4) (5)
The challenge of learning about computers is exciting. (1) (2) (3) (4) (5)
I am confident that I can learn computer skills. (1) (2) (3) (4) (5)
Anyone can learn to use a computer if they are patient and motivated. (1) (2) (3) (4) (5)
Learning to operate computers is like learning any new skill–the more (1) (2) (3) (4) (5)
I am afraid that if I begin to use computers I will become dependent (1) (2) (3) (4) (5)
I am sure that with time and practice I will be as comfortable working (1) (2) (3) (4) (5)
I feel that I will be able to keep up with the advances happening in (1) (2) (3) (4) (5)
I dislike working with machines that are smarter than I am. (1) (2) (3) (4) (5)
I feel apprehensive about using computers. (1) (2) (3) (4) (5)
88
I have difficulty in understanding the technical aspects of computers. (1) (2) (3) (4) (5)
It scares me to think that I could cause the computer to destroy a (1) (2) (3) (4) (5)
I hesitate to use a computer for fear of making mistakes that I cannot (1) (2) (3) (4) (5)
correct.
You have to be a genius to understand all the special keys contained (1) (2) (3) (4) (5)
If given the opportunity, I would like to learn about and use com- (1) (2) (3) (4) (5)
puters.
I have avoided computers because they are unfamiliar and somewhat (1) (2) (3) (4) (5)
intimidating to me.
I feel computers are necessary tools in both educational and work (1) (2) (3) (4) (5)
settings.
89
APPENDIX B
Computational Thinking Problem Solving Inventory (CTPSI)
INSTRUCTIONS:
Please read each item below and respond to it by choosing one of the responses
on the scale from (1) to (5), where (1) = strongly disagree and (5) = strongly agree.
Do not write in numbers between these choices, only numbers 1, 2, 3, 4, or 5 are options.
I think I will enjoy the class lecture. (1) (2) (3) (4) (5)
I think I will learn a great deal from the class lectures. (1) (2) (3) (4) (5)
I believe that my overall impression of the class lecture will be posi- (1) (2) (3) (4) (5)
tive.
I think I will enjoy the weekly labs. (1) (2) (3) (4) (5)
I think I will learn a great deal from the weekly labs. (1) (2) (3) (4) (5)
I believe that my overall impression of the weekly labs will be posi- (1) (2) (3) (4) (5)
tive.
I think I will enjoy the weekly programming assignments. (1) (2) (3) (4) (5)
I think I will learn a great deal from the weekly programming assign- (1) (2) (3) (4) (5)
ments.
I believe that my overall impression of the weekly programming as- (1) (2) (3) (4) (5)
I feel that I will be able to keep up with the advances happening in (1) (2) (3) (4) (5)
90
INSTRUCTIONS:
Please read each item below and respond to it by choosing one of the responses
on the scale from (1) to (5), where (1) = Difficult to solve with a computer and (5) = Easy
Do not write in numbers between these choices, only numbers 1, 2, 3, 4, or 5 are options.
Calculating the average of a set of numbers. (1) (2) (3) (4) (5)
Counting the number of people in a building. (1) (2) (3) (4) (5)
Determining the best path between two cities. (1) (2) (3) (4) (5)
Making the employee schedule for a large manufacturing plant. (1) (2) (3) (4) (5)
Designing the master schedule for a large high school. (1) (2) (3) (4) (5)
Evaluating the quality of a work of art. (1) (2) (3) (4) (5)
Finding the path out of a maze. (1) (2) (3) (4) (5)
Calculating the gross pay for an hourly worker. (1) (2) (3) (4) (5)
91
Rank Program difficulty
The following pages contain 5 programming assignments. Please read each problem
carefully and think about how you might solve each problem. After a careful analysis of
each problem rank these problems from easiest to solve to most difficult to solve. Record
Easiest
Most Difficult
A data file named temp.dat contains temperatures for three cities recorded every
5 minutes for an arbitrary length of time. The fist line of the data file contains the
names of the three cities separated by white space. The temperatures recorded for
each city appear as a column of numbers under the name of the city.
Example:
29 42 75
28 36 76
26 45 77
Write a program that calculates the high, low and average temperature for each
city. Your program should then print a table to report these statistics.
92
(2) System of Equation
Write a C++ program that will read a system of equations from a file (data.dat)
2x + 5y z = -9
x y + z = 11
4x + z = 44
Solution:
x = 10
y = -5
z=4
(3) Pizza Pi
Joe’s Pizza Palace needs a program to calculate the number of slices a pizza of any
size can be divided into. The program should perform the following steps:
(a) Ask the user for the diameter of the pizza in inches.
(b) Calculate the number of slices that may be taken from a pizza of that size.
To calculate the number of slices that may be taken form the pizza, you must know
(b) To calculate the number of slices, simply divide the area of the pizza by
14.125.
93
(4) Internet Service Provider
An Internet service provider has three different subscription packages for its cus-
tomers: Package A: For $9.95 per month 10 hours of access are provided. Additional
Package B: For $14.95 per month 20 hours of access are provided. Additional hours
Write a program that calculates a customer’s monthly bill. It should ask which
package the customer has purchased and how many hours were used. It should
then display the total amount due. Your program should also displays how much
how much money package B customers would save if they purchased package C. If
Write a C++ that will ask the user for the name of a text file. The program should
analyze the text file and print and alphabetized list of each word that appears in
94
APPENDIX C
Grading Rubric
Acceptable 3 The program works and produces the correct results and displays them cor-
Amateur 2 The program produces correct results but does not display them correctly.
Exceptional 4 The code is exceptionally well organized and very easy to follow.
Readability Amateur 2 The code is readable only by someone who knows what it is supposed to be
doing.
Exceptional 4 The code could be reused as a whole or each routine could be reused.
Reusability Amateur 2 Some parts of the code could be reused in other programs.
Exceptional 4 The documentation is well written and clearly explains what the code is
Documentation Acceptable 3 The documentation consists of embedded comment and some simple header
Amateur 2 The documentation is simply comments embedded in the code with some
Unsatisfactory 1 The documentation is simply comments embedded in the code and does not
Unacceptable 0 No documentation.
Exceptional 4 The code is extremely efficient without sacrificing readability and under-
standing.
Efficiency Acceptable 3 The code is fairly efficient without sacrificing readability and understanding.
Unacceptable 0 The code would be more efficient is a simplistic brute force algorithm was
used.
95
APPENDIX D
Interview Questions
Computational Strategies
Interview Questions
INSTRUCTIONS:
At the beginning of the semester each student enrolled in CSI 3305 will participate in a
interviews.
IQ5 How do you feel about the use of computers and computer technology?
IQ7 Have you ever been afraid to use a computer because you thought you would break it
IQ12 Do you think there are some problems that can only be solved by computers?
96
APPENDIX E
Computational Thinking Curriculum
Computational Strategies
CSI 3303, Spring 2012
Bill Booth
Department of Computer Science
Baylor University
Waco, Texas
Abstract
97
Contents
1 Contact Information 2
2 Course Meetings 2
3 Course Educational Goals 2
4 Textbooks and Resources 3
5 Introduction 4
6 Syllabus 6
6.1 Course Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
6.2 Grading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.3 Computational Thinking Modules . . . . . . . . . . . . . . . . . . . . 7
6.4 Course Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
6.5 Assignments and Reading . . . . . . . . . . . . . . . . . . . . . . . . 10
6.6 Attendance Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
7 Python: Language of Instruction 11
7.1 Python Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
7.2 Python Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
8 Computational Thinking Labs 13
8.1 Python Programming Language Lab . . . . . . . . . . . . . . . . . . 13
8.1.1 Direct Computation . . . . . . . . . . . . . . . . . . . . . . . 13
8.1.2 Graphic Art . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
8.2 Probability, Testimony and Belief . . . . . . . . . . . . . . . . . . . . 14
8.3 eBook Library List . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
8.4 Creating and Posting a Playlist . . . . . . . . . . . . . . . . . . . . . 24
8.5 Image Batch Processing . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.5.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . 28
8.5.3 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.5.4 Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.5.5 Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
8.6 Computer Assisted Reporting . . . . . . . . . . . . . . . . . . . . . . 30
8.7 Timecode Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
8.8 Staffing Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
8.9 Prisoner’s Dilemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
8.10 Cruise Control System . . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.11 Direct and Indirect Objects . . . . . . . . . . . . . . . . . . . . . . . 59
8.12 Music Theory and the 12-tone System . . . . . . . . . . . . . . . . . 65
8.13 Game Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
8.14 Information Sharing and Collaboration . . . . . . . . . . . . . . . . . 71
9 Collaborators 72
98
1 Contact Information
Mr. Bill Booth, Senior Lecturer
Office: ***-****
Home: (***) ***-****
Office Hours:
M-F 2:00 PM - 4:30 PM
or by appointmen
2 Course Meetings
CSI 3303.01, Information Technology, MWF, Rogers 115, 11:15 AM - 12:05 PM
• Find information effectively on the Internet, as well as using some of the most
common Baylor University library electronic resources
99
4 Textbooks and Resources
• Textbook:
• This Website:
https://csi-info.baylor.edu/wiki/Course_Information
– Course Syllabus
– Course Schedule
– Grade Book
100
5 Introduction
Computational thinking has been around since the very beginning of computer
science. It was originally known as algorithmic thinking in the 1950s and 1960s [4].
Computer technology has become nearly ubiquitous in the last decade, but this
technology holds little utility if people are not able to use it effectively. Jeannette
Wing [11] suggests that “Computational thinking is a fundamental skill for
everyone, not just for computer scientists.” She defines computational thinking as
“. . . solving problems, designing systems, and understanding human behavior, by
drawing on the concepts fundamental to computer science.”
Not only do students in information-based fields like science and engineering require
a basic facility with computational tools, but this facility is increasingly necessary
for students in non-science fields. Professionals in creative arts use technology for
design and production, while those in humanities use and search digitized sources
(books, documents, images) for content analysis. Information-based questions often
arise in business and social sciences, as well.
A divergence between those who create technology and those who use it has
inhibited progress in some fields. Often, those who depend on computing technology
are unfamiliar with best practices and even what sorts of computing tasks are
possible. Of course, not everyone needs to become an expert in technology to enjoy
its benefits, but, in many cases, a modest degree of training in computational
thinking can help to enhance these benefits.
Computational thinking offers an algorithmic approach to questions, problems and
tasks. It allows people to leverage technology, such as computer software, to solve
problems that are much larger, more complex, or more tedious than what they
would be able or willing to solve by hand. It depends on an understanding of the
basics of computation, including abstraction (generalization of objects or
procedures), decomposition (breaking a procedure into simpler parts), sequence
versus independence, decisions, functions, input, and output [9]. It also involves
understanding the limits of computation, both practically and theoretically, as well
as issues of scale.
Those who can think computationally are at an advantage in effectively applying
technology. They are able to understand where computational solutions are possible
and how these solutions can be applied to reduce human effort, to improve quality
or to enable solutions to new problems. They can be an asset to both their field and
at the same time expand the field of computing. In response to these ideas, several
educators have proposed panel discussions at SIGCSE on developing courses for
introducing computational thinking to the broader undergraduate population
[6, 10]. Kramer [7] and Hazzan [5] discuss how abstraction is a fundamental aspect
of computational thinking. Hazzan suggests that two keys to teaching so-called ‘soft
ideas’ (i.e. abstractions) are teaching explicit models of abstraction, and further
that “. . . students must be active: they must do and they must reflect on what they
are doing.” In other words, having students apply their knowledge provides a path
for engaging them in learning [7, 5].
Pulimood and Wolz [8] seem to agree, and further propose that collaboration is
101
necessary in upper-division computer science education, when they write “Three
essential themes emerge: (1) creative design requires an authentic inquiry-based
pedagogy, (2) modern problem solving occurs in a collaborative community, rather
than in isolation, and (3) problem solving with computers is increasingly a
multidisciplinary endeavor.” [8] Involving students who are studying a variety of
fields will enhance the collaborative nature of a course, and reflect a more realistic
vision of computational thinking as it will be needed outside the classroom.
Buckley suggests that computing education can be motivated by a desire to solve
problems of society. In other words, rather than identify a computing problem and a
computing solution, start by identifying societal problems, and see how computing
can address the issues [3]. The proposed course for this curriculum development
project will draw on experts from across the university to help identify and develop
computational problems form a diverse collection of academic and professional
disciplines.
102
6 Syllabus
6.1 Course Calendar
Date Reading Assignment Classroom Activity Homeowrk
1/9/2012 Introduction Survey (50)
1/11/2012 Chapter 1 PPT/Discussion Sign-up for Interview Ch1 Reflection(10)
1/13/2012 Computational Problem Solving HW 1 (20)
1/16/2012 MLK
1/18/2012 Chapter 2 PPT/Discussion Ch2 Reflection (10)
1/20/2012 Computational Problem Solving HW 2 (20)
1/23/2012 Chapter 6 PPT/Discussion Ch 6 Reflection (10)
1/25/2012 Demo: Inside the computer
1/27/2012 Computational Problem Solving HW 3 (20)
1/30/2012 Chapter 3 PPT/Discussion Ch3 Reflection (10)
2/1/2012 Ch 3 (Demo)
2/3/2012 Computational Problem Solving HW 2,3
2/6/2012 Computational Problem Solving Survey, HW 4 (20)
2/8/2012 Chapter 4 PPT/Discussion Ch4 Reflection (10)
2/10/2012 Survey, Finish HW 4
2/13/2012 Computational Problem Solving HW 5 (20)
2/15/2012 Chapter 5 PPT/Discussion Ch5 Reflection (10)
2/17/2012 Computational Problem Solving Survey, finish HW 5
2/20/2012 Computational Problem Solving HW 6 (20)
2/22/2012 Chapter 8 PPT/Discussion Ch8 Reflection (10)
2/24/2012 windows (demo) Survey, finish HW 6
2/27/2012 Computational Problem Solving HW 7 (20)
2/29/2012 Chapter 7 PPT/Discussion Ch7 Reflection (10)
3/2/2012 networking (demo) Survey, finish HW 7
3/5/2012 Computational Problem Solving HW 8 (20)
3/7/2012 Chapter 12 PPT/Discussion Ch12 Reflection (10)
3/9/2012 Survey, finish HW 8
3/12/2012 Spring Break
3/14/2012
3/16/2012
3/19/2012 Computational Problem Solving HW 9 (20)
3/21/2012 (Demo) Networking
3/23/2012 Survey, finish HW 9
3/26/2012 Computational Problem Solving HW 10 (20)
3/28/2012 Chapter 13 PPT/Discussion Ch13 Reflection (10)
3/30/2012 (Demo) Buying Computers Survey, finish HW 10
4/2/2012 Final Project Discussion
4/4/2012 Chapter 9 PPT/Discussion Chapter 9 Reflection (10)
4/6/2012 Easter
4/9/2012 Easter
4/11/2012 Computational Problem Solving HW 11 (20)
4/13/2012 Survey, Finish HW 11
4/16/2012 Computational Problem Solving
4/18/2012 Library
4/20/2012 Computational Problem Solving
4/23/2012 Survey (50) Work on Final Project
4/25/2012 Work on Final ProjectFaculty Evalu-
ation (50)
4/27/2012 Work on Final Project
103
6.2 Grading
1000+ A
975 - 999 B+
950 - 974 B
925 - 949 C+
900 - 924 C
850 - 899 D
less than 850 F
7. Timecode Calculator
8. Staffing Problem
9. Prisoner’s Dilemma
104
13. Game Development
105
6.4 Course Policies
• Share everything.
• Play fair.
• Flush.
• Live a balanced life - learn some and think some and draw and paint and sing
and dance and play and work every day some.
• When you go out in the world, watch out for traffic, hold hands and stick
together.
• Be aware of wonder. Remember the little seed in the Styrofoam cup: the roots
go down and the plant goes up and nobody really knows how or why, but we
are all like that.
• Goldfish and hamsters and white mice and even the little seed in the
Styrofoam cup - they all die. So do we.
• And then remember the Dick-and-Jane books and the first word you learned -
the biggest word of all - LOOK.
106
6.5 Assignments and Reading
• See Course Schedule
• Chapter Reflection:
• ”Choose your own assigned seating”. After seats are assigned, if your seat is empty,
you are absent.
107
7 Python: Language of Instruction
Python Programming Language Official Website (http:www.python.org)
Python is a programming language that lets you work more quickly and integrate your
systems more effectively. You can learn to use Python and see almost immediate gains in
productivity and lower maintenance costs. The current production versions are Python
2.7.1 and Python 3.1.3.[1]
1. + addition
2. - subtraction
3. * multiplication
4. / division
5. % modulus
• Examples
1. 10 * 15 / 2 + 99.7
2. What do I need to make on the final to get an “A” in this class?
108
This tutorial does not attempt to be comprehensive and cover every single feature, or even
every commonly used feature. Instead, it introduces many of Python’s most noteworthy
features, and will give you a good idea of the language’s flavor and style. After reading it,
you will be able to read and write Python modules and programs, and you will be ready
to learn more about the various Python library modules described in The Python
Standard Library.[2]
109
8 Computational Thinking Labs
8.1 Python Programming Language Lab
first lab on using python
110
8.2 Probability, Testimony and Belief
Students will devise a computational strategy to answer the question: How many reliable
independent witnesses does it take to convince a rational person that an improbable event
has occurred, under a Bayesian framework?
111
Lab: Probability, Testimony and Belief
Spring, 2012
1 Introduction
One major topic in philosophy is the evaluation of our beliefs to determine when and
under what conditions a belief has a certain merit, like rationality. The rationality
of our beliefs has a lot to do with evidence. Rational beliefs are proportioned to our
evidence. Determining the weight of piece of evidence is a very complicated proce-
dure, typically modeled by Bayesian reasoning. The Bayesian model can yield very
surprising results, and there is strong evidence that we are not naturally very good at
estimating accurately the weight of our evidence. Thinking about the rationality of
our beliefs, at this point, is heavily computational, and often involves very large num-
bers. Usually, with a little instruction, students can work with the Bayesian model on
pen and paper. But it is difficult, and, a bit of a distraction from the main philosoph-
ical point. In fact, students may well understand the nature of Bayesian reasoning
better by turning to computational tools. The important point is not crunching the
numbers, so to speak, but understanding how the numbers are interdependent.
2 Problem Statement
One good way to illustrate the issues surrounding the weight of evidence is to calculate
the tipping point for believing something based on testimony of eyewitnesses (or of
experts). No matter how unlikely an event may be (provided that the event is not
impossible) there is a number of credible independent witnesses that would convince
us that the event had occurred, and a point at which it would be positively irrational
not to believe that the event had occurred. The computational problem is to fix that
number, and to see how it is a function of the improbability of the event in question, of
the reliability of the witnesses (or experts) and of their independence. Using Bayesian
reasoning, and assigning plausible estimates (which they should be able to explain),
students should be able to compute the number of eyewitness (or expert) testimony
needed to convince them to believe something, no matter how improbable. Good
examples can be drawn from any number of domains. One might ask, questions like
112
these: How many qualified testifiers would it take to convince me that two students
composed precisely the same 500 word essay? How many trusted reports would it
take to convince me that a man survived a sky-diving accident in which his shoot
failed to open? Or, since this is Baylor, how many reports would it take to convince
me that a man had been raised from the dead?
For this lab, you will create a small program that calculates the probability of an
event, using Bayes’ theorem, given several parameters that you will adjust. You will
answer the question: based on reasonable estimates of prior probabilities, how many
eyewitnesses would be necessary to convince a rational person that Jesus had risen
from the dead?
3 Tools
You will be using the Python programming language and interpreter for this lab. The
script will be written using a text editor, and will be run using the command line.
2. Open bayes.py in the text editor of your choice (such as Notepad or Vim.)
This code will allow Python to handle division in a more intuitive way, doing
floating point division by default.
These are the parameters controlling our Bayesian probability estimate. The
first is the number of eyewitnesses to an event, which we’ve estimated as ten.
The second is the prior probability of our hypothesis holding. We’ve estimated
113
it at one in a hundred billion, which is the same as saying that we assume one out
of every hundred billion people rises from the dead. Notice that this estimate
is pretty subjective, since we don’t know beforehand what the probability of a
resurrection occurring three days after death really is. Since we’re uncertain,
we choose a small probability, though we could have chosen a smaller (or larger)
one.
The next variable, P_E_H, is the probability of seeing the evidence given that our
hypothesis holds. We’ve estimated this as 0.5. This is even harder to estimate,
since we have no good way of estimating what the probability of the evidence is
(multiple, independent eyewitness testimony) given that the hypothesis is true.
So we choose a 50-50 probability.
Next is the probability of the event NOT occurring, which should be one minus
the probability that it does occur. The next variable, prob_of_single_witness,
is the probability of a single witness seeing the events in question given that
the hypothesis does not hold. For example, the probability of a person seeing a
risen Jesus (a post-death sighting) assuming that he did not actually rise from
the dead. We assume that a person has a ten percent chance of having such a
mistaken encounter. The last variable, P_E_NOT_H, is the probability that of the
evidence given that the hypothesis does not hold. It assumes that the eyewit-
nesses are independent and calculates the probability of several people having
an eyewitness encounter given that the hypothesis does not actually hold. In
other words, it is the probability of ten people seeing Jesus after his death,
assuming that he was actually still in a tomb.
These are the parameters you will need to adjust in order to answers the ques-
tions in the Questions section.
This line calculates P_H_E which is the Bayesian probability that hypothesis H
holds given the evidence E (eyewitness testimony).
8. Open the command line (From the Windows menu bar: Start > Run... > cmd).
Navigate to the folder where you created your file (use the following command:
cd “C:\Folder\where file\is”.)
114
9. Call the bayes.py file from the command prompt, using the following command
and hitting enter:
python bayes.py
5 Questions
1. Given the parameters as defined in the Setup and Programming section, what
is the probability of the hypothesis H holding? (Hint: it is the output of the
program.)
2. The gospels and Paul’s letters indicate that more than ten people had encounters
with Jesus after his death. What happens to the probability of the hypothesis
H if you change the number of eyewitnesses to fifteen instead of ten?
3. What is the “tipping point”, i.e. the number of independent witnesses needed
to make hypothesis H more probable than not given our model? In other words,
what is the minimum number of witnesses necessary to make the probability
exceed 50%?
6. Is the estimate for P_E_H a reasonable one? Why or why not? Remember, this
is the probability that we’d have the eyewitnesses evidence of a risen Jesus if he
rose from the dead. This probability estimate is somewhat subjective, so come
up with your own value and justify why your estimate is reasonable. Then
record what changing this value does to your overall probability.
115
8.3 eBook Library List
Students will explore ways in which a time consuming manual task, such as assembling a
list of all eBooks contained in your library, can be accomplished easily using simple
command line and python scripts.
116
Lab: eBook Library List
Spring, 2102
1 Introduction
One of the strengths of a computer is the ability to make time consuming tasks easier.
This is especially true of repetitive tasks. Although each iteration of a repetitive task
may not take long, the time quickly compounds when you are forced to perform the
same task hundreds, or thousands, of times. Computational thinking can help us
avoid this type of unnecessary work by leveraging a computer’s power to perform
repetitive tasks fairly quickly.
2 Problem Statement
For this lab, imagine that you are part of an eBook sharing group, who lend one
another eBooks and request books from other members. As part of the group, your
responsibility is to create a listing of the eBooks you have available to lend and send
this list to the other group members. The problem is that you have over two-hundred
eBook titles in an “eBooks and PDFs” folder, which contains both ePub eBooks
(which are those the group shares), as well as PDF books, which the group does not
share. You could open up a text editor and manually type the names of the books as
you scan the directory, only including ePub books; however, this is time consuming,
boring, and error prone. A better approach is to create a small script to list the files
in the directory and filter out those you do not want to include.
Your task is to create two scripts, one a command-line batch file and the second a
short python script, for listing out your eBook library.
3 Tools
You will be using the Windows command prompt and Python programming language
for this lab. The scripts will be written using a text editor, and will be run using the
command line.
117
4 Setup and Programming
dir *.epub
This line calls the dir utility, which lists out the contents of a directory. We
include a filter, ‘*.epub’, which only lists files ending with the extension .epub.
This allows us to exclude the PDF files contained within the same directory.
5. Save the file.
6. Open the command line (From the Windows menu bar: Start > Run... > cmd).
Navigate to the folder where you created your file (use the following command:
cd “C:\Folder\where file\is”.)
7. Call the batch file from the command prompt, using the following command
and hitting enter:
list.bat
The result should be a list of files, along with additional information concern-
ing the directory and files. Next, we’ll simplify the output, to exclude that
additional information.
8. Open the list.bat file again, and modify the command within it to look like this:
The first switch excludes directories from being printed and the second excludes
the additional file information.
9. Save the file and run again from the command prompt. You should now get a
simplified listing of the ePub eBooks.
10. We will now save this information to a text file, by using redirection of output.
To do so, run the following command:
11. Open the newly created file myLibrary.txt and verify that it contains a listing
of your ePub eBooks.
118
4.2 Python Script
An alternative way of completing the same task is to use a programming language like
Python. Although we were able to complete the task using simple batch commands,
we may wish to do some processing to the filenames in our list, such as creating a
separate list of authors. We will assume that all books have the following naming
convention: Title - Author.epub
2. Open the authors.py in the text editor of your choice (such as Notepad or Vim.)
import os
authors = set()
The first line will import the os module, which will allow us to get a listing of
the files in the directory. The second creates a local set variable for storing the
names of authors.
4. Next we will walk over all files, processing them as we encounter them. Enter
the following code:
authorsList = list(authors)
authorsList.sort()
8. From the command line, type the following to run your program and hit enter:
python authors.py
9. We will now save this information to a text file, by using redirection of output.
To do so, run the following command:
10. Open the newly created file myAuthors.txt and verify that it contains a listing
of authors in your ePub library.
5 Questions
1. List all authors with first names that begin with J in the library.
2. What are the benefits of using the DOS batch file method?
120
8.4 Creating and Posting a Playlist
Design, implement, test and deliver a 100 song randomizing script for web broadcasting.
121
Lab: Creating and Posting a Playlist
Spring, 2012
1 Introduction
As an aspiring web DJ, you are looking for a way to choose and randomize a group
of 100 songs from a 500 song library and then have a web player use that playlist to
broadcast to the world. You could attempt to create this playlist yourself, but it is
taking too long and keeping you from clubbing. What can you do?
2 Problem Statement
Your task is to create a script that will randomly select a set of 100 songs from a
library of 500 available songs, and randomly arrange them into a playlist that you
will save to a pre-specified location.
You will also create a scheduled task on Windows to automatically run the script
each night at midnight and generate a new playlist.
3 Tools
You will be using the Windows command prompt and Python programming language
for this lab. The script will be written using a text editor, and will be run using the
command line.
3. Open the generate.py in the text editor of your choice (such as Notepad or
Vim.)
import random
import os
The line of code imports the random module, which you will use for making
your random selections. The second imports the os module, which you will use
for getting the files in a directory.
files = os.listdir(".")
songs = random.sample(files, 100)
First, we get a list of all the files in our current directory. This is stored in the
files variable. Next, we use the sample method of random to select a random
group of 100 songs from our set.
This creates a file object for output. The first parameter is the filename and
path, and the second is a flag signifying we will write to this file.
This iterates through our randomized selection of songs, and outputs their file-
names to the playlist.
8. Finally, we enter this on the last line, to close the playlist output file:
playlist.close()
10. Open the command line (From the Windows menu bar: Start > Run... > cmd).
Navigate to the folder where you created your file (use the following command:
cd “C:\Folder\where file\is”.)
123
11. Call the generate.py file from the command prompt, using the following com-
mand and hitting enter:
python generate.py
You should not see any output on the screen, but it should return control to the
command prompt after a second. Once it is done, look in your folder to verify
that a file named playlist.m3u was created.
12. Open the newly created playlist.m3u file and verify that it contains a listing of
100 randomized songs from your library.
5 Scheduling
Using Google, learn how to create a scheduled task on Windows. Set up a scheduled
task to run each night at midnight. Verify your task runs by first setting it up to run
a few minutes from now and checking if it calls your script correctly, generating the
playlist file. After you’re sure the task works, change the time for midnight.
6 Questions
1. List the steps necessary for creating a scheduled task on Windows.
3. If your library grew to include two thousand more songs, what steps would you
need to change in your playlist generation technique?
4. Imagine that your audience becomes very picky, and now only prefers 50 specific
songs. You reduce your library to these songs alone. What would need to
change in your playlist generation script, since your library is now smaller than
100 songs?
124
8.5 Image Batch Processing
Ever have to apply the same change to a large group of images, such as resizing prior to
emailing them? Batch processing allows you to perform the same task over a large number
of objects, and saves time by removing the need to make the changes by hand. Students
will create batch processes for making changes to a large number of images and to become
familiar with batch processing.
8.5.1 Introduction
Most of us have numerous images. Those images can be found in cameras, the Internet or
inputed via scanners. Many of those images have issues such as the exposure
(lightness/darkness) is not perfect, the size is not correct for the usage of it or you need to
apply an effect to all of them. Let’s say your camera happens to record images a little
dark. How can you brighten those images without having to complete each image
individually? Will you be able to resize images from a large size to a size that will work on
the web? You need to add a gradient to 105 images? Programs such as Adobe Photoshop
or GIMP allow you to do a task called batch processing. When you accomplish batch
processing, it takes a group of images, applies filters or looks and saves out a new group of
modified images.
8.5.3 Tools
You will be using GIMP, Adobe Photoshop or another batch processing software
application.
8.5.4 Instructions
1. Download the image set zip file from the course website. Unzip the file and save to a
local folder.
2. Search Google (or the applications installed locally) to and a software application
for batch processing of images.
3. Batch process the set of images to resize them to 80 pixels by 60 pixels and change
them to black and white.
8.5.5 Questions
1. Describe the application and process you used to batch convert the images.
2. What was the combined total size of all images prior to batch processing?
125
3. What was the combined total size of all images after batch processing them (the size
of the processed black and white images)?
126
8.6 Computer Assisted Reporting
How does the Waco Metropolitan Statistical Area compare with other similar MSAs in
total crimes and crimes in various categories? Students will use data provided from the
Uniform Crime Reports from the FBI to generate a proposal for a news story.
127
Lab: Computer Assisted Reporting
Spring, 2012
1 Introduction
Information for news stories comes from a variety of sources. Journalists will use their own obser-
vations to describe and interpret events. They may use archival records to provide background on
current situations and to write historical articles. Interviews with first-hand sources like experts, vic-
tims and bystanders are used to provide both facts and interpretations. One source that is becoming
more important as more data is available on computer networks is computer assisted reporting.
Journalists use computational tools to understand information in publicly available databases in
order to inform their audiences. Examples of publicly available data include property tax informa-
tion, census data, budgets, and school accountability test scores. In some cases, this information is
available as the result of a Freedom of Information Act request, while in other cases, anyone using a
particular web site can have easy access to the data. Some sites include analytical tools, while others
provide the data and a code book only. In addition to typical journalist skills like understanding
the audience, interviewing and synthesizing information from a variety of sources, using this infor-
mation requires skill in understanding what is contained in databases and extracting appropriate
information from them.
Here is an example of a Computer-Assisted Reporting (CAR) story: Why-nearly-50-of-all-Phoenix-
murders-go-unsolved In this story, the journalist selected data from nationally reported crime statis-
tics, made comparisons between his/her city and other similar cities, and found an area of difference
that led to a story.
For the journalist, computational thinking is used to ask questions of the data, by deciding what
variables would useful to select from the data available, and to decide how to aggregate and/or
draw comparisons from the data in a way that provides useful conclusions. For many journalists,
this would mean just comparing totals, but statistical tests of relationship and difference would be
appropriate.
2 Problem Statement
How does the Waco Metropolitan Statistical Area compare with other similar MSAs in total crimes
and crimes in various categories? Students will use data provided from the Uniform Crime Reports
from the FBI to generate a proposal for a news story. The Uniform Crime Reports contain informa-
tion about both violent and property crimes. Aggravated assault, forcible rape, murder, and robbery
are classified as violent while arson, burglary, larceny-theft, and motor vehicle theft are classified as
property crimes. Students will need to choose the appropriate variables and MSAs, come up with
a method for comparing them across the MSAs, and then apply this information to suggest a news
story.
128
3 Tools
You will be using the Uniform Crime Reports for 2009, available at http://www.fbi.gov/about-
us/cjis/ucr/ucr.
5 Questions
1. What was your news story proposal?
2. What other MSAs did you compare Waco to?
3. What criteria did you use as your metric for coming up with “similar” MSAs?
4. What other resources did you use in creating your news proposal?
129
8.7 Timecode Calculator
Calculating timecodes in movie film is a time consuming and error-prone task. Students
will develop two small programs to automatically calculate the addition and subtraction of
timecodes, using Excel macro programming and Javascript.
130
Lab: Timecode Calculator
Spring, 2012
1 Introduction
While you edit media in the field of film and digital media you are using a time-
based clock. This is called time code. It begins with “00:00:00.00” and ends with
“23:59:59.29.” Another way to think about this is every frame in the clips has a unique
number associated with it. This is written as hh:mm:ss.ff or hour:minutes:seconds.frames.
The United States television standard is to broadcast television with 30fps.
You happen to have just found a job on a small budget movie entitled, “Summer
Break Apocalypse.” This movie needed an assistant editor and you have the skills
for the job. Part of the role of an assistant editor is to log tapes and deliver those
numbers to either an editor or someone who can capture the media into the computer.
You have decided that using some computational thinking might help you because
trying to do this by hand is an extremely long process and is extremely error prone.
Can you create a time-based calculator to accomplish the task?
2 Problem Statement
Your task is to design, implement, test and deliver a time-based calculator using the
following technologies:
1. Excel: You will sometimes be given long lists of timecodes you will need to
calculate the time differences for. Using Excel, you will code a user defined
formula that allows you to add and subtract the timecode values in two cells.
2. Javascript: Your friend George decided that since a graphic user interface cal-
culator could come in handy for adding several timecodes together successively,
he would go ahead and code the graphical portion of this calculator. What
he needs from you are two small javascript functions that he can plug into his
interface to carry out the actual calculation logic.
131
After creating your calculator functions, answer the questions in the “Questions”
section.
3 Tools
You will be using Microsoft Excel to learn how to create custom spreadsheet functions.
For the second part of the task, you will need Firefox or Google Chrome web browser,
the timecode.html file and the timecode.js stub file. The stub file has place holders
for where you will create your two javascript calculator functions.
4.1 Excel
1. To begin, open Excel and create a new spreadsheet.
2. On the menu, go to “Tools > Macro > Visual Basic Editor” (or hit ALT +
F11.) This will open up the editor window, where you will be defining your
functions.
3. From the menu, select “Insert > Module” This module will hold your code.
4. In the code window, type the following stub functions:
timecodeAdd = result
End Function
timecodeSubtract = result
End Function
5. Replace the comments with actual code that parses two strings and returns
a calculated time code. Google for “Excel VBA tutorial” or visit www.excel-
vba.com to learn the syntax for Excel’s VBA code. (Alternately, whoever is
132
leading the lab can explain how to do the bits they’d need to complete
this assignment.)
6. After you have created your functions, you can use them in any cell as a formula
by typing the following, for example into a cell: =timecodeAdd(A1, B1). Notice
the equal sign, which tells the spreadsheet that an equation expression is going
to be calculated and the contents stored in the cell.
4.2 Javascript
1. Open the timecode.js file with Vim or Notepad (or any other text editor.)
2. Replace the comments in the function stubs with actual code that calculates
timecode differences and sums.
5 Questions
1. How long is the video clip if it began at 13:45:21.15 and ended at 13:48:25.04?
2. If you had 2 clips that were 4:31.27 and 5:30.05, how much time would you need
if you combined the clip?
3. If you have 2 clips where the first clip begins at 00:03:31.00 and ends at
00:04:32.15, the second clip begins at 00:10:45.10 and ends at 00:11:30.05, how
much time would you need if you combined the clips together?
t1 t2 Difference Sum
21:49:48.15 58:59:42.10 37:09:53.25 80:49:30.25
00:53:26.23 44:57:25.10
26:19:12.19 56:45:35.22
16:43:06.10 46:29:47.08
05:37:10.05 58:00:06.29
23:49:38.01 53:42:22.29
33:50:47.20 49:53:44.16
18:01:36.19 33:53:28.12
34:03:37.12 55:02:51.13
133
8.8 Staffing Problem
One of the major reasons nurses report for leaving the profession is their inability to give
the level of patient care they believe is best due to inappropriate workloads. Staffing
decisions and patient assignments are often based on a patient acuity system, which is not
well defined and receives little nursing input in its development. Students will design,
implement and test a version of patient acuity and a staffing program for calculating the
number of nurses required for a given shift. At each phase, students will assess the quality
and correctness of their calculations. Students will also evaluate the feasibility of using
their program in nursing practice.
134
Lab: Staffing Problem
Spring, 2012
1 Introduction
Although certain images come to mind when one thinks of a nurse, the majority
of those are not reflective of what the actual job involves. Although health care
today requires a team approach, nursing is an autonomous profession that requires
independent thinking and split second decision making. Nursing is a job that is
rigorous and fast paced. On a daily basis, nurses make over 100 decisions that affect
a person’s health and in many instances, their ability to maintain life and well being.
Decisions must be made in a variety of areas including staffing of patient care based
on acuity and prioritization, interactions with the multidisciplinary health care team,
patients and families, and safety of the environment.
One of the major reasons nurses report for leaving the profession is their inability
to give the level of patient care they believe is best due to inappropriate workloads.
Staffing decisions and patient assignments are often based on a patient acuity system,
which is not well defined and receives little nursing input in its development.
2 Problem Statement
Your task is to code a strategy for assigning nurses to take care of patients, and a
hospital to simulate your strategy.
We will explore 2 strategies for assigning nurses:
135
3 Tools
You will be using the Python programming language and Python interpreter for this
lab. The code will be written using a text editor, and the interpreter will be called
using the command line.
4.1 Python
1. To begin, create a new text file and label it staffing.py.
2. Open the text file in the text editor of your choice (such as Notepad or Vim.)
(This code will allow Python to handle division in a more intuitive way, doing
floating point division by default, and some additional libraries)
4. Next, we need to define some constants that will be used throughout the pro-
gram. Type the following code into your file:
TOTAL_NURSES = 15
NURSING_ABILITY = 10
TOTAL NURSES is total number of nurses we have in the hospital, and NURS-
ING ABILITY is just a measure of how much a nurse can heal a patient.
5. Next, we will create some functions. Enter the following code, beneath what
you’ve already entered:
136
This first function simulates a day in the hospital. We go through the list of
patients and one of two things happen:
(a) The patient died (patient’s health reaches 0) or the patient completely
recovered (patient’s health reaches 100), so we remove the patient and
admit a new patient with a health of 90, OR
(b) We simulate the patient recovering, first we subtract a random amount
between 0 and 30 to simulate the patient getting worse, then we add the
amount of health which the nurses restore.
This is a very simple strategy. We go through our list of patients, and for every
patient we calculate how many nurses a patients need to fully recover, if we
137
have enough nurses we assign that number of nurses to the patient. Otherwise
if we don’t have enough nurses, we don’t assign any. Notice that we go through
the patients in the order of which room they are in (their index in the list).
currentDay += 1
patients = nextDay(patients, nurses)
diedPatients, recoveredPatients = checkAssignment( patients,
diedPatients, recoveredPatients)
print ""
The while loop just simulates the days until we reach the amount we specified.
At the beginning of each day, we first print out the day and the health of the
patients. Then we assign nurses to the patients, and print out the nurses. We
then simulate the day, so the day passed and we increment currentDay, and
138
we call nextDay to simulate the patients recovering. At the end of the day, we
check to see how our patients did.
After the while loop completes, we print out how well our strategy did.
8. Save the file and open the command line (From the Windows menu bar: Start
> Run... > cmd) Navigate to the folder where you created your file (use the
following command: cd “C:\Folder\where file\is”.)
9. From the command line, type the following to run your program and hit enter:
python staffing.py
10. Notice that this strategy does not do very well as quite a few patients die. This
is because by the time we reach the last room, there is a good chance that
we have already assigned all the nurses jobs. Instead, let’s consider a better
method. A better approach would be to assign nurses to the sicker patients
(health nearer to 0) first. This way we can prevent the sicker patients from
dying.
Type this code below assignNurses().
nurses = [0,0,0,0,0,0,0,0,0,0];
availableNurses = TOTAL_NURSES
return nurses;
In this code, first we sort the patients by health into a new list called sort-
edPatients. Then we make a copy of the patients for later use and create a
sortedIndex list.
Although we have sorted the patients, we can’t just assign nurses using this
list, because the room numbers are no longer correct. To fix this, we use our
sortedIndex list. We go through our list of sorted patients, then for each of the
patients in this sorted list, we find the room that the patient is in by comparing
the health of the patient in the sorted list (patient1), and the health of the
patient in the current room (patient2). Once we find the room the patient is in,
we add the room number to the sortedIndex list. We then remove the patient
and replace it with a value that cannot be any patient’s health.
After the last step, we now have a list of rooms of the sickest to the healthiest
patients. We initialize a nurses list because this time we can’t just append to
the list since we have to insert it according to patient’s room number which is
not in order.
We go through the list of rooms, and similar to our last strategy, we find out
how many nurses are needed to nurse the patient back to full health and assign
it. The only difference is that we do pop() and insert() to put the nurses in the
correct rooms.
Finally, we change the function call in the hospital to call this function.
nurses = assignNursesBetter(patients)
Notice now, that we have far fewer patients dying, but at the cost of discharging
less patients.
5 Questions
1. Run each strategy for 1000 days and report how many patients died and how
many patients were discharged.
140
8.9 Prisoner’s Dilemma
How can rational, selfish actors cooperate for their common good? Students will model
the Prisoner’s Dilemma using programming tools and test various hypotheses as to how
cooperation can arise among multiple competing agents. Using their model, strategies
such as tit-for-tat and always cooperate will be evaluated and compared using payoff and
equilibrium outcome as metrics.
141
Lab: Prisoner’s Dilemma
Spring, 2012
1 Introduction
How can rational, selfish actors cooperate for their common good? This is the essential
question at the root of many problems in politics and governance. In one sense, the
political realm is a “kill or be killed” environment. There are incentives to take
advantage of others in order to avoid becoming a victim. At the same time, there are
benefits that come with cooperation. How can rational, selfish actors build enough
trust in each other to make cooperation possible?
One way of thinking about this problem is to use the Prisoner’s Dilemma (PD). You
have most likely seen the PD situation play out in police procedural dramas, like
CSI or Law and Order. Two people have committed a crime together. They have
both been arrested and the detectives are interviewing them in separate interrogation
rooms. Each suspect is presented with the same information: If you tell us what
happened first, we’ll make sure your accomplice gets a heavy sentence and the District
Attorney will give you immunity from prosecution. If your accomplice breaks down
before you do, you will get the blame for this crime and your accomplice will go free.
If you both hold your silence, we can still prosecute you for some minor crimes. The
detectives are hoping that both suspects will turn each other in at the same time and
they will both get jail time for their crimes.
Another way to present this dilemma is in the following form:
Player 2
Collude Cheat
Collude 20, 20 0, 30
Player 1
Cheat 30, 0 10, 10
If Player 1 assumes that Player 2 is untrustworthy and prone to cheating, then Player
1 can minimize his/her losses by cheating as well. If Player 1 assumes that Player 2
will be faithful to the deal and hold his/her silence (collude), then Player 1 can’t help
142
noticing that his/her payoff would be better if he/she cheats (i.e. blames the accom-
plice for the crime) and Player 2 does not cheat. Player 2 has the same realization.
The end result is that both players are tempted to cheat and usually both go to jail.
Under what circumstances would the accomplices resist the temptation to turn on
each other?
Researchers have found that in a one-shot version of this game the equilibrium is
that both players cheat. In an iterated game, though, it is possible for the players to
collude with each other. By playing this game over and over again, the two players
can train each other to cooperate.
In the depictions of this situation on television, the suspect that resists the temptation
often mentions that their accomplice has a network of fellow criminals who could
punish them even if the accomplice goes to jail.
The Prisoner’s Dilemma analogy has been applied to many situations, but one of the
most famous applications is to the study of global nuclear strategy.
USSR
Cooperate Attack
Cooperate 20, 20 0, 30
USA
Attack 30, 0 10, 10
Both the USA and the USSR have large arsenals of nuclear weapons. In a standoff,
both are tempted to attack their opponent using their nuclear weapons. However,
each country knows the other country also has access to nuclear weapons. If the
USSR can get away with nuking the USA and be assured that the USA would not
be able to counter-strike, then there is the potential for the USSR to win the Cold
War using nuclear weapons. If neither country can give a strong enough signal that
they would counter-strike, then both countries are tempted to nuke each other. If the
countries can convince each other that they would definitely fire off a counter-strike,
then the equilibrium outcome is for both countries to refrain from using their nuclear
weapons on each other.
For a more in-depth explanation of PD, see the Stanford Encyclopedia of Philosophy:
Prisoner’s Dilemma - Standford Encyclopedia of Philosophy
2 Problem Statement
Your task is to code an iterated Prisoner’s Dilemma simulator where players will take
the following strategies:
1. Always cheat
143
2. Always cooperate
4. Tit-for-tat: Choose to cooperate in the first round. If the other player cheats,
punish them by cheating in the next round. If the other player cooperates,
reward them by cooperating in the next round.
After creating your simulator and testing all combinations of strategies, answer the
questions in the “Questions” section.
3 Tools
You will be using the Python programming language and Python interpreter for this
lab. The code will be written using a text editor, and the interpreter will be called
using the command line.
4.1 Python
1. To begin, create a new text file and label it prisoner dilemma.py.
2. Open the text file in the text editor of your choice (such as Notepad or Vim.)
(This code will allow Python to handle division in a more intuitive way, doing
floating point division by default.)
4. Next, we need to define some variables that will be used throughout the pro-
gram. Type the following code into your file:
COLLUDE,CHEAT = 0,1
144
( (30,0), (10,10) )
)
The first two items are two aliases we will assign to the values 0 and 1, so that
way we have readable labels later on for COLLUDE and CHEAT.
Next we define a payoff matrix, as a three-dimensional tuple. Using this matrix,
we can find what payoff player one will get if he cheats and player two colludes
by the following:
PAYOFFS[CHEAT][COLLUDE][P1]
where P1 is equal to the value 0. This will return a value of 30. The first offset
is player 1’s move, the second is player 2’s move and the last indicates whether
we want the payoff for player 1 or player 2 under those conditions.
The STRATEGIES dictionary has labels for the various strategies, which map
to tuples containing what the next move should be, given the previous choices
of player 1 and player 2. The first tuple in a strategy defines the outcomes
for when a player last colluded and his opponent colluded or cheated on the
previous turn. The next tuple defines the outcomes for when a player cheated
on his previous turn and his enemy colluded or cheated, again in that order.
For example, consider the TIT-FOR-TAT strategy. Regardless of player 1’s
choice to COLLUDE or CHEAT on the previous move, his next move is the
same based solely on player 2’s previous move. Therefore, both tuples are the
same for this strategy, namely (COLLUDE, CHEAT). Within the tuple we
chose index 0 or 1 (COLLUDE or CHEAT) based on player 2’s previous move:
when player 2 cheated on the previous move (note that CHEAT = 1), we select
the index 1, which gives us a value of “CHEAT” for our next move (as we
expect). If player 2 colluded on the previous move (COLLUDE = 0), we select
the index 0, which gives us a value of “COLLUDE.” As another example, the
REVERSE-TFT (Reverse Tit-for-Tat) strategy says that a player cheated and
the opponent colluded, the player should cheat on the next turn. In this way,
the STRATEGIES dictionary can encode the various choices we should make
based on the previous choices of the two players.
5. Next, we will create some functions. Enter the following code, beneath what
you’ve already entered:
145
’’’ Functions ’’’
def converged(l):
return len(l) >= 5 and l[-5]==l[-4]==l[-3]==l[-2]==l[-1]
This first function checks to see if our results have converged to a stable outcome.
It takes in a list of previous outcomes and checks if two conditions hold:
If these two conditions hold, the function returns True; if not, False is returned.
Next, add the following two functions:
Notice, you must indent your code as shown, or you will get an error. (Python
is whitespace sensitive.)
The function, simulate(), is what performs our actual simulation of the iterated
prisoner’s dilemma. It takes four parameters:
• strategyP1 - This is the name, as a text string, of the strategy player one
will use. For example, you would use “ALWAYS-CHEAT” for the Always
Cheat strategy.
• strategyP2 - This is the name, as a text string, of the strategy player two
will use.
• prevP1 - This is the starting condition for player one. Legal values are
COLLUDE and CHEAT.
• prevP2 - This is the starting condition for player two. Legal values are
COLLUDE and CHEAT.
146
The function begins by declaring access to global variables we defined outside
our functions: PAYOFFS, STRATEGIES, CHEAT, and COLLUDE. It then
creates a new list to store our payoff history over our iterations. We then enter
the main loop, which continues either until we’ve completed 1000 iterations or
the outcomes have converged.
Within the loop, we calculate the next move for players one and two, using their
previous moves and their current strategies. After this, we plug the calculated
choices into the PAYOFFS matrix and add the result to our history.
The outcome() function is simply a nice function to do a simulation and calcu-
late some summary statistics, such as average payoffs, final states, and whether
or not the outcomes converged.
6. Lastly, we enter the driving code for testing all possible combinations of strate-
gies:
This code consists of two nested loops, where the outer loop iterates over the
possible strategies for player one, while the inner loop does the same for player
two. We perform a simulation for each strategy combination and print out the
results to the screen.
7. Save the file and open the command line (From the Windows menu bar: Start
> Run... > cmd) Navigate to the folder where you created your file (use the
following command: cd “C:\Folder\where file\is”.)
8. From the command line, type the following to run your program and hit enter:
python prisoner_dilemma.py
5 Questions
1. Which combination(s) of strategies produce(s) an equilibrium of cooperation?
Why?
147
2. Which combination(s) of strategies produce(s) the highest payoffs? Why?
4. Do all strategies converge (i.e. settle down to the same outcome for five itera-
tions)?
6. For each combination of strategies, report the equilibrium outcome (i.e. when
the outcome is the same 5 times in a row) by filling out the following table:
148
8.10 Cruise Control System
Students will design a simple PID controller as the basis for a cruise control system used
to guide a car simulation. Principles of PID control will be covered as well as parameter
fine-tuning for selection of proper controller parameters.
149
Lab: Cruise Control
Spring, 2012
1 Introduction
Almost every area of life involves some aspect of Control, where some property or quantity must be
regulated to remain within reasonable bounds. This regulation is exercised by varying any number
of control variables or processes which, in turn, affect the property or quantity being regulated.
Regulation typically involves a form of feedback, where a sensing mechanism detects the level of the
property or quantity, and activates variation in the control variables or processes. For example, if
you exercise outdoors on a hot summer day your body will sense a rise in body temperature and
stimulate the sweat glands to release fluid onto the skin. The fluid then evaporates, taking heat with
it and cooling your body. If you forget your coat on a cold winter day your body may detect the
drop in body temperature and stimulate your skin to produce goose bumps. The goose bumps raise
the small hairs on your skin, which trap air against your body and keep it from carrying off your
body heat, thereby helping to keep you warm. For another example consider look up and describe
how so many aspects of the Earth’s environment are regulated with feedback and control in order
to be appropriate for life (oxygen, etc.). There are countless examples in the realm of Mechanical
Engineering where control is required. Consider how a toilet bowl fills the tank only up to a certain
level, then the float detects this level and shuts off the water valve. The thermostat contains a
thermometer that detects temperature, and if the temperature gets too cold turns on the heater,
or if it gets too hot turns on the air conditioner. Gasoline engines, such as you may see on your
lawnmower, have a governor that detects the rotational speed of the engine, and if it gets too fast
reduces the flow of air and gas to the engine, or if it gets too slow increases it.
2 Problem Statement
The problem we will address is that of the cruise control system (CCS) of an automobile. Most every
automobile these days is equipped with a CCS that maintains the automobile at a certain speed
designated by the driver. The driver drives the car up to the speed that he wants to maintain, and
then hits the “Set” button on the cruise control. The CCS takes over and the driver may remove his
foot from the accelerator. The CCS monitors the automobile speed through the speedometer, and
adjusts the accelerator to maintain the target speed. If the car begins slowing down as it goes up a
hill, the CCS will increase the accelerator. Or, if the car begins speeding up as it goes down a big
hill, the CCS will decrease the accelerator. The aim of the CCS is to maintain the automobile at
the target speed no matter what else may be impacting the automobiles performance. If the driver
wants to regain control of the cars accelerator, he may tap the brakes or turn the CCS off. In this
assignment you will design and modify a cruise control system for a simulated automobile driving
on a simulated roadway course with varying environmental conditions.
150
3 Background Reading
We will create a simple PID system to serves as the brains of our cruise control system. Please read
the Wikipedia page on PID controllers to understand the theory behind them:
http://en.wikipedia.org/wiki/PID controller
Do not worry if you can’t follow all of the math, just try to understand what the three main
components of a PID system are and how they work together to produce an output.
4 Tools
You will be using the Python programming language and Python interpreter for this lab, as well as
the provided Car Simulator model. The code will be written using a text editor, and the interpreter
will be called using the command line.
class Control:
Kp, Ki, Kd = 0.5, 0.5, 0.5
Notice the indentation on the second line. (Python is whitespace sensitive and you will get an
error if the second line is not indented.) The first line creates a class called Control that will
be the brains of our cruise control system. The second line defines three variables within that
class, which are the parameters we will need to set for our particular system. (See Wikipedia
page for details on these parameters.)
5. Next, we will create an initialization method for our class. Below the two lines entered above,
enter the following code:
Again, notice the indentation. (The line beginning with “def” should be indented, as well as
the lines beneath that one.)
This method initializes the private variables we will be using in our PID controller, from a
user supplied target value and current value. (In our case, this is our target speed and current
speed.)
151
6. Next, we create methods for setting our parameters and for setting our target:
7. After creating the above methods, we will create the method that does the actual work for our
controller. Add the following update method:
This method takes in the current value, calculates the error based on the target value, then
calculates the three components of our PID calculation. It then sums those components,
weighted by the parameters Kp , Ki and Kd , and returns this value. It also updates the
previous error variable, for the next calculation.
8. After this, add one last method, useful for checking the error:
After creating our PID controller, we want to test it and find parameters that allow it to work best.
To do so, we will create another file, called tester.py, that will allow us to test our controller.
These lines import a math function allowing us to calculate the absolute value and the PID
controller class we just created.
152
4. Next we will create local variables to keep track of our speed and acceleration. Enter the
following code:
speed = 100
acceleration = 0.0
5. We next create a controller object, which we will use to adjust our speed. Enter the following
lines below what is already in your file:
The c variable will refer to our PID controller, which we set with a target speed of 60 and
a current speed equal to our speed variable. Next, we need to set the K parameters for our
controller. Your job is to find values that allow the system to quickly zoom in on the correct
value. You will do this through trial and error, after adding the rest of the code below and
running this file.
6. The next step is to add a loop that will call your controller and update the acceleration value
based on the output of your PID controller. Enter the following code:
While the error is greater than 0.01, the loop will iterate. First, it prints to the screen the
current error as well as the current speed. Next, it gets a new acceleration value from the
PID controller, by calling its update method, passing in the current speed. It then uses this
acceleration to update the current speed. Finally, after the loop is exited, the final values are
printed out.
7. The tester.py file should have the following final form:
speed = 100
acceleration = 0.0
153
9. Open the command line (From the Windows menu bar: Start > Run... > cmd). Navigate
to the folder where you created your file (use the following command: cd “C:\Folder\where
file\is”.)
10. From the command line, type the following to run your program and hit enter:
python tester.py
You should see a stream of output printed to your screen. Notice that the error should decrease,
until your speed is very close to the target speed.
11. Open and edit your tester.py file to find parameter values that minimize the number of steps
it takes to settle on the target. When you feel you have good values (it converges in ten or
less steps), move on to the next section.
We will now use the PID controller we created, with the parameter values you found through
experimentation, to control a cruise control system.
1. Within the same folder, create a new file called cruise control.py
2. Open the cruise control.py in the text editor of your choice (such as Notepad or Vim.)
3. Enter the following code and save the file:
acceleration = 0.0
speed = 0.0
cs = CarSimulator()
while 1:
speed = cs.update(acceleration)
acceleration = pid.update(speed)
pid.setParameters(0.3, 2, 1.5)
After this, we have a simple while loop that passes the acceleration to our car simulator, which
uses this acceleration to control the car speed. It returns the updated speed of the car (taking
into account road conditions, such as wind drag and any hills in the road which may affect
speed.) We then pass this new speed to our PID controller, in order to calculate what the next
acceleration adjustment should be, repeating the process.
154
4. Save and close this file.
5. From the command line, type the following to run your program and hit enter:
python cruise_control.py
You should see a window open up, with a car driving along a road. If your controller is working
properly, the car’s speed should remain around 60 mile per hour, regardless of what the road
conditions are. There may be some slight oscillation around the 60 mph mark, but you should
not see wild oscillations in speed. If you do, then you need to adjust your parameters until
you see a nice, controlled, fairly constant speed on your vehicle.
6 Questions
1. Briefly explain what a PID controller is and why we would want to use one for controlling a
cruise control system.
2. What are the three main components of a PID controller and what do they each do?
3. What parameter values did you find that allowed for best control of the car speed?
4. Did you see oscillations caused by your controller? What do oscillations mean, from a control
point of view? (In other words, what causes them?)
155
8.11 Direct and Indirect Objects
Spanish direct and indirect object pronouns used together are often problematic for the
person whose native language is English. By comparing the use of direct and indirect
objects first individually, and then together, in English, the student will be able to apply
the same strategies to identifying these items in Spanish.
156
Lab: Direct and Indirect Objects
Spring, 2012
1 Introduction
In order to communicate in both English and Spanish in an effective way, a person
must know how to replace nouns used in certain contexts with pronouns. By using
pronouns, people rid their sentences of redundancy and allow a more efficient way
of communicating orally as well as on paper. In English, the pronoun replaces the
noun and stays in the same position in the sentence. Direct objects in both languages
answer the question “what” or “who”.
In the Spanish system of direct object pronouns, me means “me”, te is you (singular
and informal), lo is him or it (masculine), nos is “us”, los is “them” when referring
to masculine people or objects and finally, las is “them” when referring to feminine
people or objects. For example in the sentence, “I see John”, John is the direct
object because he directly receives the action of the verb “to see”. In Spanish, the
same sentence is (Yo) veo a Juan, and Juan is still the direct object because we
haven’t yet replaced his name with a direct object. (NOTE: The reason that the
subject pronoun (Yo) meaning “I” is contained in parentheses is that, unlike English,
it is not needed since the ending of the verb in Spanish tells us who is doing the
action).
If I replace “John” in English with the pronoun “him”, the resultant sentence is “I see
him”. However, in Spanish, the pronoun lo used for him must be moved in FRONT
of the verb when used, since it depends upon the verb of the sentence for support.
So the resultant sentence is (Yo) lo veo.
In contrast, an indirect object of a verb is typically a human or animate being
because he or she receives the direct object or benefits indirectly from the verb.
Indirect objects typically answer the question “to who(m), for who(m), at who(m)”
or “from who(m).” In English, the words “to, for, from or at” are prepositions and
used to show the relationship of the “who” to the verb. For example, the verb “to
give” will always have both a direct object and an indirect object because we always
give SOMETHING (direct object) to SOMEONE (indirect object). In the sentence,
“I give the book to Teresa,” book is the direct object and Teresa is the indirect object.
157
If we replace those nouns with pronouns, the sentence in English becomes “I give it
to her.”
In Spanish, however, the indirect object pronoun is NOT used with a preposition and
is simply the word le when it refers to a third person like “him, her, or it.” To say
“to me, for me, at me, or from me,” in Spanish, the indirect object pronoun is me;
to you, for you, at you, or from you is te; and “to us, for us, at us, or from us” is
nos. The only pronouns whose forms are different from their direct object forms are
the 3rd person ones le for a third person like “him, her, or it” and les meaning “to,
for, at, or from them.”
Just like with the direct object pronoun in Spanish, the me, te, le, nos or les must
move up in front of the verb and cannot stay in place. So “I give the book to her“
becomes (Yo) le doy el libro.
Notice we did not replace “the book” with a direct object pronoun yet. That is
because the pronouns le and les become se when preceding a third person direct
object pronoun. So instead of Yo le lo doy which is incorrect, (Yo) se lo doy is the
correct way to say “I give it to her” in Spanish. The pronoun order is always that
the indirect object pronoun goes in front of the direct object pronoun and then the
verb so Spanish speakers don’t confuse the two objects.
A further complication is that all nouns have gender in Spanish, unlike English, but
direct object pronouns have gender just like they do in English, so lo works for “him”
or a masculine direct object. La is the direct object pronoun for “her” or a feminine
direct object. Le and les, however, do NOT have gender and can refer to “him, her,
it, or them” when replacing an indirect object in a sentence.
2 Problem Statement
In computation, we often transfer problems in a domain that is hard to conceptualize
to one that we understand better. Solving the problem in the simpler domain then
allows us to map the solution back to the original domain and discover a solution to
our original problem. This lab attempts to apply this basic computational skill to
the problem of language acquisition.
Spanish direct and indirect object pronouns used together are often problematic for
the person whose native language is English. Students must understand that if a
pronoun is left in its place in Spanish, the resultant sentence is unintelligible to the
Spanish speaker or causes confusion. By comparing the use of direct and indirect
objects first individually and then together in English, students will be able to apply
the same strategies to identifying these items in Spanish.
158
3 Exercises
The following exercises will help you to identify direct and indirect objects in English
and then apply that knowledge to Spanish in order to create new sentences that have
meaning. In order to facilitate the identification of pronouns without having to have
an extensive Spanish vocabulary, the conjugated verbs used will be glossed in English.
First lets try some identification of pronouns in English. Replace the direct object in
the following sentences with a pronoun:
These are pretty simple because the direct object always follows the verb. In Spanish,
those same sentences would have the direct object in front of the verb. So if ve is she
sees, me ve is “she sees me.” If he knows is conoce, how would you say “he knows
her”? (La conoce). And conozco is “I know” so I know them is ? (Los conozco).
Miramos is “we watch” so we watch it? (Lo miramos if it is a masculine thing like a
program, la miramos if it is a feminine thing like a snake).
Now replace the indirect objects with a pronoun:
In these sentences in English, you would be correct if you found the indirect object
after a preposition like “to”, “at”, or “from”.
159
3.2 Using Spanish Pronouns
Try the previous sentences in Spanish, remembering that the pronoun has to go in
front of the verb. Replace the indirect objects with a pronoun:
If you figured out that the indirect object was after “a”, you are correct. If you
replaced “Terry” and “perro” with “le” and “sus amigos” and “nuestros padres” with
“les”, you are correct.
Here are the answers for 1-4:
Now try replacing the direct objects with pronouns as well. Papeles is masculine and
plural, cartas is feminine and plural, la pelota is feminine and singular and regalos is
masculine and plural. Remember to change le and les to se when using them in front
of third person direct object pronouns.
4 Questions
1. Translate the following sentences into English. The verb is given in each case.
160
2. Create four sentences, using direct and indirect pronouns in Spanish, from the
following word bank:
• Verbs: recibimos, dejamos, manda, haces, tengo, tiro, da, escribe, ve,
conoce, conozco, miramos
• Nouns: la pelota, los regalos, el problema, los papeles, las cartas, el perro,
nuestros padres, sus amigos
161
8.12 Music Theory and the 12-tone System
Given that both free atonal and 12-tone music use the full chromatic spectrum, one
persistent problem in music analysis is determining to which category a post-tonal work
may belong. Therefore, it would be useful to devise a computational method for
differentiating between these two compositional approaches. Students will understand the
difference between free atonality and 12-tone music, and students will devise and
demonstrate a computational strategy for determining and analyzing this difference.
162
Lab: 12-Tone Music Theory
Spring, 2012
1 Introduction
The Tonal System of music was the prevailing method of music composition through-
out the period from around 1650-1900, and was used by such artists as J.S. Bach,
Mozart, Beethoven, Chopin, and Brahms, among others, to create some of the time-
less masterworks that we continue to listen to and appreciate today.
Throughout the 19th century, however, composers became increasingly interested in
both personal expression and musical programs emphasizing extra-musical impor-
tance. These aesthetic interests manifested themselves in an increased use of disso-
nance and a gradual breakdown in the syntax of the tonal system.
By the early 20th century, many composers had moved so far in the direction of
chromaticism that the pitch hierarchies that were the hallmark of the tonal system
were no longer in operation. In fact, many of the basic mechanics of the tonal system
such as key signatures and major and minor scales and triads were no longer found
in the music of these composers.
Even the term “dissonance” with its pejorative connotations was dispensed with.
Now, all intervals and pitch collections were considered consonant, albeit, some more
consonant than others. In a sense, anything was now possible. A composer no longer
had to adhere to a well-established musical language, but could create his or her own
language, independent of what his or her contemporaries were doing. Composers
were now free to explore new territory, not only in the domain of pitch relationships
(melody and harmony), but in areas such as rhythm, timbre, and form as well.
As a result, the older methods of viewing and analyzing music no longer applied to
this new “post-tonal” style. Therefore, music theorists had to devise new analytical
tools for describing and discussing the music. One of the most successful approaches
developed is known as “set theory.” This technique views collections of discrete
pitch classes of various cardinalities and provides a means of cataloging them and
subsequently comparing them with other collections. By analyzing and comparing
the sets used in a given composition, theorists can gain valuable insight into the piece
and the composer’s compositional method. The “set” is a collection of unordered
163
pitch-classes1 and may be presented as either a melodic or harmonic entity in a given
composition. Theorists typically look at certain “promising-looking” pitch collections
within a composition, determine the set-class2 that the given collection belongs to,
and then look for other pitch collections that are members of the same set-class. This
takes a fair amount of time since a given set-class can appear in many different guises.
The reason for this is due to several factors including transpositional equivalence,
inversional equivalence, and the fact that the set members may appear in any order,
not to mention that the composer is likely using a given set both melodically (linearly)
and harmonically (vertically) within a piece.
A computer program that enables a theorist to quickly identify a given set-class and
its various iterations throughout a composition would be an extremely useful tool. If
a theorist believed that the set-class [0,1,4]3 were significant within a piece and could
then simply type in the given set-class and have the program search for all iterations
of [0,1,4] throughout the composition, the theorist would likely be able to quickly tell
whether or not the given set-class was important to the construction of the work.
If it were determined that the set-class was not that important based perhaps on a
limited number of occurrences, then the theorist could simply search for iterations of
another set-class type.
If a program were to search for occurrences of [0,1,4] in the linear domain, then it
would need to search through segments of pitch classes. For example, a given melodic
segment when notated in numeric notation (C=0, C#/Db=1, D=2, etc.), may appear
as 4, 1, 0, 9, 5, 6. The first three pitches of the segment are clearly members of the
unordered set-class [0,1,4]. However, the segment 1, 0, 9 is also a member of this
set-class due to both transpositional and inversional equivalence. A third iteration of
the [0,1,4] set-class is found in the segment 9, 5, 6.
The program would also need to search through vertical simultaneities. For example,
a chord containing the pitch classes 10, 5, 2, 9, 6, 1, contains numerous occurrences of
[0,1,4]: (10,9,6), (10,9,1), (10,2,1), (5,2,6), (5,2,1), (5,9,6). What this analysis reveals
to the theorist is that each member of the simultaneity belongs to three different
[0,1,4] groupings. This information would likely influence how the analyst would
1
A “pitch-class” accounts for all of the pitches of the same alphabet name and enharmonic
spellings, regardless of register (octave position). Therefore, all C#;s and Db’s belong to the same
pitch-class.
2
A “set-class” refers to all pitch-class sets that share the same prime form. Prime forms are
expressed in integer notation (mod. 12, since there are 12 pitch-classes in the chromatic scale) and
are transposed to begin with 0. Therefore, the set (3, 4, 8) has a prime form of [0,1,5]. We get
this simply by “transposing” the set to 0 (T9 ). Likewise, the set (5, 9, 10) also has a prime form
of [0,1,5]. To understand this, we must accept the concept of inversional equivalence, which states
that a set-type and its inversion are the same due to the preservation of intervallic content under
inversion. Therefore, if we invert (5, 9, 10) about the zero axis (T0 I), we get the inversionally
equivalent set, (7, 3, 2). This is then transposed (T1 0) to get (5, 1, 0), and then reordered into its
prime form beginning on 0: [0,1,5]. By reducing a pitch-class set to its prime form one can easily
categorize set-classes.
3
Brackets [ ] are used to denote the prime forms of unordered set-classes, and parentheses are
used to denote simple pitch-class sets.
164
consider other simultaneities within the piece.
Another possibility is that a set-class may be partitioned among instrumental voices.
Therefore, one pitch may be found in the violin, another in the clarinet, and a third
in the cello, none of which are played simultaneously. The program should also have
the ability to search for and illuminate set iterations that are not exclusively linear
or vertical.
Such a computer program would provide the music theorist with a powerful tool
for analyzing the music of the post-tonal era. Not only would it quickly reveal the
frequency with which a certain set-class occurs within a piece, but it would also reveal
to the theorist where these sets occur and if and how they are interlocked and related,
information that may reveal a great deal about the compositional method behind the
piece.
2 Problem Statement
Your task is to build a set-class analysis tool for midi files. Your program will take
in a midi file as input, look through the file for occurrences of triad set-classes and
report these (with their locations) to the user. Your program should also be capable
of accepting a prime form set-class and reporting where it occurs in the piece.
3 Tools
You will be using the Python programming language and Python interpreter for this
lab. The code will be written using a text editor, and the interpreter will be called
using the command line.
4 Programming
A prime form calculator, which takes as input a set of notes and returns its prime
form, is provided for you as is a simple midi parser that takes in a midi file and
calculates note events (where they occur and their duration) and midi tempo data.
These are available on the course website. Using these scripts, you will be able to
select a group of notes from the parsed midi data, submit them to the prime form
calculator, and determine which prime form set-class they belong to.
Part of your task for this lab is determining a strategy for searching a given work
for both linear and vertical occurrences of set-classes. Given the tools available to
165
you (such as note data), create a strategy for searching groups of notes for set-class
occurrences.
As a help in this lab, you are given a midi.py file, which contains code showing how
to access the note data, the tempo data and the prime form calculator. The note
data is contained as tuples in a python list, with the following form:
The pitch info denotes the note, and the keyDownTime and keyUpTime allow you to
know when a note starts and ends, so that you can determine note overlap.
To call the program, using an input file and a prime form set-class to search for, you
use the following command:
The “-i” option allows you to input a midi file, in this case music.mid. The “-p”
option allows you to search for the prime form [1,0,5].
5 Questions
1. Describe your strategy for finding prominent set-classes within a work.
3. What advantages (if any) would a human have in performing this same task?
166
8.13 Game Development
Write a video game using a high-level programming language. Students will demonstrate
effective use of program documentation, demonstrate the application of computational
thinking through the design process of a video game, and demonstrate the ability to
implement and test a software application.
167
8.14 Information Sharing and Collaboration
Google Docs and Web Pages
168
9 Collaborators
• Brian Garner, Ph.D.
Baylor University, Engineering
Cruise Control
169
• Lori Baker, Ph. D
Baylor University, Forensic anthropology
Blood splatter
170
References
[1] Python programming language - official website, January 2011.
http://www.python.org/.
[5] O. Hazzan. Reflections on teaching abstraction and other soft ideas. SIGCSE Bull.,
40(2):40–43, 2008.
[7] J. Kramer. Is abstraction the key to computing? Commun. ACM, 50(4):36–42, 2007.
171
REFERENCES
Allan, V., Barr, V., Brylow, D., & Hambrusch, S. (2010, March). Computational
thinking in high school courses. Proceeding of the ACM SIGCSE , 390-391.
Armoni, M., & Gal-Ezer, J. (2006, March). Reduction - an abstract thinking pattern:
The case of the computational models course. Proceeding of the ACM SIGCSE .
Asiala, M., Brown, A., DeVries, D. J. ., Dubinsky, E., Mathews, D., & Thomas, K.
(1996). A framework for research and curriculum development in undergradu-
ate mathematics education (Vol. 6). Washington, DC: Conference Board of the
Mathematical Sciences.
Asiala, M., Cottrill, J., Dubinsky, E., & Schwingendorf, K. E. (1997). The develop-
ment of students’ graphical understanding of the derivative. Journal of Mathe-
matical Behavior , 16 , 399–431.
Barr, V., & Stephenson, C. (2011). Bringing computational thinking to k-12: What
is involved and what is the role of the computer science education community?
ACM Inroads, 2 (1), 48–54.
Board, N. S. (2010). Science and engineering indicators 2010 (Vol. 46) (No. 2).
Arlington, VA: National Science Foundation (NSB 10-01). (www.nsf.gov statistics
seind10 pdf front.pdf)
Bryant, R., Chinn, D., Potluri, S., Hauser, G., Folsom, M., & Wallace, S. (2009).
Computational thinking - what is it, how is it relevant, who’s doing what with it?
Journal of Computing Sciences in Colleges, 25 .
172
Clark, J., Master, C. H., John, D. S., Tolias, G., & Vakil, R. (1999). Student atti-
tudes toward abstract algebra. Problems, Resources, and Issues in Mathematics
Undergraduate Studies, 9 (1), 76-96.
Cohen, J. (1988). Statistical power analysis for the behavioral sciences, (2nd ed.).
New York, New York: Psychology Press.
Curzon, P., Peckham, J., Taylor, H., Settle, A., & Roberts, E. (2009, July). Compu-
tational thinking (ct): On weaving it in. Proceedings of the ITiCSE , 201-202.
Dziuban, C., Moskal, P., & Hartman, J. (2005). Higher education, blended learning
and the generations: Knowledge is power-no more. Needham, MA: Sloan Center
for Online Education: Elements of quality online education: Engaging communi-
ties.
Freshwater, D. (2007). Reading mixed methods research, contexts for criticism. Jour-
nal of Mixed Methods Research, 1 (2), 134-146. doi: 10.1177-1558689806298578
Good, J., Romero, P., du Boulay, B., Reid, H., Howland, K., & Robertson, J. (2008,
January). An embodied interface for teaching computational thinking. IUI’08 ,
23 , 13-16.
Hair, J. F., Black, W. C., Babin, B. J., & Anderson, R. E. (2010). Multivariate data
analysis, (7th ed.). Upper Saddle River, NJ: Prentice Hall.
Hambrusch, S., Hoffmann, C., Korb, J. T., Haugan, M., & Hosking, A. L. (2009). A
multidisciplinary approach towards computational thinking for science majors. In
Sigcse ’09: Proceedings of the 40th acm technical symposium on computer science
173
education (pp. 183–187). New York, NY, USA: ACM. doi: http://doi.acm.org/
10.1145/1508865.1508931
Hazzan, O. (2008). Reflections on teaching abstraction and other soft ideas. SIGCSE
Bull., 40 (2), 40–43. doi: http://doi.acm.org/10.1145/1383602.1383631
Healey, M., & Jenkins, A. (2007). Kolb’s experiential learning theory and its appli-
cation in geography in higher education. Journal of Geography, 99 (5), 185-195.
Heinssen, R. K., Glass, C. R., & Knight, L. A. (1987). Assessing computer anxiety:
Development and validation of the computer anxiety rating scale. Computers in
Human Behavior , 3 (1), 49-59.
Hembree, R. (1990). The nature, effect, and relief of mathematics anxiety. Journal
for Research in Mathematics Education, 21 (1), 33–46.
Henderson, P. B., Cortina, T. J., Hazzan, O., & Wing, J. M. (2007, March). Com-
putational thinking. Proceeding of the ACM SIGCSE , 195-196.
Howell, L., Jamba, L., Kimball, A. S., & Sanchez-Ruiz, A. (2011, March). 2012.
In 49th acm southeast conference (pp. 48–52). New York, NY, USA: ACM. doi:
978-1-4503-0686-7/11/03
Jenkins, J. T., Jerkins, J. A., & Stenger, C. L. (2012, March). A plan for imme-
diate immersion of computational thinking into the high school math classroom
through a partnership with the alabama math, science, and technology initiative.
In Acmse’12 (p. 148-152). New York, NY, USA: ACM. doi: 978-1-4503-1203-5/
12/03
Kayes, D. C. (2005). Internal validity and reliability of kolb’s learning style inventory
version 3 (1999). Journal of Business and Psychology, 20 (2), 249-257.
Kolb, A. Y., & Kolb, D. A. (2005). Learning styles and learning spaces: Enhancing
experiential learning in higher education. Academy of Management Learning and
Education, 4 (2), 193-212.
Kolb, D. A., Boyatzis, R. E., & Mainemelis, C. (2000). Experiential learning the-
ory: Previous research and new directions. In Perspectives on cognitive, learning,
and thinking styles, r. j. sternberg and l. f. zhang (eds.). New Jersey: Lawrence
Erlbaum.
174
Kramer, J. (2007). Is abstraction the key to computing? Commun. ACM , 50 (4),
36–42. doi: http://doi.acm.org/10.1145/1232743.1232745
Lee, I., Martin, F., Denner, J., Coulter, B., Allan, W., Erickson, J., . . . Werner, L.
(2011, March). Computational thinking for youth in practice. Inroads, 2 (1), 32 -
37. doi: 10.1145/1929887.1929902
Leso, T., & Peck, K. (1992). Computer anxiety and different types of computer
courses. Journal of Educational Computing Research, 8 , 469 - 478.
Lu, J. J., & Fletcher, G. H. L. (2009, March). Thinking about computational think-
ing. Proceeding of the ACM SIGCSE , 260-264.
Morreale, P., Goski, C., Jimenez, L., & Stewart-Gardiner, C. (2012). Measuring
the impact of computational thinking workshops on high school teachers. JCSC ,
27 (6), 151-157.
NRC. (2009). Report of a workshop on the scope and nature of computational think-
ing. http://www.nap.edu/catalog/12840.html. National Academies Press.
NSF. (2009, June). National science foundation, directions for computer and in-
formation science and engineering. (http://www.nsf.gov/cise/funding/cpath faq
.jsp)
175
Qualls, J. A., Grant, M. M., & Sherrell, L. B. (2011, May). Cs1 students’ un-
derstanding of computational thinking concepts. CCSC: Mid-South Conference:
Mid-South Conference, 62-71.
Qualls, J. A., & Sherrell, L. B. (2010, May). Why computational thinking should be
integrated into the curriculum. JCSC , 25 (5), 66-70.
Repenning, A., Webb, D., & Ioannidou, A. (2010, March). Scalable game design
and the development of a checklist for getting computational thinking into public
schools. Proceeding of the ACM SIGCSE , 265-269.
Ruthmann, A., Heines, J. M., Greher, G. R., Laidler, P., & Saulters, C. (2010,
March). Teaching computational thinking through musical live coding in scratch.
Proceeding of the ACM SIGCSE , 351-355.
Salinger, S., Plonka, L., & Prechelt, L. (2008, May). A coding scheme development
methodology using grounded theory for qualitative analysis of pair programming.
Human Technology: An Interdisciplinary Journal on Humans in ICT Environ-
ments, 4 (1), 9-25.
Settle, A., & Perkovic, L. (2010). Computational thinking across the curriculum: A
conceptual framework. http://via.library.depaul.edu/tr/13. DePaul University.
University, B. (2010). Fall 2010 headcount enrollment report. Unpublished report,
Baylor University, Waco, Tx. (University Publication)
University, B. (2011). Baylor university undergraduate catalog. Unpublished report,
Baylor University, Waco, Tx. (University Publication)
Weller, K., Clark, J. M., Dubinsky, E., Loch, S., aA. McDonald, M., & Merkovsky,
R. R. (2003). Student performance and attitudes in courses based on apos theory
and the ace teaching cycle. CBMS Issues in Mathematics Education, 12 , 97-131.
Willcoxson, L., & Prosser, M. (1996). Kolb’s learning style inventory (1985): re-
view and further study of validity and reliability. British Journal of Educa-
tional Psychology, 66 (2), 247–257. Retrieved from http://dx.doi.org/10.1111/
j.2044-8279.1996.tb01193.x doi: 10.1111/j.2044-8279.1996.tb01193.x
Wing, J. M. (2006, March). Computational thinking. Communications Of the ACM ,
49 (3), 33-35.
Wing, J. M. (2008, January). Five deep questions in computing. Communications
Of the ACM , 51 (1), 58-60.
Wolz, U., Stone, M., Pearsom, K., Pulimood, S. M., & Switzer, M. (2011, July).
Computational thinking and expository writing in the middle school. ACM Trans-
actions on Computing Education, 1-22. doi: 10.1145/1993069.1993073
Yin, R. K. (2008). Case study research: Design and methods (4th ed.). Thousand
Oaks, CA: Sage Publications.
176