Studies and Findings
Understanding Debugging
Most of our studies have focused on programmers new to Alice,
and specifically on tasks of creating highly interactive, state-based
games such as Pac-Man. We have developed a framework
and methodology for studying the causes of software errors,
and have applied it to Alice.
In our observations, we have found that a significant proportion
of the errors are ultimately caused by a viscious cycle of assumptions:
programmers introduced an error, which caused their programs to
fail; when debugging the failure, they incorrectly assumed that
one aspect of their code was to blame, and made modifications to
try to fix it, introducing more errors. When these errors were
debugged, programmers again made false assumptions about their
code, and the cycle continued. In general, these false assumptions
were the cause of half of the errors that programmers later introduced.
The Whyline
Our goal in designing a solution was to prevent the false assumptions
that programmers were making about what did or did not happen at
runtime. Our rationale was that if we prevent them from ever making
an assumption about what happened at runtime, then they cannot
make an incorrect assumption. And to prevent someone from making
an assumption, you have them ask questions.
Thus, we analyzed programmers questions at the time of program
failure and found that they were of two forms: Why did questions,
which presumed some runtime action, and Why didn't questions,
which questioned the absence of some runtime action. As it turns
out, there are three possible answers to these two questions:
- The presumed action didn't actually occur (or did, for a Why
didn't question).
- The presumed action occurs unexceptionally (or can never occur,
for a Why didn't question).
- The presumed action occured because of some combination of
control and data flow at runtime (or did not, for a Why didn't question).
From these observations, we designed and implemented the Whyline
(a Workspace for Helping You Link Instructions to Numbers and Events).
See a demo on the tools page!
Learning Barriers in Programming Systems
Prior research on learning barriers in programming systems has
primarily focused on programming languages, overlooking potential
learning barriers in the environment and accompanying libraries.
To address this, we performed a
study of beginning programmers learning Visual Basic.NET in
order to develop a categorization of learning barriers.
What are Learning Barriers?
One way to understand learning barriers is to study the learner.
For example, imagine Jill, a user interface designer who just began
learning VB. Shortly after starting, she realizes that she must
learn about event handlers to proceed. This poses a potential learning
barrier. From an attention-investment perspective, she will weigh
the cost, risk, and reward of overcoming the barrier, and if the
risk of failure outweighs the reward, she may abandon VB for other
tools.
Jill may also decide that progress is worth the risk of failure.
We have proposed a
framework describing the causes of software errors that suggests
she will make several simplifying assumptions about the language,
environment, and libraries in trying to acquire the necessary knowledge.
If her assumptions are valid with respect to the programming system,
she will make progress. If her assumptions invalid with respect
to VB—what we call knowledge breakdowns—she is likely
to make an error. Within this framework, we define learning barriers
as aspects of a programming system or programming problem that
are prone to such invalid assumptions. These concepts and their
relationships are depicted below.
Given these definitions, what aspects of programming systems might
pose learning barriers? Research has explicitly identified several
aspects of programming languages that are prone to invalid assumptions,
including conditionals, Boolean operators, loops and data structures.
Others have found that the task-specificity of language constructs
influencess learners'assumptions. There has been little research,
however, on barriers in the rest of the programming system.
Six Learning Barriers in End-User Programming Systems
Our study identified six types of learning barriers: design, selection,
coordination, use, understanding, and information barriers.
Design barriers
Design barriers are inherent cognitive difficulties of
a programming problem, separate from the notation used to represent
a solution (i.e., words, diagrams, code). In this study, several
problems posed design barriers, including sorting, communication
between forms, conditional logic, and event concurrency.
Selection barriers
Selection barriers are properties of a programming environment's
facilities for discovering (1) what programming interfaces are
available and (2) which can be used to achieve a particular behavior.
These arose when learners knew what behavior they wanted, but
did not know which programming interfaces could achieve it.
Coordination barriers
Coordination barriers are a programming system's constraints
on how programming interfaces in the language and frameworks
can be combined to achieve complex behaviors—what one learner
called VB's "invisible rules." These arose when learners thought
they knew what set of interfaces to use to accomplish a behavior,
but had difficulty in properly coordinating them.
Use barriers
Use barriers are properties of a programming interface
that obscure (1) in what ways it can be used, (2) how to use
it, and (3) what effect such uses would have. These arose when
learners knew what interface to use, but were misled by its obscurities.
Understanding barriers
Understanding barriers are properties of a program's
external behavior (including compile- and run-time errors) that
obscure what a program did or did not accomplish. These barriers
arose when learners could not interpret these behaviors to determine
what their program did or did not do, relative to their expectations.
Information barriers
Information barriers are properties of a programming
environment that make it difficult to acquire information about
a program's internal behavior (such as a variable's value, what
calls what, or where a line of code is). These arose when learners
had a hypothesis about their program's internal behavior, but
were unable to find or use facilities to test their hypothesis.
Studying Expert Use of the Eclipse IDE
for Java
We have just completed a study for dozens of expert programmers
using the Eclipse IDE to test, debug, and augment a Swing application.
We'll have results soon! |