Sei sulla pagina 1di 188

ABSTRACT

Mixed-Methods Study of the Impact of a Computational Thinking Course on


Student Attitudes about Technology and Computation

William A. Booth, Ph.D.

Chairperson: Susan K. Johnsen, Ph.D.

The following dissertation reports on a mixed-methods, convergent parallel de-

sign research study of the impact of a computational thinking curriculum on attitudes

towards computation and the use of technology. This study used a new curriculum

in computational thinking recently developed through a National Science Foundation

(NFS) Pathways to Revitalized Undergraduate Computer Education (CPATH) grant

as the intervention. The purpose of this one-semester course is to introduce computa-

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

accustomed to using computation as a problem solving tool.

The treatment group was represented by twenty-two students randomly selected

from an information technology course. The traditional curriculum for this informa-

tion technology course was modified to include topics from the computational thinking

curriculum. Topics included problem abstraction and decomposition, understanding


fundamental programming concepts, and appreciating the practical and theoretical

limits of computation. Those students enrolled in the information technology course,

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

receiving formal training in computational thinking.

The qualitative data were encoded and analyzed for evidence of the course’s im-

pact on the participants’ attitudes towards and application of computational strate-

gies in problem solving. This study found that when students participate in a com-

putational thinking course there is in increase in the use of computational strategies

in problem solving, an increase in positive affect towards computational thinking and

a decrease in computer anxiety.


Mixed-Methods Study of the Impact of a Computational Thinking Course on
Student Attitudes about Technology and Computation

by

William A. Booth, B.S., M.S.

A Dissertation

Approved by the Department of Educational Psychology

Marley W. Watkins, Ph.D., Chairperson

Submitted to the Graduate Faculty of


Baylor University in Partial Fulfillment of the
Requirements for the Degree
of
Doctor of Philosophy

Approved by the Dissertation Committee

Susan K. Johnsen, Ph.D., Chairperson

Janet H. Bagby, Ph.D.

Julie K. Ivey-Hatz, Ph.D.

William B. Poucher, Ph.D.

Tony L. Talbert, Ph.D.

Accepted by the Graduate School


May 2013

J. Larry Lyon, Ph.D., Dean

Page bearing signatures is kept on file in the Graduate School.


c 2013 by William A. Booth
Copyright
All rights reserved
TABLE OF CONTENTS

LIST OF FIGURES viii

LIST OF TABLES ix

ACKNOWLEDGMENTS x

DEDICATION xi

1 Introduction 1

Significance of the Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Theoretical Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Rational for the Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Quantitative Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Qualitative Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Mixed Methods Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2 Literature Review 13

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Computational Thinking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Curriculum Development and Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Related Studies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Experiential Learning Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

iv
Related Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3 Methods 33

Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Quantitative Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Qualitative Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Mixed Methods Research Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Population and Sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Instruments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Quantitative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Qualitative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Intervention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

4 Results 47

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Treatment Group Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

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? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

v
Research Question 2: Do students who participate in formal training in
computational thinking produce quality solutions to computational
problems? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Research Question 3: Do students who participate in formal training in


computational thinking decrease their computer anxiety when
compared to students who do not? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Research Question 4: In what ways does formal training in


computational thinking change attitudes of students who
participate in a course in computational thinking? . . . . . . . . . . . . . . . . . 54

Research Question 5: In what ways does formal training change


computer anxiety of students who participate in a course in
computational thinking? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Research Question 6: In what ways does formal training in


computational thinking change the computational strategies of
students? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

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

A Computer Anxiety Scale (CARS) 88

vi
B Computational Thinking Problem Solving Inventory (CTPSI) 90

C Grading Rubric 95

D Interview Questions 96

E Computational Thinking Curriculum 97

REFERENCES 172

vii
LIST OF FIGURES

1.1 Experiential Learning Theory . . . . . . . . . . . . . . . . . . . . . . . . 7

3.1 Convergent Parallel Mixed Methods Designs . . . . . . . . . . . . . . . . 36

viii
LIST OF TABLES

3.1 Alignment of Interview Questions to Research Questions . . . . . . . . . 40

3.2 Relationship Between Questions, Instruments, and Data Analyses . . . . 45

4.1 Participants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

4.2 Normality of CTPSI Data . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.3 Computational Thinking Problem Solving Inventory . . . . . . . . . . . . 51

4.4 Program Quality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.5 Computer Anxiety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4.6 Lab Survey Questions About Importance . . . . . . . . . . . . . . . . . . 56

4.7 Lab Survey Questions About Enjoyable . . . . . . . . . . . . . . . . . . . 58

4.8 Lab Survey Questions Nervous . . . . . . . . . . . . . . . . . . . . . . . 59

4.9 Nervousness: Math Problems vs. JavaScript and Photoshop Macros . . . 60

4.10 Lab Survey Questions Comfortable . . . . . . . . . . . . . . . . . . . . . 61

4.11 Lab Survey Questions Assistance . . . . . . . . . . . . . . . . . . . . . . 62

4.12 Mixed Methods Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

ix
ACKNOWLEDGMENTS

This project could not have been completed without the support of my family,

friends, and a dedicated, caring community of scholars. I would like to thank my

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

both an academic and teacher.

I would also like to thank the Department of Educational Psychology. It is a

blessing to be taught by a dedicated and talented faculty. An additional thanks goes

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

foundation that has made the completion of this project possible.

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,

2009). Computational thinking is the application of specific problem solving strate-

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-

putational framework. It would be difficult to think of a computational model that

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).

Using computation as a problem solving strategy may involve dividing a prob-

lem into its parts, and then solving each part separately or choosing an appropriate

representation for a problem or modeling the relevant aspects of a problem to make

it tractable. CT thus is using abstraction and decomposition when attacking a large

complex task or designing a large complex system (Astrachan, 2009).

Computational thinking encompasses a rich set of skills including formulating

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

problem can be solved by reducing it to a smaller or simpler instance of the original

problem. Through a process of repeated reduction eventually the problem is reduced

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

is a common-place occurrence and should not be treated as an exotic construct in

computation (Eisenberg, 2008).

Of all the skills associated with computational thinking, abstraction is perhaps

the most difficult to master. Conceptualizing a problem through abstraction allows

the problem solver to find links between problems and reuse solutions (Qualls &

Sherrell, 2010). The interdisciplinary aspect of computational thinking allows it to

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

applied in non-computational settings allowing the problem solver to see a problem

through multiple perspectives.

Significance of the Study

The influence of computers in society for both professionals and students is of

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

use it effectively. Wing 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”(Wing, 2006, p. 33).

The number of students selecting computer science as a college major is declin-

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

negative perception of computer science must be improved if sufficient numbers of

students are to be recruited to computational sciences to meet this growing demand.

One way to address this negative perception is to teach computational thinking as a

problem solving strategy.

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

Revitalized Undergraduate Computing Education (CPATH) Program” (NSF, 2009,

p. 4). In the revised solicitation all grant proposals must include computational

thinking to be considered for funding.

In a technologically advanced society, citizens who lack a solid foundation in,

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

in a technologically rich society to possess basic competency with computational

tools. Next, computational thinking courses focused on programming do not address

problem solving.

3
Finally, there is a need to correct a poor public perception of careers in com-

puting. Each of these issues will be discussed below.

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).

Students and practicing professionals in information-based fields, like science and en-

gineering, require a basic competency with computational tools, but this ability is

increasingly necessary for individuals in non-science fields. Because membership in

any modern society requires the use of technology, an understanding of its capabili-

ties and limitations is increasingly critical to the successful participation in everyday

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).

Moreover, formal instruction in problem solving has been shown to improve

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

interaction with a computer (Qin, 2009b).

A key feature that must be addressed is separating the idea of computational

thinking from the act of programming (Qualls & Sherrell, 2010). Programming is

a process used by computer scientists and programmers to construct a set of in-

structions for a digital computer to solve a particular problem or class of problems.

Thinking computationally is not simply programming; instead, it is a way of looking

4
at problems through a filter designed to optimize the potential benefit of applying

technology to problem solving. Thus, computational thinking is a key aspect of pro-

gramming but is not unique to computer science (Denning, 2009). To provide the

greatest impact and make computational thinking accessible to the maximum num-

ber of people computational thinking courses should not be programming centric.

Introductory Information Technology courses for non-computer science majors are an

ideal venue to allow students to explore abstraction, decomposition, problem solving,

software engineering techniques, relational database design, programming concepts

and constructs (Bryant et al., 2009).

Teaching computational thinking may also help to correct a poor public percep-

tion of careers in computing. Perceptions of professionals in the field of computing as

socially marginalized individuals who spend the majority of there time isolated from

human interaction while writing computer software are not accurate. This negative

perception impacts the number of college students choosing computing as a major

(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

be solved with a computational strategy.

Theoretical Framework

This convergent mixed method research project takes a pragmatic ontological

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

participants in that reality experience it differently, from a deeply personal perspective

(Creswell & Plano-Clark, 2011).

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-

tivism are (Lainema, 2009):


5
(1) Learning is an active process of constructing rather than acquiring knowledge

(2) Instruction is a process of supporting that construction rather than commu-

nicating knowledge.

The constructivist world view holds that learning is an active, contextualized,

constructive process. The learner constructs meaning from information gathered

through their senses within some context. People actively construct their own sub-

jective representations of objective reality (Lainema, 2009).

Experiential Learning Theory (ELT) differentiates itself from other cognitive

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).

“Taken together, Dewey’s philosophical pragmatism, Lewin’s social psychology, and

Piaget’s cognitive-developmental genetic epistemology form a unique perspective on

learning and development” (D. Kolb, 1984). The ELT holds that learning takes

four distinct forms. Two modes of grasping experience, Concrete Experience (CE)

and Abstract Conceptualization (AC), and two modes of transforming experience

Reflective Observation (RO) and Active Experimentation (AE) (D. A. Kolb et al.,

2000). Kolb (2000) gives the following description of this model:

The ELT model portrays two dialectically related modes of grasping


experience – Concrete Experience (CE) and Abstract Conceptualiza-
tion (AC) – and two dialectically related modes of transforming ex-
perience – Reflective Observation (RO) and Active Experimentation
(AE). According to the four-stage learning cycle depicted in Figure
1, immediate or concrete experiences are the basis for observations
and reflections. These reflections are assimilated and distilled into ab-
stract concepts from which new implications for action can be drawn.
These implications can be actively tested and serve as guides in cre-
ating new experiences (D. A. Kolb et al., 2000).

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.

The learner uses symbolic representation or abstract conceptualization as a model

6
Figure 1.1. Experiential Learning Theory (A. Y. Kolb & Kolb, 2005, 195)

to thinking about, analyzing, or systematically planning, rather than using physical

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.

It is almost impossible to simultaneously read a driving manual while actually driving

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

et al., 2000, p. 4).

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-

putationally. The instructor then demonstrated how to construct a computational

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

an example of a computational solution to a given problem type. The presentation of

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

active experimentation phase of each module. The AE phase of each instructional

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.

Rational for the Study

It is part of the human condition to solve problems. A human being’s ability

to problem solve is a critical aspect of what it means to be human. Professors of

computer science should teach a course called “Ways to Think Like a Computer

Scientist” to college freshmen, making it available to non-majors, not just to computer

science majors. These courses should help the students answer questions like. What is

computable? What is intelligence? What is information? How can we build complex

systems simply? Computational thinking is a grand vision to guide computer science

educators, researchers, and practitioners as they seek to change society’s perceptions

about problem-solving and about the field of computer science (Wing, 2006). In a

technology rich society, computational thinking is a powerful problem solving strategy.

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

help of technology and what is not.

The goal of this study is to determine if formal instruction in computational

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

ideas, computational thinking should be taught in elementary school to help ensure

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 and reports of best practices.

Results from this study will help to inform educators and students about the

importance of computational thinking. Teachers, students and the general public

need to know what computational thinking is, what types of problems can be solved

computationally, and the capabilities of modern computational tools.

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

to investigate different aspects of the impact of teaching a course in computational

thinking (CT).

The quantitative strand investigated three effects of formal training in compu-

tational thinking. Research question one (RQ1) looked at what effect CT training

has on the frequency of CT as a problem solving strategy. Research question two

(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

effects the learners’ level of computer anxiety.

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-

titative strands into a metanarrative. RQ7 addressed the effect of CT on attitudes

about the use of computation in problem solving and, RQ8 investigated the impact

of training in CT on the learner’s understanding of solving computational problems.

The following are research questions for each category in this dissertation.

Quantitative Research Questions

RQ1 Do students who participate in formal training in computational thinking in-

crease the frequency of the use of computational strategies in problem solving

when compared to students who do not?

RQ2 Do students who participate in formal training in computational thinking pro-

duce quality solutions to computational problems?

RQ3 Do students who participate in formal training in computational thinking de-

crease their computer anxiety when compared to students who do not?

Qualitative Research Questions

RQ4 In what ways does formal training in computational thinking change attitudes

of students who participate in a course in computational thinking?

10
RQ5 In what ways does formal training in computational thinking change computer

anxiety of students when compared to students who do not?

RQ6 In what ways does formal training in computational thinking change the com-

putational strategies of students?

Mixed Methods Research Questions

RQ7 How does formal training in computational thinking impact the learners’ atti-

tudes towards the use of computational strategies in problem solving?

RQ8 How does formal training in computational thinking impact the learners’ un-

derstanding of computation and its application to problem solving?

Each question was crafted to guide this study in determining the impact of

teaching computational thinking on the attitudes and capabilities of the students in

the treatment group. Different dimensions of each question were investigated through

the qualitative and quantitative strands of this study.

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

of formal training in computational thinking has on the attitudes of learners towards

computation and the use of technology in problem solving. The study also docu-

mented the impact of formal training in computational thinking on the frequency of

computational thinking as a problem solving strategy.

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

computers and computer technology are at an advantage when compared to individu-

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

techniques or computer applications to problem solving. This third skill is known as

computational thinking and is arguably the most critical of the three skills (Settle &

Perkovic, 2010).

Computational thinking offers fresh insights into ways of seeing problems in

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;

Repenning, Webb, & Ioannidou, 2010).

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

13
professional fields, and even the personal lives of individuals living in a world where

computing is ubiquitous (Denning, 2009).

. . . just as proficiency in basic language arts helps us to effectively


communicate and in basic math helps us to successfully quantitate,
proficiency in computational thinking . . . helps us to systematically,
correctly and efficiently process information and tasks. (Lu & Fletcher,
2009, p. 260)

As the prevalence of computing technology continues to grow, the need to think

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

members of any modern society (Wing, 2006).

Computational Thinking

The concept of computational thinking has been around for centuries, since the

very beginnings of mathematics (Salinger, Plonka, & Prechelt, 2008). However, the

current understanding of what is meant by computational thinking was proposed in

Jeannette Wing’s article “Computational Thinking”, published in the Communica-

tions of the Association for Computing Machinery in 2006. In this seminal work,

Wing defines computational thinking as:

. . . solving problems, designing systems, and understanding human


behavior, by drawing on the concepts fundamental to computer sci-
ence. Computational thinking includes a range of mental tools that
reflect the breadth of the field of computer science (Wing, 2006, p.
33).

Computational thinking is a strategy for problem solving that draws on concepts

and methodologies fundamental to computer science to address questions in a broad

range of subjects (Qin, 2009b; Wing, 2006). Put in other words, Computational

thinking is the process of analyzing problems so their solutions can be represented as

computational steps in an algorithms (Aho, 2011; Barr & Stephenson, 2011).

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-

putational thinking is a way of thinking that uses concepts and methodologies of

computing to address questions in a broad range of subjects, and as such, computa-

tional thinking offers an important skill set in modern sciences (Qin, 2009a, p. 188).”

Henderson added that idea that computational thinking is a metaphor of reasoning

both human and computer.(Henderson, Cortina, Hazzan, & Wing, 2007)

In addition to defining computational thinking, several researchers have worked

to identify the key characteristics of computational thinking. Working from the un-

derstanding of computational thinking as a problem solving skill; Kranov, Bryant

Orr, Wallace and Zhang (2010) identified the following list of computational thinking

characteristics:

• Using critical thinking

• Breaking a task down into a series of distinct steps

• Using logic, mathematics and abstraction to solve problems

• Applying reasoning to algorithmic and heuristic solutions to problems

• Using logical processes with computing technology

• Understanding limitations of generalized solution

• Modeling problems and calculating solutions

• Implementing and then interpreting a solution vis-a-vis the original problem

• Generalizing a single observation or solution to explain multiple instances

• Applying algorithmic approaches to analyze computation process

• Applying recursive thinking

• Identifying and weighing cost-benefit tradeoffs of different solutions

• Mathematical modeling

15
Of these characteristics, several researchers have suggested that abstraction is

the most important. Computational thinking requires thinking at multiple levels of

abstraction (Wing, 2006; Hazzan, 2008). As the computational problems to be solved

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

or simplifying the representation and the process of generalizing the representation

to an entire class of problems (Kramer, 2007). Many learners, both in secondary

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

(Armoni & Gal-Ezer, 2006).

Curriculum Development and Training

Within the field of computer science, the concept of computational thinking is

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-

disciplinary seeking to integrate training in computational thinking with a diverse set

of academic disciplines. In their article, “Teaching Computational Thinking through

Musical Live Coding in Scratch”, Ruthmann, Heines, Greher, Laidler and Saulters

(2010), describe an ongoing effort to integrate computational thinking in music educa-

tion. In this course students use a programming environment called Scratch to create

music using basic programming concepts like loops, initialization, variables, modu-

larization, event processing, and changing variables algorithmically. The researcher

16
only report anecdotal evidence but the course seems to have a positive impact on the

learners affect toward computer technology and computational thinking (Ruthmann,

Heines, Greher, Laidler, & Saulters, 2010).

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

mechanism to engage students in computational thinking. Through this program a re-

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

also seemed to comprehend ideas that had previously been troublesome”(Repenning

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.

• low threshold: a student can produce a working game quickly.


• has high ceiling: a student can make a real game that is playable
and exhibits sophisticated behavior, e.g., complex AI.
• scaffolds Flow: the curriculum provides stepping stones with
managed skills and challenges to accompany the tool.
• enables transfer: tool + curriculum work for both game design
and subsequent computational science applications as well as
support transfer between them.
• supports equity: game design activities are accessible and moti-
vational across gender and ethnicity boundaries.
• systemic and sustainable: the combination of the tool and cur-
riculum can be used by all teachers to teach all students (e.g.
support teacher training, standards alignment etc).

An additional example of computational thinking in music education was in-

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-

ucation. In this curriculum students arrange and physically connect a number of

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

the learner to be exposed to a set of computational concepts like sequential execu-

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.

Morreale, Goski, Jimenez, and Stewart-Gardiner (2012), investigated the ef-

ficacy of teacher training in computational thinking. This study investigated the

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

understanding of what computer science was or what computer scientist do in the

professional application of computation. Other important training models included,

using Google sites with students, computer science in the New Jersey core curriculum

and algorithmic thinking unplugged (Morreale, Goski, Jimenez, & Stewart-Gardiner,

2012). This study showed that this type of training helped the high school teachers

improve their understanding of computer science and computational thinking. The

importance of this finding is that once trained the high school teachers are better pre-

pared to assist their students in becoming computational thinkers. In addition the

teachers are also better prepared to assist in the implementation of computational

thinking in the classrooms (Morreale et al., 2012).

18
Another public school initiative, focused on middle school and high school stu-

dents, is described in the article, “Computational Thinking for Youth in Practice”

(Lee et al., 2011). In this article the authors present a use-modify-create frame-

work, representing the three phases of cognitive activity in computational thinking.

The authors suggest three concrete steps to support the development of computa-

tional thinking. First, they recommend the use of a rich computational environment.

Second, a three-stage progression for engaging youth in computational thinking is

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

allowing it to solve more complex problems or different aspects of a problem. Finally,

in the create stage; the learners create their own computational tool. The final step

is to move between problem domains, providing the learners with opportunities to

transfer their computational thinking skills form one domain to another. The article

concludes by arguing that youth should be exposed to computational thinking at an

early age and that this study demonstrated the practicality of early exposer to com-

putational thinking. A final observation is that computational thinking occurs over

a continuum that must be developed over time (Lee et al., 2011).

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.

To establish the feasibility of this initiative, the researchers conducted a training

workshop for math education leaders to demonstrate that computer programming

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

not familiar with computer programming or computational thinking. However, after

training the math teachers:

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

attitudes towards computational thinking and understanding of computer science.

In addition to efforts to introduce computational thinking in the public schools,

several studies have investigated the process and impact of incorporating computa-

tional thinking in courses at the university level. In the article, Teaching Computa-

tional Thinking through Bioinformatics to Biology Students, Qin (2009) describes a

curriculum development effort that integrates computational thinking in an under-

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

computational thinking skills (Qin, 2009b).

Howell (2011) describes an interdisciplinary project, between the department

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).

A number of benefits were observed from the introduction of formal modeling in

the English curriculum. First, it clarified the computational thinking concept of

modeling. Second, it promoted critical reflection on the concepts under investigation.

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

teach modeling, thus providing a mechanism to simultaneously teach the analytical

tool and its application (Howell et al., 2011).

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

thinking on middle school students who participated in an interactive journalism

program, undergraduate students who participated in a computer science course, and

pedagogy in university level mathematics.

The field of mathematics is closely related to computer science. Many of the

critical characteristics of computational thinking are also found in mathematical rea-

soning. Asiala, Brown, DeVries, Dubinsky, Mathews and Thomas (1996), describe

the Action-Process-Object-Schema (APOS) framework for research and curriculum

development in undergraduate mathematics education. This framework has three

critical components. First, a theoretical analysis of the concept is performed to con-

struct a model of cognition. This analysis is done to establish “. . . what it means

to understand the concept and how that understanding can be constructed by a

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

are collected and analyzed in the context of a theoretical perspective to determine

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

facilitate this three-phase approach, a mathematical programming language is used

to help gain insight into the cognitive constructs being used by the participants.

Asiala, Cottrill, Dubinsky, Schwingendorf (1997) used the APOS framework to

develop a curriculum designed to teach the mathematical concept of a derivative.

In this study there were two major findings. First, the APOS framework was ef-

fective in describing the development of graphical understanding of a function and

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,

& Schwingendorf, 1997).

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

positively influenced through formal training in mathematics. Because mathematics

and computational thinking are closely related, it is postulated that formal training

in computational thinking should also have a positive effect on student attitudes.

(Clark, Master, John, Tolias, & Vakil, 1999; Weller et al., 2003)

Hembree (1990) conducted a meta-analysis of 151 journal articles to investigate

the construct mathematics anxiety. This meta-analysis revealed several treatments

that were effective at reducing math-anxiety (Hembree, 1990). Although no difference

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

anxiety. The meta-analysis revealed that systematic desensitization, restructuring

faulty beliefs and building self-confidence, and cognitive restructuring combined with

systematic desensitization each caused a statistically significant reduction in math

anxiety. This reduction in math anxiety had a corresponding increase in math per-

formance. Although not directly related to computational thinking, these articles

demonstrated that increased levels of anxiety have a direct impact on performance.

The article also showed that systematic desensitization, or repeated experience with

the anxiety invoking content, reduced the participants’ level of anxiety.

Wolz, Stone, Peasom, Pulimood, and Switzer (2011) conducted a demonstration

project where computational thinking was integrated into a middle school curricu-

lum through interactive journalism. The researchers designed and tested a program to

study the impact of interactive journalism on the teaching of computational thinking.

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-

istered a series of pretests including: a survey on computer usage, a computer efficacy

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

of computational thinking. Specifically, the researchers were looking for evidence of

increased confidence in computational thinking in the middle school students. They

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

the summer institute program.

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-

selves, demonstrated an increased understanding of the field of computer science, and

had an increased positive affect toward computer programming. No statistically sig-

nificant differences were found between the two groups when their test results were

analyzed using a small sample nonparametric statistic.

Qualls, Grant and Sherrell (2011), conducted a small mixed-methods case study

to investigate student understanding of the computational thinking concepts algo-

rithms, abstraction, and efficiency. In this study three research questions were inves-

tigated:

• Do students thoroughly understand the concept of an algorithm?

• Can students effectively apply abstraction to solve a problem?

• What do students know about efficiency?

The 23 participants in this study were undergraduate students enrolled in an

introductory computer science course. An assessment was created to measure the

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

a constant comparative methodology.

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-

nificant difference in the participants understanding of efficiency or abstraction. The

findings did, however, determine that the course had a statistically significant impact

on the participants understanding of the computational thinking concept of an algo-

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

the participants had a poor understanding of abstraction but seemed to appreciate

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

reported in this dissertation. Wolz (2011), used a mixed-method methodology to

investigate the impact of integrating computational thinking into a middle school

liberal arts program. Qualls, Grant and Sherrell (2011) is the most similar study

but focuses on the impact of teaching computational thinking to students enrolled

in a computer science course. Finally, Asiala, Brown, DeVries, Dubinsky, Mathews

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

teaching computational thinking to non-STEM majors at the university level.

Experiential Learning Theory

Kolb’s Experiential Learning Theory (ELT) is the theoretical framework used

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

Piagets cognitive-developmental epistemology (D. Kolb, 1984). This theory defines

learning as the process of creating knowledge through the transformation of experience

(D. Kolb, 1984).

To understand experience some learners rely on their senses while other use a

symbolic representation to understand new information. To some extent all learners

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

preference. Similarly, in transforming or processing experience some learners carefully

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,

four modalities of learning are identified involving concrete experience, reflection,

abstraction and experimentation (Willcoxson & Prosser, 1996).

Experiential learning theory is based on these four learning modes that combine

to form two learning dimensions - concrete/abstract and active/reflective (Willcoxson

& Prosser, 1996). The two dimensions undergird the learning cycle: the abstract

conceptualization-concrete experience dimension and an active experimentation- re-

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

Observation and Active Experimentation. Concrete Experience involves using direct

experience, feelings and emotions to engage with the world , while Abstract Concep-

tualization uses a symbolic representation of the experience rather than the physical

sensation. Reflective Observation involves creating meaning from experience and

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 four modes of building knowledge follow a four-stage learning cycle. In

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

experiences (A. Y. Kolb & Kolb, 2005).

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

intentionally develop theories to explain their experience.

The instructional intervention reported in this dissertation used a similar ap-

proach to teaching computational thinking. Each week the participants were asked

to participate in a computational thinking problem solving activity. After each lesson

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

ELT as a theoretical framework for explaining the process of creating knowledge is

well supported by the literature and provides an effective tool for investigating the

impact of instruction in computational thinking as a problem solving strategy.

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

and support the ELT theoretical framework.

Bruner’s theory of cognitive development proposes three modes of knowledge

representation enactive representation (physical action), iconic representation (pic-

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

representation is similar to Concrete Experience in ELT. When learners reflect on a

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

physically demonstrate the task.

The next representation to appear is the iconic representation. In this repre-

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).

Finally the symbolic representation appears. In this representation information

is stored in a symbol representation , such as language (McLeod, 2008). The sym-

bolic representation is most similar to Abstract Conceptualization found in ELT. The

symbolic representation is the most adaptable form of representation. Actions and

images have a fixed relation to the ideas they represent. In the symbolic representa-

tion, knowledge is stored as words, mathematical symbols, or in other symbol system

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

experience, Reflective Observation and Active Experimentation.

Greeno’s “extended semantic model” provides a framework for understanding

in the context of problem solving and reasoning (Greeno, 1989). The model is based

on four domains of knowledge:

• Concrete domain (physical objects and events).

• Model domain (models of reality and abstractions).

• Abstract domain (concepts, laws and principles).

• Symbolic domain (language and algebra).

The four domains . . . can be understood by means of a familiar


example of a crane lifting a container, a situation used in a number
of standard physics textbooks. The “concrete domain” includes the
physical objects involved the crane and container. In the “model do-
main”, the concrete situation is represented by a force diagram. The
abstract domain contains abstractions that could be made of this
situation, such as the concept of a force and Newton’s second law.
Finally, the “symbolic domain” consists of symbolic ways of repre-
senting the situation using either language or algebraic expressions,
or both. (Gaigher, 2006, p. 30)

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

aspect of explanatory power provided by ELT. Experiential Learning Theory allows

30
for both the creation and transformation of knowledge in addition to providing a

framework for testing the new understanding.

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

Revitalized Undergraduate Computing Education (CPATH) Program that requires

all grant proposals to include computational thinking.

Although there are many working definitions for computational thinking, the

term is generally understood to be the process of analyzing problems so their solutions

can be represented as the computational steps in an algorithm (Aho, 2011). Several

researchers have worked to identify the characteristics of computational thinking. The

most important characteristics include abstraction, algorithm development and effi-

ciency (Qualls, Grant, & Sherrell, 2011). Using this definition and key characteristics

of computational thinking, researchers have investigated methods and procedures for

training students to use computational thinking as a problem solving strategy. These

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

designed to engage these learners in activities focused on increasing the participants’

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

thinking in the sciences.

Of all the available literature, no research has focused on non-STEM majors at

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

self-selected to study a discipline that is computational in nature? The next section of

this dissertation describes a specific methodology to address this important question.

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)

suggests that “Computational thinking (CT) 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” (p. 33). Using computation as a problem

solving strategy may involve dividing a problem into its parts, and then solving each

part separately or choosing an appropriate representation for a problem or modeling

the relevant aspects of a problem to make it tractable. CT thus is using abstraction

and decomposition when attacking a large complex task or designing a large complex

system (Astrachan, 2009).

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

recently developed through a National Science Foundation (NFS) Pathways to Revi-

talized Undergraduate Computer Education (CPATH) grant as the intervention. The

purpose of this one-semester course is to introduce computational thinking to under-

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

issues (University, 2011).The treatment group was represented by twenty-four stu-

dents randomly selected from this course. The random assignment process used a

computer program to assign a random number to each participant. Participants as-

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-

derstanding fundamental programming concepts, and appreciating the practical and

theoretical limits of computation. The comparison group consisted of those students

not randomly selected to be in the treatment group. To examine the effects of the

computational thinking course on participants, the following research questions were

asked.

Research Questions

The following are the research questions used in this dissertation.

Quantitative Research Questions

RQ1 Do students who participate in formal training in computational thinking in-

crease the frequency of the use of computational strategies in problem solving

when compared to students who do not?

RQ2 Do students who participate in formal training in computational thinking pro-

duce better quality solutions then students who do not?

RQ3 Do students who participate in formal training in computational thinking de-

crease their computer anxiety when compared to students who do not?

Qualitative Research Questions

RQ4 In what ways does formal training in computational thinking change attitudes

of students who participate in a course in computational thinking?

34
RQ5 In what ways does formal training in computational thinking change computer

anxiety of students when compared to students who do not?

RQ6 In what ways does formal training in computational thinking change the com-

putational strategies of students?

Mixed Methods Research Questions

RQ7 How does formal training in computational thinking impact the learners’ atti-

tudes towards the use of computational strategies in problem solving?

RQ8 How does formal training in computational thinking impact the learners’ un-

derstanding of computation and its application to problem solving?

Design

To address both qualitative and quantitative questions, a convergent parallel

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

quantitative strands (Creswell & Plano-Clark, 2011). Figure 2, Convergent Parallel

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

strands a metanarrative is constructed from these initial results (Freshwater, 2007).

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

Figure 3.1. Convergent Parallel Mixed Methods Designs

which taking a course in computational thinking (CT) impacts the learners’ attitudes

and understanding of computation as a problem solving strategy (Mertens, 2011).

The quantitative portion of the study used a quasi-experimental design with

a random sample of students from an introductory computer literacy course (CSI

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 computational thinking course, the case.

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.

Population and Sample

This research was conducted at a private faith-based university in the southwest

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

convenience sample of all students enrolled in Information Technology (CSI 3303)

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

non-computer science majors with no formal training in computational thinking.

A third party with no access to student participants’ grades, recruited students

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

first instrument, the Computational Thinking Problem Solving Inventory (CTPSI),

was designed to measure how often students appropriately select a computational

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

formal instruction in CT impacts the learners ability to use CT as a problem-solving

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

twenty-item instrument designed to measures anxiety associated with computer tasks.

The CARS has high internal consistency (α = .87), good test-retest reliability (r =

.70), and good discriminant validity (Heinssen et al., 1987).

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

asked to respond to a collection of open-ended survey questions designed to elicit

feedback on their attitudes toward computer science and computational thinking.

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-

ipated in a semi-structured interview. The following questions were used to conduct

these interviews.

• IQ1 How do you currently use computer technology?

• IQ2 How often do you use a computer or computer technology?

• IQ3 How would you define problem solving?

• IQ4 What does the term Computational Thinking mean to you?

• IQ5 How do you feel about the use of computers and computer technology?

• IQ6 How does using a computer make you feel?

• IQ7 Have you ever been afraid to use a computer because you thought you

would break it or could not learn to use it properly?

• IQ8 Have you ever had a class in using or programming computers?

• IQ9 What sorts of things do you do when you use a computer?

39
• IQ10 What types of problems do you solve when using a computer?

• IQ11 Do you think some problems cannot be solved by computers?

• IQ12 Do you think there are some problems that can only be solved by com-

puters?

• IQ13 What makes a problem ideal for being solved by a computer?

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.

Table 3.1. Alignment of Interview Questions to Research Questions

Interview Question Instrument Research Question

IQ1 computer use RQ6

IQ2 computer use/frequency RQ1

IQ3 previous knowledge RQ8

IQ4 previous knowledge/understanding RQ8

IQ5 attitude RQ4

IQ6 anxiety RQ5

IQ7 anxiety RQ5

IQ8 previous knowledge RQ8

IQ9 computer use RQ6

IQ10 computer use RQ6

IQ11 understanding/attitude RQ4, RQ8

IQ12 understanding/attitude RQ4, RQ8

IQ13 understanding/attitude RQ4, RQ8

40
Intervention

This study used a new curriculum in computational thinking (CT), recently

developed through a NFS CPATH grant as the intervention. The purpose of this one-

semester course is to introduce computational 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 accustomed to using computation as

a problem solving tool.

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)

departments. Faculty who agreed to collaborate began with a one-hour meeting

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-

based topics (Hamerly, Booth, & Sturgill, 2009).

A convenience sample of students enrolled in Information Technology (CSI 3303)

was used as the participants in this study. CSI 3303 is offered in both the fall and

spring terms at Baylor University. This population of approximately 45 students

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

efficacy in using computational thinking and their attitudes towards computation as

a problem solving strategy. These data were used to investigate how the participants’

attitudes changed as a result of taking a course in CT. Additional qualitative data

were collected during the lab portion of the computational thinking course. In these

labs, students were asked to respond to a collection of open-ended survey questions

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

students to demonstrate their mastery of the content taught in CSI 3303.

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

course in CT on the participants ability to use CT as a problem solving strategy and

their level of computer anxiety.

All participants were asked to complete an end of semester course evaluation,

which provided them am opportunity to share their attitudes toward computational

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

and all grades recorded.

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-

ferences in computer anxiety. Because the participants were randomly assigned to

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.

When violations of these assumptions were discovered appropriate data transforma-

tions were performed so that the data satisfied all the assumptions of the one-tailed

paired-sample t-test. (Cohen, 1988).

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

between group differences using the Wilcoxen method.

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

within group differences.

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

evaluations were conducted with all the participants.

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

from the qualitative and quantitative strands on the horizontal axis.

Limitations

The participants in this study were limited to undergraduate students at a large

private university. There is some concern about the participants being candid with

their responses to the interview questions because the researcher is a professor in

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-

ciple investigator is a member of the computer science faculty he has a predisposition

to view computational thinking as an important problem solving strategy. This per-

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

bias and work to prevent it from influencing the research study.

Conclusion

A convergent parallel mixed methods design is particularly well suited for inves-

tigating the impact of a course in computational thinking on the attitudes towards,

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

understanding of computation as a problem solving strategy was discovered.(Mertens,

2011). In the next chapter of this dissertation the data analysis and findings from

this study will be discussed.

46
CHAPTER FOUR

Results

Introduction

Computational thinking provides a powerful way of thinking about and inter-

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

The participants in this study consisted of a convenience sample of 50 students

enrolled in Information Technology (CSI 3303) at private university located in the

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

their schedule. Ultimately, the treatment group consisted of 22 randomly assigned

participants and the comparison group consisted of 28 randomly assigned students.

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

of the participants were majoring in computer science, engineering, or management

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

of sophomores, juniors,and seniors were in the treatment and comparison groups.

These descriptive statistics suggest that the treatment and comparison groups

were substantially similar with respect to gender, major field of study and academic

classification. There was also no significant difference in academic aptitude as mea-

sured by the SAT. For these reasons no nuisance variables were controlled for when

analyzing the data collected in this study.

Treatment Group Profile

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

to competently use a computer or computer based technology.

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?

To investigate how formal training in computational thinking impacts how fre-

quently participants will correctly select computational thinking as a problem solving

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 no formal training in computational thinking while the remaining 29 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

the participants have mastered a discrete collection of specific problems.

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).

Table 4.2. Normality of CTPSI Data


Data N Skewness Kurtosis Zskewness Zkurtosis
pre-Test 49 0.669 1.070 1.912 1.53
post-Test 49 0.347 0.155 0.992 0.221

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

their ability to correctly use computational thinking as a problem solving strategy.

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

computational thinking increases the participants’ ability to correctly select compu-

tational thinking as a problem solving strategy.

Table 4.3. Computational Thinking Problem Solving Inventory


Group N Pre Post sd d t p
Comparison 27 15.26 15.96 3.72 0.19 0.978 0.169
Treatment 22 15.67 17.06 3.64 0.38 1.793 0.044

Research Question 2: Do students who participate in formal training in


computational thinking produce quality solutions to computational problems?

The culminating experience for the treatment group in CSI 3303, Information

Technology, was to produce a computational solution to a self-selected problem. Of

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-

putational problem. To investigate how formal training in computational thinking

effects solution quality, the programs created by the treatment group were compared

to solutions produced by novice programmers in a traditional introductory computer

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

in the comparison group also self-selected to participate in an introductory computer

science course.

To measure the quality of the students’ programs, a rubric was used to score each

solution on five different criteria: correctness, reusability, readability, documentation,

and efficiency. Correctness is the degree to which the program successfully solves the

computational problem. Reusability is a measure of how easily the code, or code

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;

a second evaluator, from the computer science department at research institution

assisted with rating the quality of the participants’ solutions. To establish interrater

reliability, both evaluators scored a set of randomly selected assignments from an

introductory computer science course. A high Pearson product-moment correlation

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

(20) programming assignments from an introductory computer science course was

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

to both the treatment and comparison groups.

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-

ability and slightly lower on documentation. However, no statistically significant

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

in computational thinking produce programs of comparable quality to traditional in-

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.

Research Question 3: Do students who participate in formal training in


computational thinking decrease their computer anxiety when compared to students
who do not?

To investigate the influence of formal training in computational thinking on

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

showed a statistically significant reduction in computer anxiety with a p = 0.001

and a large effect size of 1.22 for the comparison group and 1.30 for the treatment

group. This finding suggests that participating in courses focused on information

technology reduces the level of computer anxiety in the participants. Intentionally

emphasizing computational thinking seems to enhance this effect, resulting in an

increased reduction in computer anxiety. However, this impact was not statistically

significant.

Research Question 4: In what ways does formal training in computational thinking


change attitudes of students who participate in a course in computational thinking?

To investigate the participants attitudes about computational thinking, several

items were included in the lab survey that asked the participants about the impor-

tance of computational problem solving activities conducted throughout the semester.

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

response was ten (10), strongly agree.

The second importance-question on the survey asked if it was important to

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

agreeing that writing programs in Python was an important skill.

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

write Photoshop macros was an important skill.

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

the importance of creating computational tools for problem solving.

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

enjoyable as the semester progressed. A potential explanation for this observation is

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

The ability to use python to write computer


Programs is an important skill. Middle 20 5 5 1.25 25% 40% 20%
End 22 6 5.5 1.25 27% 23% 50%
Being able to write a JavaScript program is
an important skill. End 22 5 5 1.625 32% 32% 36%
Being able to use Photoshop to make
rule/action for batch processing of graphics is
an important skill.
End 22 8 7 2.0 32% 9% 59%
Table 4.7 also shows a similar pattern when asked about using Python to create

a computer animation. The majority of the participants reported enjoying this ac-

tivity, but the percent of participants reporting that they enjoyed creating animation

with Python decreased slightly throughout the semester.

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

to create tools, the participants seem to enjoy the activity.

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.

Additional evidence of the participants’ attitudes towards the use of technology

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

Question Time N Mode Median SQR Disagree Neutral Agree

Beginning 21 7,8 7 1.5 19% 23% 67%


I enjoyed using Python to solve simple math
Middle 20 8 7.5 1.325 15% 10% 75%
problems.

End 22 5 6.5 2.625 23% 18% 59%

Beginning 22 8 8 1.125 0% 5% 95%


I enjoyed making a computer animation using
Middle 20 10 7 2.25 20% 5% 75%
Python.

End 22 7 7 1.625 18% 14% 68%

Beginning 22 5 6 2.125 27% 18% 55%


58

I enjoy using Python to write programs. Middle 20 7 6 1.0 20% 15% 65%

End 22 7 6 1.125 23% 18% 59%


I enjoyed making the JavaScript program for
End 22 4 6.5 2.125 27% 9% 64%
a web page.
I enjoyed use Photoshop to make another
End 22 6 7 1.0 0% 14% 86%
rule/action for batch processing of graphics.
Research Question 5: In what ways does formal training change computer anxiety of
students who participate in a course in computational thinking?

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

indicating Strongly Agree.

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

solve simple math problems.

Table 4.8. Lab Survey Questions Nervous

Question Time N Mode Median SQR

Beginning 22 0 2.5 2.635


Solving simple math problems with Python
Middle 20 0 2 1.875
makes me feel nervous.

End 22 0 1 2.125

Beginning 22 6 4.5 1.625


Creating an animation program with Python
Middle 20 2 4 1.875
makes me feel nervous.

End 22 5 3.5 2.625


Creating the JavaScript program for a web
End 22 8 7.5 1.25
page makes me feel nervous.
Creating rule/action for batch processing of
End 22 8 8 1.125
graphics in Photoshop makes me feel nervous.

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

The response to a second survey question, Creating an animation program with

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

indicating a decrease in the level of nervousness associated with writing computer

programs to create simple graphical animations.

Two additional items about nervousness were also asked three times during the

semester.

• Using Python to write computer programs makes me feel nervous.

• Simulating flipping a coin with Python makes me feel nervous.

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.

• Creating rule/action for batch processing of graphics in Photoshop makes me

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

In addition to asking the participants if a particular activity made them ner-

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

significant change in their response.

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.

Research Question 6: In what ways does formal training in computational thinking


change the computational strategies of students?

Another set of survey questions asked the participants to rate their ability to

repeat a computational solution demonstrated in class, without assistance. Table 4.11

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

qualitative and quantitative strands will be combined to form a metanarrative. The

first dimension investigated through the mixed method phase of this study is the

participants’ attitude towards computational thinking. The second dimension is the

participants’ understanding of the nature of computational thinking and the appro-

priate application of computational thinking to problem solving. The results of 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.

Research question seven: How does formal training in computational thinking

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

a statistically significant drop in computer anxiety. The participants self-reported

feeling nervous and had anxiety about using computational tools, like Python, to

solve computational problems. Although the participants reported using computers

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

could be classified as fact gathering and reporting, or as a social or entertainment ac-

tivities. As the training in computational thinking progressed, the participants’ level

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

Dimension Qualitative Quantitative

Participants with formal training


Participants agreed that being
in CT have a statistically signifi-
able to solve math problems with
cant reduction in computer anxi-
Attitude Python was an important skill.
ety.

Participants find value in using


Participants enjoyment of creat- computational tools to assist in
ing animation with Python de- problem solving but are neutral
creased slightly throughout the when asked about the importance
semester. of creating computational tools
for problem solving.

Participants reported that they


Participants enjoyed using were increasingly less nervous
Python to create tools. about using a computer to solve
simple math problems.

Participants can see themselves Participants report using com-


using Python at some point in the puters or computer technology
future. multiple times a day.

Participants have a positive affect


about the use of computers and
computer technology.

Participants self reported feeling


nervous and had anxiety about
using computational tools, like
Python, to solve computational
problems.

Participants believed that they Participants with formal training


Understanding could create a Python animation in CT have a statistically signifi-
program without assistance. cant increases in CTPSI scores.
Participants with formal training
Participants report that they feel in CT produce programs of com-
competent to use computer tech- parable quality to traditional in-
nology. troductory computer science stu-
dents.

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

the learners’ understanding of computation and its application to problem solving?

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

solving strategy. These findings of increased understanding are strengthened by the

quantitative strand that showed a statistically significant increase on the Computa-

tional Thinking Problem Solving Inventory (CTPSI) score. The CTPSI measures the

participants’ ability to appropriately use computational thinking as a problem solv-

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

students who participate in formal training in computational thinking increase their

understanding of this way of solving problems.

Conclusion

In this chapter qualitative and quantitative evidence was presented to show

the impact of formal training on the participants to use computational thinking as

a problem solving strategy. By combining these two types of evidence a stronger

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

them at the beginning of the semester. In addition to increasing their understanding,

and ability to apply, computational thinking, there was also a shift the participants

65
attitudes about computational thinking. The participants reported an increased the

enjoyment when solving computational problems in addition to reducing the anxiety

associated with this type of problem solving.

66
CHAPTER FIVE

Conclusions

Significance

The ubiquity of technology in the world cannot be disputed. It is difficult to

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-

tational perspective. Computational thinking is a fundamental skill for everyone not

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

that were previously unavailable or impractical due to human limitations (Allan et

al., 2010; Curzon et al., 2009; Qin, 2009b).

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

apply computational techniques or computer applications to problem solving (Settle

& Perkovic, 2010). The most important characteristics of computational thinking

include abstraction, algorithm development and efficiency (Qualls et al., 2011). In

a technologically advanced society, citizens who lack a solid foundation in, and un-

derstanding of technology are at a disadvantage. They do not know what problems

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

where computing is ubiquitous (Denning, 2009). As the prevalence of computing

technology continues to grow, the need to think computationally is occurring at an

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

number of students selecting computer science as a college major is declining in 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

solution to this problem is an introduction to computational thinking to increase the

number of students who select computer science as their undergraduate major field

of study.

Research Questions

A total of eight research questions were addressed in this parallel convergent

mixed method study. The three qualitative and three quantitative questions were

answered by simultaneously collecting both qualitative and quantitative data. Once

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

mixed methods research questions.

The three quantitative questions looked at the characteristics of frequency, qual-

ity and anxiety in relation to using computational thinking as a problem solving

68
strategy. The three quantitative research questions were:

RQ1. Do students who participate in formal training in computational thinking in-

crease the frequency of the use of computational strategies in problem solving

when compared to students who do not?

RQ2. Do students who participate in formal training in computational thinking

produce quality solutions to computational problems?

RQ3. Do students who participate in formal training in computational thinking

decrease their computer anxiety when compared to students who do not?

The three qualitative research questions looked at the characteristics of attitude,

anxiety, and change in strategy in relation to using computational thinking as a

problem solving strategy. The three qualitative research questions were:

RQ4. In what ways does formal training in computational thinking change attitudes

of students who participate in a course in computational thinking?

RQ5. In what ways does formal training in computational thinking change computer

anxiety of students when compared to students who do not?

RQ6. In what ways does formal training in computational thinking change the

computational strategies of students?

In mixed methods research questions addressed through the metanarrative con-

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

methods questions were:

RQ7. How does formal training in computational thinking impact the learners’

attitudes towards the use of computational strategies in problem solving?

RQ8. How does formal training in computational thinking impact the learners’

understanding of computation and its application to problem solving?

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).

This world view is a blending of constructivism and objectivism. It is objectivist in

the assertion that there is one reality and constructivist because reality is interpreted

by the individual. Meaning then is constructed for the individual’s interpretation of

the one objective reality.

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

of grasping experience, Concrete Experience (CE) and Abstract Conceptualization

(AC), and two modes of transforming experience, Reflective Observation (RO) and

Active Experimentation (AE) (D. A. Kolb et al., 2000).

These four modalities of learning lead to a four-stage learning cycle. In this

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.

Each unit of a curriculum provides the learner with an example of a solution

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

impact of formal training in computational thinking was investigated to determine

the influence of this type of training on the participants computer anxiety and their

attitudes towards the use of computational thinking as a problem solving strategy.

Computational thinking is a way of thinking related to programming but may, or

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-

gies from computing to solve problems in a broad range of subjects; computational

thinking is an important skill in the modern world (Qin, 2009b).

Despite the increasing importance and ubiquity of computers some individu-

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 participants in this study consisted of a convenience sample of 50 students

enrolled in Information Technology (CSI 3303) at a large private university during

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.

Ultimately, the treatment group consisted of 22 randomly assigned participants and

the comparison group consisted of 28 randomly assigned participants. The treatment

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

controlled for when analyzing the data collected in this study.

The Computational Thinking Problem Solving Inventory (CTPSI) was given

to all participants at both the beginning and end of the semester to investigate how

formal training in computational thinking impacts how frequently participants cor-

rectly select a computational thinking problem solving strategy (RQ1).The pre-test

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

computational thinking increases the participants ability to correctly select compu-

tational thinking as a problem solving strategy.

The culminating experience for the treatment group in the Information Tech-

nology course was to produce a computational solution to a self-selected problem. Of

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-

putational problem. To investigate how formal training in computational thinking

72
affects solution quality (RQ2), the programs created by the treatment group were

compared to solutions produced by novice programmers in a traditional introductory

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

twenty (20) programming assignments from an introductory computer science course

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

suggests that students who participate in formal training in computational thinking

produce programs of comparable quality to traditional introductory computer science

students. This result is notable given that the students in the computational thinking

course were non-computer science majors.

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 to investigate the impact of formal training in computational thinking on

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

in courses focused on information technology reduces the level of computer anxiety in

the participants. Intentionally emphasizing computational thinking seems to enhance

this effect, resulting in an increased reduction in computer anxiety.

To investigate the participants’ attitudes about computational thinking (RQ4),

several items were included in the repeated lab surveys that asked the participants

about the importance and enjoyment of using computational thinking as a prob-

lem solving strategy. Additional insight into the participants’ attitudes was gained

through their responses to open-ended questions on the survey.

A careful analysis of the survey responses showed that the participants attitudes

about the importance of computational thinking as a problem solving skill increased


73
over time. The participants indicated that they felt it was important to be able to

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

rate their enjoyment of using computational thinking in problem solving. Although

the majority of participants consistently reported that they enjoyed using Python

to solve math problems, a group of participants found the activity increasingly less

enjoyable as the semester progressed. A potential explanation for this observation is

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

activity was not enjoyable.

Additional evidence of the participants attitudes towards the use of technology

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

Python at some point in the future.

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

using computational thinking.

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

opportunity for additional practice.

A final set of questions asked on the repeated lab survey was designed to de-

termine if the participants changed their computational problem solving strategies

(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

had a limited amount of time for practice.


75
Using the data collected during the qualitative and quantitative strands of this

mixed methods research study, a metanarrative was constructed to answer the final

two research questions. By combining evidence from both strands a more complete

understanding of the impact of formal training in computational thinking on the at-

titudes of the participants was developed. Research question seven (RQ7) asks: How

does formal training in computational thinking impact the learners’ attitudes towards

the use of computational strategies in problem solving? The metanerrative showed

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

solved could be classified as fact gathering and reporting or as a social, entertainment

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

tools and computational thinking in problem solving.

Finally, research question eight (RQ8) looked at the impact of formal training

in computational thinking on the participants understanding of computation and its

application to problem solving. The data collected in the qualitative strand revealed

that formal training in computational thinking resulted in an increased belief among

participants that they could use Python to create a computer animation without as-

sistance. The finding of increased understanding was strengthened by the quantitative

strand showing a statistically significant increase on the participants’ Computational

Thinking Problem Solving Inventory (CTPSI) scores. Additional quantitative evi-

76
dence suggests that the participants were also able to create quality computational

solutions at the same level of quality as introductory computer science students.

Taken together the two strands provide strong evidence that students who partici-

pate in formal training in computational thinking increase their understanding of this

way of solving problems.

The metanarractive created by combining the qualitative and quantitative data

supports the finding that formal training in computational thinking both improves

the participants attitude and understanding of computational thinking as a problem

solving strategy. In the next section of this dissertation these relationship of these

findings to the literature and the theoretical framework is discussed.

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

theoretical underpinning, curriculum model, and assessment procedures were also

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

training in computational thinking.

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

evidence of the importance of computational thinking provided the motivation for

this research. The ability to apply computational techniques to problem solving is a

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-

putational thinking as a problem solving strategy and the participants understanding

of this problem solving strategy.

The literature also provided a list of the key characteristics of computational

thinking. These characteristics were used to develop instruments to measure the

participants’ understanding of computational thinking. Several researchers have sug-

gested that abstraction is perhaps the most important characteristic of computational

thinking requiring the problem solver to simultaneously think at multiple levels of ab-

straction (Hazzan, 2008; Wing, 2006). As the computational problems to be solved

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

or simplifying the representation and the process of generalizing the representation

to an entire class of problems (Kramer, 2007). This understanding of abstraction was

used to develop the computational thinking curriculum used in this study.

Two studies, Qin (2009) and Howell (2011) provided evidence about the impact

of integrating computational thinking in the curriculum at the university level (Qin,

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

use of computational strategies in problem solving and increased the participants’

understanding of this problem solving strategy. The evidence from the literature was

typically anecdotal and lacked a rigorous experimental design. In addition to lacking

rigor, no evidence could be found about the impact of formal training in computa-

tional thinking at the university level for non-technical majors.

78
This study had similar findings that formal training in computational thinking

tends to reduce computer anxiety, increase the participants’ ability to properly use

computational thinking as a problem solving strategy and had a positive impact on

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

and contribute findings in an area that had previously been unexamined.

There is relatively little evidence in the literature about the impact of formal

training in computational thinking on computer anxiety. However, there is evidence

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

associated with an increase in the proficiency of mathematics performance (Hembree,

1990). This study found that formal training in computational thinking reduced the

participants’ computer anxiety . This reduction in anxiety might have contributed to

the participants’ production of computational solutions, which were of similar quality

to introductory computer science students. An additional impact of the training in

computational thinking was the improved self-efficacy of the participants. As 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

self-efficacy is in part related to the reduction in computer anxiety.

Evidence from this study also showed that the participants’ attitude toward the

importance of computational thinking as a problem solving skill improved over time.

As the training progressed, the participants increasingly believed that their ability

to use computational thinking as a problem solving strategy was an important skill.

Again, there is little evidence in the literature relating to the perceived importance

of computational thinking. This finding appears to be a unique contribution of this

research.
79
The evidence from the literature suggests that formal training in computational

thinking increases the participants’ enjoyment of the use of computational tools in

problem solving (Repenning et al., 2010). Similar results were found in this study.

As the semester progressed the participants reported increased enjoyment of using

computational thinking in problem solving. The pattern of increased enjoyment was

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

they had to practice solving these types of more complex problems.

Another benefit of formal training in computational thinking was an increase

in the participants’ ability to correctly select computational thinking as a problem

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

comparable to introductory students in a traditional computer science course. It is

not surprising, given the reduction in anxiety and the improvement in the quality

of computational solutions created, that the participants demonstrated an increased

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

(2009) (Howell et al., 2011; Qin, 2009a).

Finally, there was some evidence of transference of the computational thinking

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

self-selected domain of interest. There was clear evidence to suggest transference of

computational thinking to a different problem area. Typically the participants se-

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

quality when compared to traditional introductory computer science students and

demonstrated a level of creativity and complexity that suggests a deep understanding

of the application of computation in problem solving.

Additional benefits from this research related to qualities of an effective com-

putational thinking curriculum. First, students benefited from hands on learning. At

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

given additional time to practice this error was corrected.

A second observation about the curriculum was the importance of modeling

how to use computational thinking as a problem solving strategy. The participants

were all frequent and competent users of technology for information gathering, en-

tertainment , and communication. However, when asked to solve problems using a

computational strategy, the participants were initially unable to generate a solution

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

teaching computational thinking and is supported by Kolb’s Experiential Learning

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

for teaching computer science and computational thinking.

This study has demonstrated the benefits of formal training in computational

thinking to undergraduate students majoring in fields not normally associated with

the application of mathematics or computation. This population is currently poorly

represented in the literature. The participants showed a significant reduction in com-

puter anxiety, and an increased ability to appropriately apply computational thinking

to problem solving. Additionally, the participants reported enjoying the use of com-

putational thinking in solving problems and demonstrated an increased understand-

ing of the application of computational thinking to problem solving. Finally, there

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-

ing in computational thinking provides a significant benefit to individuals seeking to

competently participate in a technology rich society.

82
Limitations

The principal limitation of this convergent parallel mixed-methods study is the

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

random assignment of participants to treatment and comparison groups.

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

25 years. The Computational Thinking Problem Solving Inventory (CTPSI) was

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

until saturation occurred.

A final limitation of this study is its theoretical framework. This research is

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

instrument designed to measure the construct of computational thinking. Additional

items need to be developed and tested to improve both the reliability and validity of

the CTPSI.

The findings of this research suggest that formal training in computational

thinking has significant benefits. For this reason, the curriculum used in this study

needs to be formalized as a textbook with instructional aids and then disseminated as

widely as possible. In addition to creating a formal curriculum, training modules need

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

workshops to train educators in the use of computational thinking as a problem

84
solving strategy. There seems to be a particularly good fit for this type of problem

solving within the gifted and talented community.

Additional modules in the computational thinking curriculum need to be de-

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

created for undergraduate university students, additional modules need to be develop

for all levels of the public school system. To realize the greatest possible benefit

from formal training in computational thinking students must be introduced to this

concept at the earliest possible age.

This study asked the participants about problem solving as individuals. Two

additional questions relating to collaborative problem solving also need to be inves-

tigated. The first question would investigate the participants confidence that they

could contribute to a computational problem-solving group and the second question

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-

solving group? Additional question two: Would you be comfortable participating in

an algorithmic problem-solving group?

Finally, the findings from this research need to be disseminated as widely as

possible, through conference presentations, journal publications and training semi-

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

develop new computational thinking modules as part of a workshop in how to use

computational thinking as a problem solving strategy.

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

formal training in computational thinking has a positive impact on the participants’

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

this strategy without assistance from an expert.

86
APPENDICES

87
APPENDIX A

Computer Anxiety Scale (CARS)

Computational Strategies

CSI 3305, Spring 2011

Computer Anxiety Scale(Heinssen et al., 1987)

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)

I do not think I would be able to learn a computer programming

language. (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)

you practice, the better you become.

I am afraid that if I begin to use computers I will become dependent (1) (2) (3) (4) (5)

upon them and lose some of my reasoning skills.

I am sure that with time and practice I will be as comfortable working (1) (2) (3) (4) (5)

with computers as I am in working with a cell phone.

I feel that I will be able to keep up with the advances happening in (1) (2) (3) (4) (5)

the computer field.

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)

large amount of information by hitting the wrong key.

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)

on most computer terminals.

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)

Computational Thinking Problem Solving Inventory

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)

signments will be positive.

I feel that I will be able to keep up with the advances happening in (1) (2) (3) (4) (5)

the computer field.

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

to solve with a computer.

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)

Diagnosing a medical condition. (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)

Reading a book. (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

your ranking on the pre-course evaluation from.

Difficulty Problem Title

Easiest

Most Difficult

(1) High, Low & Average Temperature

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:

City1 City2 City3

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)

and print the solution to the system. Example:

Sample Data file:

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.

(c) Display a message telling the number of slices.

To calculate the number of slices that may be taken form the pizza, you must know

the following facts:

(a) Each slice should have an area of 14.125 inches.

(b) To calculate the number of slices, simply divide the area of the pizza by

14.125.

(c) The area of the pizza is calculated with this formula:

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

hours are $2.00 per hour.

Package B: For $14.95 per month 20 hours of access are provided. Additional hours

are $1.00 per hour.

Package C: For $19.95 per month unlimited access is provided.

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

money Package A customers would save if they purchased packages B or C, and

how much money package B customers would save if they purchased package C. If

there would be no savings, no message should be printed.

(5) Word Count

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

the text file and its frequency.

94
APPENDIX C
Grading Rubric

Trait Level Score Description

Exceptional 4 The program works and meets all of the specifications.

Acceptable 3 The program works and produces the correct results and displays them cor-

Correctness rectly. It also meets most of the other specifications.

Amateur 2 The program produces correct results but does not display them correctly.

Unsatisfactory 1 The program is producing incorrect results.

Unacceptable 0 The program will not compile or crashes during execution.

Exceptional 4 The code is exceptionally well organized and very easy to follow.

Acceptable 3 The code is fairly easy to read.

Readability Amateur 2 The code is readable only by someone who knows what it is supposed to be

doing.

Unsatisfactory 1 The code is poorly organized and very difficult to read.

Unacceptable 0 The code is unreadable, meaningless variable names.

Exceptional 4 The code could be reused as a whole or each routine could be reused.

Acceptable 3 Most of the code could be reused in other programs.

Reusability Amateur 2 Some parts of the code could be reused in other programs.

Unsatisfactory 1 The code is not organized for reusability.

Unacceptable 0 The code has no potential to be reused.

Exceptional 4 The documentation is well written and clearly explains what the code is

accomplishing and how.

Documentation Acceptable 3 The documentation consists of embedded comment and some simple header

documentation that is somewhat useful in understanding the code.

Amateur 2 The documentation is simply comments embedded in the code with some

simple header comments separating routines.

Unsatisfactory 1 The documentation is simply comments embedded in the code and does not

help the reader understand the code.

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.

Amateur 2 The code is brute force and unnecessarily long.

Unsatisfactory 1 The code is huge and appears to be patched together.

Unacceptable 0 The code would be more efficient is a simplistic brute force algorithm was

used.

Adapted from Computer Engineering & Computer Science


California State University, Long Beach

95
APPENDIX D
Interview Questions

Computational Strategies

CSI 3305, Spring 2011

Interview Questions

INSTRUCTIONS:

At the beginning of the semester each student enrolled in CSI 3305 will participate in a

semi-structured interview. The following questions will be used to conduct these

interviews.

IQ1 How do you currently use computer technology?

IQ2 How often do you use a computer or computer technology?

IQ3 How would you define problem solving?

IQ4 What does the term Computational Thinking mean to you?

IQ5 How do you feel about the use of computers and computer technology?

IQ6 How does using a computer make you feel?

IQ7 Have you ever been afraid to use a computer because you thought you would break it

or could not learn to use it properly?

IQ8 Have you ever had a class in using or programming computers?

IQ9 What sorts of things do you do when you use a computer?

IQ10 What types of problems do you solve when using a computer?

IQ11 Do you think some problems cannot be solved by computers?

IQ12 Do you think there are some problems that can only be solved by computers?

IQ13 What makes a problem ideal for being solved by a computer?

96
APPENDIX E
Computational Thinking Curriculum

Computational Strategies
CSI 3303, Spring 2012
Bill Booth
Department of Computer Science
Baylor University
Waco, Texas

Abstract

The course is designed to introduce students Information Technology.


We are ensuring that students are aware of the computer, its
components, and how they can be brought together to solve business,
government, healthcare, school, and other organizations problems.
Students will learn techniques for finding, evaluating, and processing
information used in research, using the computer, library, and online
library resources. Topics covered will include computer hardware and
software systems, social and ethical issues, information search strategies
for research, and personal and organizational security issues.

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

3 Course Educational Goals


At the end of this course, you will be able to:

• Understand the key concepts related to information technology, including the


hardware and software systems, and the social and ethical issues involved

• Use information technology to install computer hardware and software, detect


and remove computer viruses, set up a Windows machine and configure a
wireless network.

• Understand key concepts involving computers and personal and organizational


security as it pertains to computer usage.

• Find information effectively on the Internet, as well as using some of the most
common Baylor University library electronic resources

• Construct effective search statements that retrieve relevant information from


the Internet or other electronic resources

• Evaluate information found using the Internet or other electronic resources

99
4 Textbooks and Resources
• Textbook:

– Technology in Action COMPLETE, 8th Edition, Evans.


– Must be the COMPLETE version, the introductory version does not
cover all that we will cover in this course.

• 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

Attending class - 10 points/day 420 points


Online Survey - 50 points
Interview - 50 points
Class Participation - (0-200 points)
Chapter Reflection - 10 points (130 total)
Computational Thinking Module - 20 points (200 total)
End of Semester Survey - 50 points
Final Project (mandatory)- 200 points
Total Possible Points 1300

1000+ A
975 - 999 B+
950 - 974 B
925 - 949 C+
900 - 924 C
850 - 899 D
less than 850 F

6.3 Computational Thinking Modules


1. Python Programming Language Lab

2. Probability, Testimony and Belief

3. eBook Library List

4. Creating and Posting a Playlist

5. Image Batch Processing

6. Computer Assisted Reporting

7. Timecode Calculator

8. Staffing Problem

9. Prisoner’s Dilemma

10. Cruise Control System

11. Direct and Indirect Objects

12. Music Theory and the 12-tone System

104
13. Game Development

14. Information Sharing and Collaboration

105
6.4 Course Policies
• Share everything.

• Play fair.

• Don’t hit people.

• Put things back where you found them.

• Clean up your own mess.

• Don’t take things that aren’t yours.

• Say you’re sorry when you hurt somebody.

• Wash your hands before you eat.

• Flush.

• Warm cookies and cold milk are good for you.

• Live a balanced life - learn some and think some and draw and paint and sing
and dance and play and work every day some.

• Take a nap every afternoon.

• 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.

Source: ”ALL I REALLY NEED TO KNOW I LEARNED IN KINDERGARTEN” by


Robert Fulghum.

106
6.5 Assignments and Reading
• See Course Schedule

• Chapter Reflection:

– What was the chapter about?


– What is one thing you learned from reading the chapter?
– What was the most interesting part of the chapter?

6.6 Attendance Policies


• 80% attendance is required to pass.

• ”Choose your own assigned seating”. After seats are assigned, if your seat is empty,
you are absent.

• It is your responsibility to keep track of your absences.

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]

7.1 Python Applications


• Direct Computation

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?

7.2 Python Tutorial


• (http://docs.python.org/tutorial/)

Python is an easy to learn, powerful programming language. It has efficient high-level


data structures and a simple but effective approach to object-oriented programming.
Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it
an ideal language for scripting and rapid application development in many areas on most
platforms.
The Python interpreter and the extensive standard library are freely available in source or
binary form for all major platforms from the Python Web site, http://www.python.org/,
and may be freely distributed. The same site also contains distributions of and pointers to
many free third party Python modules, programs and tools, and additional
documentation.
The Python interpreter is easily extended with new functions and data types implemented
in C or C++ (or other languages callable from C). Python is also suitable as an extension
language for customizable applications.
This tutorial introduces the reader informally to the basic concepts and features of the
Python language and system. It helps to have a Python interpreter handy for hands-on
experience, but all examples are self-contained, so the tutorial can be read off-line as well.
For a description of standard objects and modules, see The Python Standard Library. The
Python Language Reference gives a more formal definition of the language. To write
extensions in C or C++, read Extending and Embedding the Python Interpreter and
Python/C API Reference Manual. There are also several books covering Python in depth.

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

8.1.1 Direct Computation


what do i need on the final to pass this course

8.1.2 Graphic Art


Draw a Picture
section on drawing a picture

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

CSI 3303: Introduction to Computational Thinking

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.

4 Setup and Programming


1. Within a local folder, create a new file called bayes.py

2. Open bayes.py in the text editor of your choice (such as Notepad or Vim.)

3. Enter the following code in the file:

from __future__ import division

This code will allow Python to handle division in a more intuitive way, doing
floating point division by default.

4. Next, enter the following code:

""" Variables """


witnesses = 10
P_H = 1 / 100000000000
P_E_H = 0.5
P_NOT_H = 1 - P_H
prob_of_single_witness = 0.1
P_E_NOT_H = prob_of_single_witness**witnesses

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.

5. Next, type in the following:

""" Bayes’ Theorem """


P_H_E = P_H * P_E_H / (P_H * P_E_H + P_NOT_H * P_E_NOT_H)

This line calculates P_H_E which is the Bayesian probability that hypothesis H
holds given the evidence E (eyewitness testimony).

6. Lastly, enter the following:

print "Probability that hypothesis H holds:", P_H_E

This prints out our calculated probability.

7. Save the file and close it.

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

You should see a probability displayed, between 0.0 and 1.0.

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%?

4. The probability P_H has been estimated in a subjective way. Is it a reasonable


estimate? If so, explain why. If not, give your own estimate for this value and
justify why your estimate is more reasonable.

5. Is ten percent a reasonable estimate for prob_of_single_witness? In other


words, is it reasonable to assume that for ever person that dies, ten percent of all
people will have a sighting of them after death? Explain your reason for agreeing
or disagreeing. Then choose a more reasonable estimate for this probability and
explain why your number is more reasonable. Lastly, what is the new probability
of hypothesis H given your new value for prob_of_single_witness?

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.

7. Based on your experimentation with different values and estimates, roughly


how many eyewitnesses would be necessary to make belief in Jesus’ resurrection
plausible?

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

CSI 3303: Introduction to Computational Thinking

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

4.1 DOS Batch File


1. Download the eBook library zip file from the course website. Unzip the file and
save to a local folder.
2. Within that folder, create a new file called list.bat
3. Open the list.bat in the text editor of your choice (such as Notepad or Vim.)
4. Enter the following code in the file:

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:

dir *.epub /a-d /b

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:

list.bat > myLibrary.txt

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

1. Within the same folder, create a new file called authors.py

2. Open the authors.py in the text editor of your choice (such as Notepad or Vim.)

3. Enter the following at the beginning of the file:

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:

for root, dirs, files in os.walk("."):


for name in files:
if name[-5:].lower() == ’.epub’:
pieces = name.split(" - ")
a = pieces[1].strip()[:-5].title()
authors.add(a)

Note: Pay attention to the indention in the code, as Python is whitespace


sensitive. You will get an error if the code is not properly indented.
The first line allows us to iterate over everything contained in the current di-
rectory (denoted by “.”). We next iterate over all files, and check that their file
extensions are equal to .ePub. We do this by indexing the name string, begin-
ning with the fifth character from the end (denoted by [-5:]). This will give us
all characters beginning with the fifth from the end, all the way to the end. If
the extension equals to .ePub, we process the filename and add the author to
our list.
To process the name, we first split on the hyphen surrounded by spaces. The
produces a list of the pieces, stored in the pieces variable. We then use the
second piece, and strip whitespace from it, and take all characters up to the
last 5 (which removes the file extension). This becomes our author name. We
119
also title case the name, so that irregularities in the capitalization of author
names do not produce redundant author names.
Lastly, we add the name to our set of author names.

5. We then create a list from our set, and sort it:

authorsList = list(authors)
authorsList.sort()

6. Finally, we output the list of authors to the standard output:

for author in authorsList:


print author

7. Save and close this file.

8. From the command line, type the following to run your program and hit enter:

python authors.py

You should see a list of authors printed to your screen.

9. We will now save this information to a text file, by using redirection of output.
To do so, run the following command:

python authors.py > myAuthors.txt

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?

3. What are the benefits of using the Python script method?

4. What Python function allows you to list all files in a directory?

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

CSI 3303: Introduction to Computational Thinking

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.

4 Setup and Programming

4.1 Playlist Generator


1. Download the music library zip file from the course website. Unzip the file and
save to a local folder.
122
2. Within that folder, create a new file called generate.py

3. Open the generate.py in the text editor of your choice (such as Notepad or
Vim.)

4. Enter the following code in the file:

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.

5. Next, enter the following code:

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.

6. Next, enter the following line of code:

playlist = open("playlist.m3u", "w")

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.

7. Next, enter the following, keeping mind of indentation:

for song in songs:


playlist.write(song + "\n")

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()

9. Save the file and close it.

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.

2. Assume we now want to automatically upload our generated playlist to a web


server each night. How can we accomplish this using free tools and/or web
services? (Hint: Dropbox.com allows you to automatically upload files from
your local computer.)

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.2 Problem Statement


Your task is to batch process a set of images, resizing them and changing the color of the
images to black and white, using any batch processing program you like. You must first
identify a software application that supports batch processing of images, and then learn
the methodology for creating and implementing a batch on the group of 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

CSI 3303: Introduction to Computational Thinking

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.

4 Setup and Steps


1. Go to the Uniform Crime Reports website, given above, to locate records for Waco and other
municipalities in Texas for 2009.
2. Using this data, analyze and compare the statistics for the Waco MSA with other similar
MSAs.
3. Create a proposal for a news story based on your findings.

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

CSI 3303: Introduction to Computational Thinking

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 Setup and Programming

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:

Public Function timecodeAdd(t1 As String, t2 As String) As String


Dim result As String

’Place your code to calculate timecode here, replacing this comment

timecodeAdd = result
End Function

Public Function timecodeSubtract(t1 As String, t2 As String) As String


Dim result As String

’Place your code to calculate timecode here, replacing this comment

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.

3. Open timecode.html in a web browser (Mozilla Firefox or Google Chrome) and


see if your functions correctly add and subtract timecodes using the calculator
buttons. (Your code is automatically loaded, assuming you saved your file and
have it in the same folder as the html file.)

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?

4. Fill out the following table:

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

CSI 3303: Introduction to Computational Thinking

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:

1. Assign as many nurses as needed to get a patient healthy according to which


room the patient is in

2. Assign nurses to patients in critical condition first before assigning patients to


healthier patients

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 Setup and Programming

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.)

3. Enter the following code at the top of your file:

from __future__ import division


import random
import math

(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:

def nextDay( patients, nurses ):


nlist = []
for i in range(len(patients)):
if patients[i] <= 0 or patients[i] >= 100 :
nlist.append( 90 )
else:
nlist.append( patients[i] - random.randint(0, 30) +
nurses[i]*NURSING_ABILITY )
return nlist

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.

Next, we add a function to check if any patients died:

def checkAssignment( patients, diedPatients, recoveredPatients ):


for patient in patients:
if patient <= 0:
print "a patient died..."
diedPatients += 1
elif patient >= 100:
print "a patient has been discharged!"
recoveredPatients += 1
return diedPatients, recoveredPatients

Notice that this is very similar to part of nextDay(). Again, we go through


the list of patients, and if any of the patient’s health reaches or drops below 0,
we report that the patient died, and add the patient to a diedPatients counter.
On the other hand, if any of the patient’s health reaches or goes over 100, we
report that the patient has recovered and discharged, and add the patient to a
recoveredPatients counter.

6. Here we actually implement our strategy of assigning nurses:

def assignNurses( patients ):


nurses = [];
availableNurses = TOTAL_NURSES
for patient in patients:
nursesNeeded = math.ceil((100-patient)/NURSING_ABILITY)
if availableNurses > nursesNeeded:
nurses.append( nursesNeeded )
availableNurses -= nursesNeeded
else:
nurses.append( 0 );
return nurses;

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).

7. Lastly, we enter the code that simulates the hospital:

’’’ Variables ’’’


patients = [90,90,90,90,90,90,90,90,90,90]
currentDay = 1
totalDays = 100
diedPatients = 0
recoveredPatients = 0

’’’ Simulate the hospital ’’’


while currentDay <= totalDays:
print "Day", currentDay
print "patients:", patients
nurses = assignNursesBetter(patients)
print "nurses:", nurses;

currentDay += 1
patients = nextDay(patients, nurses)
diedPatients, recoveredPatients = checkAssignment( patients,
diedPatients, recoveredPatients)
print ""

print "after", totalDays, "days,", diedPatients,\


"patients died and ", \
recoveredPatients, "were discharged."

First we define a few variables:

(a) The initial list of patients


(b) The starting day
(c) How many days to simulate
(d) How many patients died
(e) How many patients recovered

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().

’’’ Assign nurses to patients in a smarter manner’’’


def assignNursesBetter( patients ):
sortedPatients = sorted(patients)
patientsCopy = list(patients)
sortedIndex = []

for patient1 in sortedPatients:


for index, patient2 in enumerate(patientsCopy):
if patient1 == patient2:
sortedIndex.append( index )
patientsCopy.pop( index )
patientsCopy.insert( index, 999 )
break

nurses = [0,0,0,0,0,0,0,0,0,0];
availableNurses = TOTAL_NURSES

for index in sortedIndex:


nursesNeeded =
math.ceil((100-patients[index])/NURSING_ABILITY)
if availableNurses >= nursesNeeded:
nurses.pop(index)
nurses.insert(index, nursesNeeded)
availableNurses -= nursesNeeded
else:
139
nurses.pop(index)
nurses.insert(index, 0)

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.

2. Which strategy is better and why?

3. What is another strategy that might work better?

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

CSI 3303: Introduction to Computational Thinking

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

3. Alternate between cheating and cooperating

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.

5. Reverse tit-for-tat: Punish cooperation with cheating. Reward cheating with


cooperation.

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 Setup and Programming

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.)

3. Enter the following code at the top of your file:

from __future__ import division

(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

’’’ Payoff Matrix ’’’


PAYOFFS = (
( (20,20), (0,30) ),

144
( (30,0), (10,10) )
)

’’’ Strategies Dictionary ’’’


STRATEGIES = {
"ALWAYS-CHEAT" : ((CHEAT,CHEAT),(CHEAT,CHEAT)),
"ALWAYS-COLLUDE" : ((COLLUDE,COLLUDE),(COLLUDE,COLLUDE)),
"ALTERNATE" : ((CHEAT,CHEAT),(COLLUDE,COLLUDE)),
"TIT-FOR-TAT" : ((COLLUDE,CHEAT),(COLLUDE,CHEAT)),
"REVERSE-TFT" : ((CHEAT,COLLUDE),(CHEAT,COLLUDE)),
}

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:

(a) There are at least five items in the list, and


(b) All five most recent items are equal.

If these two conditions hold, the function returns True; if not, False is returned.
Next, add the following two functions:

def simulate(strategyP1, strategyP2, prevP1, prevP2):


global PAYOFFS, STRATEGIES, COLLUDE, CHEAT
history = []
while len(history) < 1000 and not converged(history):
nextP1 = STRATEGIES[strategyP1][prevP1][prevP2]
nextP2 = STRATEGIES[strategyP2][prevP2][prevP1]
history.append(PAYOFFS[nextP1][nextP2])
prevP1,prevP2 = nextP1,nextP2
return history

def getOutcome(strategyP1, strategyP2, p1First, p2First):


results = simulate(strategyP1, strategyP2, p1First, p2First)
averageP1 = sum([item[0] for item in results]) / len(results)
averageP2 = sum([item[1] for item in results]) / len(results)
return (converged(results), results[-5:], (averageP1, averageP2))

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:

’’’ Test All Strategy Combinations ’’’


for i, strategyP1 in enumerate(STRATEGIES.keys()):
for strategyP2 in STRATEGIES.keys()[i:]:
print "\n---------------\n"
print "Player 1 Strategy:", strategyP1
print "Player 2 Strategy:", strategyP2
outcome = getOutcome(strategyP1, strategyP2, COLLUDE, COLLUDE)
print "Converged?", outcome[0]
print "Final State", outcome[1][-1]
print "Avg. Payoff P1", outcome[2][0]
print "Avg. Payoff P2", outcome[2][1]

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?

3. Which combination(s) of strategies lead(s) to mutual cheating?

4. Do all strategies converge (i.e. settle down to the same outcome for five itera-
tions)?

5. Test different combinations of start conditions ((collude, collude), (collude,


cheat), (cheat, collude) and (cheat, cheat).) Are there any differences in the
eventual outcome convergences?

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:

Player 1/Player 2 Always Cheat Always cooperate Alternate Tit-for-tat


Always Cheat cheat / cheat
Always Cooperate cooperate / cooperate
Alternate
Tit-for-tat
Reverse tit-for-tat

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

CSI 3303: Introduction to Computational Thinking

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.

5 Setup and Programming

5.1 PID file


1. Download and save the files needed for the simulator from the course website. Unzip the file
and save to a local folder.
2. Within that folder, create a new file called pid.py
3. Open the pid.py in the text editor of your choice (such as Notepad or Vim.)
4. Enter the following code at the beginning of the file on the first two lines:

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:

def __init__(self, target, current):


self._previousError = 0.0
self._target = target
self._error = target - current
self._integral = 0.0

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:

def setParameters(self, Kp, Ki, Kd):


self.Kp = Kp
self.Ki = Ki
self.Kd = Kd

def setTarget(self, target):


self._target = 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:

def update(self, current):


self._error = self._target - current
self._integral += self._error
derivative = (self._error - self._previousError)
self._previousError = self._error
return (self.Kp * self._error) + \
(self.Ki * self._integral) + \
(self.Kd * derivative)

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:

def error(self, current):


self._error = self._target - current
return self._error

9. Save the file, and close it.

5.2 Testing the Controller

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.

1. Within the same folder, create a new file called tester.py


2. Open the tester.py in the text editor of your choice (such as Notepad or Vim.)
3. Enter the following code at the beginning of the file:

from math import fabs


from pid import *

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:

c = Control(target = 60, current = speed)


c.setParameters(0.5, 0.5, 0.5)

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 fabs(c.error(speed)) > 0.01:


print c.error(speed), speed
acceleration = c.update(speed)
speed += acceleration

print c.error(speed), speed

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:

from math import fabs


from pid import *

speed = 100
acceleration = 0.0

c = Control(target = 60, current = speed)


c.setParameters(0.1, 0.1, 0.1)

while fabs(c.error(speed)) > 0.01:


print c.error(speed), speed
acceleration = c.update(speed)
speed += acceleration

print c.error(speed), speed

8. Save and close this file.

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.

5.3 Cruise Control Simulator

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:

from simulator.simulator import CarSimulator


from pid import *

acceleration = 0.0
speed = 0.0
cs = CarSimulator()

pid = Control(target = 60, current = speed)


pid.setParameters(0.5, 0.5, 0.5)

while 1:
speed = cs.update(acceleration)
acceleration = pid.update(speed)

Again, pay attention to indentation.


The first line imports the pre-built car simulator class, and the second imports our PID con-
troller class. We next set our acceleration and speed variables, as well as creating a CarSim-
ulator object, called cs. Next we create an instance of our PID class, setting the target speed
at 60 and passing in the current speed.
Using the parameter values you found through experimentation, replace the “0.5, 0.5, 0.5”
values with your own, such as:

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

CSI 3303: Introduction to Computational Thinking

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.

3.1 Identifying English Pronouns

First lets try some identification of pronouns in English. Replace the direct object in
the following sentences with a pronoun:

1. Sally sees Luisa.


2. He knows Harold.
3. I know Paul and Luisa.
4. We watch television.

In the following sentences, find the direct object pronoun:

1. She sees me.


2. He knows her.
3. I know them.
4. We watch it.

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:

1. She gives the papers to Terry.


2. He writes the letters to his friends.
3. I throw the ball at the dog.
4. We receive gifts from our parents.

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:

1. (Ella) da los papeles a Terry.

2. (El) escribe las cartas a sus amigos.

3. (Yo) tiro la pelota al perro.

4. (Nosotros) recibimos regalos a nuestros padres.

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:

1. (Ella) le da los papeles.

2. (El) les escribe las cartas.

3. (Yo) le tiro la pelota.

4. (Nosotros) les recibimos regalos.

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.

(a) (Ella) me las manda. (manda = she sends)


(b) (Tú) nos la haces. (haces = you do and la is the pronoun replacing “home-
work”)
(c) (Nosotros) te lo dejamos. (dejamos = we leave and “lo” is the pronoun
replacing “the problem”)
(d) (Yo) se las tengo. (tengo = I have and “las” is the pronoun replacing “the
cookies”)

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

3. Translate the four sentences you just created into English.

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

CSI 3303: Introduction to Computational Thinking

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

4.1 Midi Parser and Prime Form Calculator

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:

(track_index, channel_index, pitch, velocity, keyDownTime, keyUpTime)

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:

midi.py -i music.mid -p[1,0,5]

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.

2. What are some advantages to using a computer to accomplish this task?

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

• Amanda Sturgill, Ph.D.


Elon University, Journalism
Computer Assisted Reporting

• Linda McManess, Ph.D.


Baylor University, MFL
Direct and Indirect Objects

• Ivy Hamerly, Ph.D.


Baylor University: Political Science
Prisoner’s Dilemma

• Wade Rowatt, Ph.D.


Baylor University, Neuroscience
Three Problems (Tourist, Thumbs, Education)

• Andru Anderson, M.A.


Baylor University, FDM
Timecode Calculator
Applying a Filter to an Image
Creating and Posting a Playlist

• Tracy Booth, M.S., Sharon Souter, Ph.D.


UMHB, Nursing
Calculate Drug Dosages
Staffing Problem

• Bill Booth, M.S.


Baylor University
Computer Science
Game Development
Computer Animation
Robotics Problem
Python as a Computation Tool
Random Variables for Estimating PI

• Chris Bartlette, Ph.D. , Edward Taylor, Ph.D.


Baylor University, Music
Music Theory and the 12-tone System

• Todd Buras, Ph.D.


Baylor University, Philosophy
Probability, Testimony and Belief

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/.

[2] The python tutorial, January 2011. http://docs.python.org/tutorial/.

[3] M. Buckley. Viewpoint: Computing as social science. Commun. ACM, 52(4):29–30,


2009.

[4] P. J. Denning. The profession of it - beyond computational thinking.


Communications Of the ACM, 52(6):28–29, June 2009.

[5] O. Hazzan. Reflections on teaching abstraction and other soft ideas. SIGCSE Bull.,
40(2):40–43, 2008.

[6] P. B. Henderson, T. J. Cortina, and J. M. Wing. Computational thinking. In


SIGCSE ’07: Proceedings of the 38th SIGCSE technical symposium on Computer
science education, pages 195–196, New York, NY, USA, 2007. ACM.

[7] J. Kramer. Is abstraction the key to computing? Commun. ACM, 50(4):36–42, 2007.

[8] S. M. Pulimood and U. Wolz. Problem solving in community: a necessary shift in cs


pedagogy. In SIGCSE ’08: Proceedings of the 39th SIGCSE technical symposium on
Computer science education, pages 210–214, New York, NY, USA, 2008. ACM.

[9] H. Qin. Teaching computational thinking through bioinformatics to biology students.


In SIGCSE ’09: Proceedings of the 40th ACM technical symposium on Computer
science education, pages 188–191, New York, NY, USA, 2009. ACM.

[10] G. Wilson, C. Alvarado, J. Campbell, R. Landau, and R. Sedgewick. Cs-1 for


scientists. SIGCSE Bull., 40(1):36–37, 2008.

[11] J. M. Wing. Computational thinking. Commun. ACM, 49(3):33–35, 2006.

171
REFERENCES

Adams, J. B. (2008, May). Computational science as a twenty-first century discipline


in the liberal arts. The Journal of Computing Sciences in Colleges, 23 , 15-23.

Aho, A. V. (2011, January). What is computation? computation and computational


thinking. Ubiquity, 2011 (1), 1-8. Retrieved from http://dx.doi.org/10.1.1/jpb001
doi: 10.1145/1895419.1922682

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.

Astrachan, O. (2009, March). A new way of thinking about computational thinking.


Proceedings of the ACM SIGCSE .

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)

Bruner, J. S. (1964, Jan). The course of cognitive growth. American Psychologist,


19 , 1-15.

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 .

Bureau of Labor Statistics. (2007). Bureau of labor statistics projections of occupa-


tional employment: 2006-16. Office of Occupational Statistics and Employment
Projections.

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.

Creswell, J. W. (2006). Qualitative inquiry and research design: Choosing among 5


approaches. Thousand Oaks, CA: Sage Publications.

Creswell, J. W., & Plano-Clark, V. L. (2011). Designing and conducting mixed


methods research, (2nd ed.). Thousand Oaks, CA: Sage Publications.

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.

Denning, P. J. (2009, June). The profession of it - beyond computational thinking.


Communications of the ACM , 52 (6), 28-29.

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.

Eisenberg, M. (2008, July). Recursion - or, better computational thinking through


laughter. International Journal of Computers for Mathematical Learning, 171-
174.

Freshwater, D. (2007). Reading mixed methods research, contexts for criticism. Jour-
nal of Mixed Methods Research, 1 (2), 134-146. doi: 10.1177-1558689806298578

Gaigher, E. (2006). The effect of a structured problem solving strategy on performance


and conceptual understanding in physics: A study in disadvantaged south african
school. Unpublished doctoral dissertation, University of Pretoria.

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.

Greeno, J. G. (1989). Situations, mental models, and generative knowledge. In


D. Klahr & K. Kotovsky (Eds.), Complex information processing: The impact of
herbert a. simon (p. 285 - 318). Hillsdale, NJ: Lawrence Erlbaum and Associates.

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

Hamerly, G., Booth, W., & Sturgill, D. (2009). An interdisciplinary, problem-based,


collaborative course on computational thinking. National Science Foundation CISE
Pathways to Revitalized Undergraduate Computing Education Program.

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. (1984). Experiential learning: experience as the source of


learning and development. Englewood Cliffs, NJ: Prentice Hall. Re-
trieved from http://www.learningfromexperience.com/images/uploads/process-of
-experiential-learning.pdf!(dateofdownload:31.05.2006)

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

Lainema, T. (2009, February). Perspective making, constructivism as a meaning-


making structure for simulation gaming. Simulation & Gaming, 40 (1), 48-67.

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.

McLeod, S. A. (2008). Bruner - learning theory in education. Retrieved from http://


www.simplypsychology.org/bruner.html

Merriam, S. B. (1997). Qualitative research and case study applications in education:


Revised and expanded from case study research in education/i (J. B. E. Series,
Ed.). Thousand Oaks, CA: Jossey Bass Publishers.

Mertens, D. M. (2011). Publishing mixed methods research. Journal of Mixed


Methods Research, 5 (1), 3-6. doi: 10.1177/1558689810390217

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)

Peng, H. (2012, February). Algo.rhythm: Computational thinking through tangible


music device. Tangible, Embedded and Embodied Interaction, 401-402.

Qin, H. (2009a). Teaching computational thinking through bioinformatics to biology


students. In Sigcse ’09: Proceedings of the 40th acm technical symposium on
computer science education (pp. 188–191). New York, NY, USA: ACM. doi:
http://doi.acm.org/10.1145/1508865.1508932

Qin, H. (2009b, March). Teaching computational thinking through bioinformatics to


biology students. SIGCSE’09 , 3-7.

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

Potrebbero piacerti anche