Why is Programming So Difficult?
Programming is the process of explaining how to perform some complex
behavior. Programming is difficult because, in general, explaining
any complex behavior requires careful attention to detail. For
example, try describing in detail "how to drive." Is
your description detailed enough for someone who's never driven
a car? Could they follow your instructions without error? How much
more detail would you need to help them avoid errors?
Of course, when we explain instructions to people, we don't always
need to supply all of the details, since people share common knowledge
about tasks, contexts, and meaning. As a result, people can generally
deal with ambiguity and adapt to unexpected circumstances.
Computers, on the other hand, know almost nothing about our tasks,
and they are horrible at adapting to novel situations. About all
they know is how to do is read and write bits. If they encounter
some unexpected circumstance, they tend to behave in unexpected
ways. It is up to programmers to consider all of these circumstances,
and prescribe some reasonable behavior for each and every one.
Overcoming Barriers with Tools
Expert programmers are usually up to the task. They learn to
design and understand software architectures, algorithms, and data
structures; they learn to read, write, and modify code written
in numerous programming languages; and they acquire the skills
necessary for determining when a program fails, what program states
caused it to fail, and how to change a program to prevent failure.
But even expert programmers don't do this without help. They rely
on a variety of tools to help them create software. Even a minimalist
UNIX programmer uses gcc, make, emacs, grep, cvs, a shell, gdb,
and pencil and paper, not to mention a lot of time and attention.
Without all of these tools, UNIX programming would be nearly impossible.
Yet, even with these tools, most studies of programming activity
suggest that 50% or more of expert programmers time is spent testing
and debugging on average. A 2002 study commissioned by the National
Institute of Standards and Technology found that industry software
engineers spend up to 70-80% of their time finding and repairing
errors.
Clearly, programming tools are important, if not essential to
programming activity, but one may question how well current tools
help to increase productivity and prevent errors.
Our Approach
In general, our research methodology involves four phases:
- Understand how a programmer, the programmer's task, and the
programming system interact. What problems do programmers have
in trying to program and what's to blame?
- Design new interaction styles and programming interfaces that
intend to mitigate the problem. This involves lots of prototyping,
brainstorming, and user testing.
- Implement the solution. This is the computer science part of
our research, where we design new architectures and algorithms
that implement our design.
- Verify the solution's effectiveness. This is the empirical
part of our research, where we validate our solution's effectiveness
in removing the problems identified in the first phase.
At each stage, we employ a number of different research tools.
For phase (1), we use contextual inquiry, controlled studies, and
qualitative observations to guide our understanding of the problem.
In stage (2), we make use of paper prototypes, and frameworks such
as the Cognitive Dimensions of Notations. In phase (3), we design
software architectures and consider how components relate and communicate
with each other. In phase (4) we perform controlled studies on
our new tools to verify that the tool helped. |