You are on page 1of 2

2018 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)

The novice programmer needs a plan


Kathryn Cunningham
School of Information, University of Michigan
kicunn@umich.edu

I. I NTRODUCTION II. A PLAN - BASED APPROACH HOLDS PROMISE


Algorithms and automation run social worlds, support sci- In contrast to a syntax focus, some computing education
entific discovery, and even arbitrate economic opportunity. researchers have explored an explicit focus on common pat-
Job opportunities in computer science match this outsized terns or strategies used when coding. While rare in classrooms,
influence: projected job growth in computing dwarfs that of this approach potentially aligns with a basic psychological
other STEM fields [1]. In recognition of this reality, the fact: humans often use schemas (mental patterns or frames)
movement to expand computing education to all students, to organize their knowledge. If we can teach schemas that
including low-income, underrepresented minority, and female correspond to common patterns used by programmers, we
students, has grown by leaps and bounds. This has led to potentially provide students with a powerful problem-solving
computing instruction in K-12, more computing in colleges, tool.
and a more diverse set of students to teach. In the 1980s, Elliot Soloway developed a framework of
However, current approaches to teaching programming of- goals and plans to explain how programs are written. A
ten fall short. Multi-institutional, multi-national studies have programmer has goals they want to achieve and corresponding
shown that many students complete a college-level intro- plans of code that achieve the goals. These plans are “canned”
ductory computing course without being able to write basic solutions to common programming problems, such as checking
programs [2], or in some cases, read small pieces of code and if an input is valid, summing up all values in a list, or stopping
predict their result [3]. Extending current teaching techniques a search when a sentinel value is read. Soloway criticized
into earlier grades or to groups with weaker academic prepa- the syntactic approach as avoiding the parts of programming
ration isn’t a promising approach. where students really struggle: composing pieces of a program
together into a functional whole [6].
Something isn’t working in introductory computing
classrooms—and the dominant strategy for programming in- III. S TUDENTS PROBLEM - SOLVE THROUGH PATTERNS
struction should be re-examined. A typical programming We know that experts use plans to problem-solve while
course today focuses on syntax elements as units of program- writing code [7], but is this approach also appropriate for
ming knowledge, with textbook chapters often arranged to novices? My recent work suggests that use of programming
cover one or two elements (e.g. if/else statements) at a time. plans is natural even for students in their first programming
Similarly, validated assessments of introductory programming course.
knowledge, like the FCS1 [4], have conceptual topics that I interviewed 13 students about the ways they sketched and
read like the Backus-Naur form of a programming language drew on scratch paper while solving problems on a recent
grammar: “Logical Operators”, “Assignment”, “Definite Loop introductory programming exam. I found that tracing through
(for)”, etc. the behavior of a piece of code was often performed in service
While a detailed focus on the behavior of syntax elements of a search for some sort of structure or pattern with which
has been shown to improve student outcomes (e.g. [5]), to organize their thoughts. For example, one student described
focusing on this behavior alone has drawbacks. There are her success in determining the goal of a code snippet she was
endless ways to combine syntax elements, and a correspond- asked to analyze on the exam:
ingly large mental search space for the novice programmer to “I was just writing out just to see which numbers I was
think through when writing code or understanding someone going to deal with. Then afterwards I would just look at it
else’s code. Familiarity with how coding syntax works doesn’t and I would be like, oh, so it’s going to look for the one that’s
directly explain how to build a program that achieves a certain the greatest...”
goal or immediately illuminate why someone wrote code the A careful trace on scratch paper was also used to confirm
way they did. An instructional technique that streamlines this the plan or pattern a student had tentatively identified:
process may lead more students to success. “I saw the pattern, and I just wanted to write it up to make
sure the pattern was right.”
This material is based upon work supported by the National Science
Foundation Graduate Research Fellowship under Grant No. DGC-1148903
Rather than simply mimicking each step of code execution,
these students are taking the very human action of searching
for meaning in which to ground their problem-solving. In
978-1-5386-4235-1/18/$31.00 ©2018 IEEE code reading problems, we know that tracing the behavior of

269
2018 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC)

code execution on paper is correlated with greater problem-


solving success [3]. However, in practice, students searched
for what the code was “supposed” to do, and turned to careful
tracing only when the goal of the code was unclear or needed
confirmation. It seems that the ability to accurately recognize
plans may mediate the success of novice programmers.
IV. W ORKING WITH STUDENT TENDENCIES , NOT AGAINST
Students’ search for plans and patterns is a potentially
useful tendency that could be strengthened as a problem-
solving approach. There is an opportunity for instructors to
facilitate use of this strategy for all students, but little work
has been done about how to explicitly incorporate plans into
an instructional approach.
Instead, much recent work in building student programming
skill has focused on improving understanding of program
behavior. Many iterations of program visualization tools have
been created to demonstrate the changes in memory as code
executes [9]. These tools execute every step of code execution,
giving a look “inside” the computer. However, they do not have
the capability to infer the goal of the code they visualize, or
even any patterns or structure in the changes of key variables.
V. F UTURE DIRECTIONS
The focus on plans as an alternative instructional approach
Fig. 1. Examples of a plan in two different contexts.
is promising, but much work is needed in order to prove its
effectiveness and make it actionable in the classroom. While
past work has described how students may build programs R EFERENCES
by composing goals and plans, little work has focused on [1] S. Fayer, A. Lacey, and A. Watson. “BLS spotlight on statistics: STEM
a more foundational skill: the ability to recognize plans in occupations - past, present, and future,” Bureau of Labor Statistics, Jan.
practice. My prior work has shown that this recognition is key 2017. Available: https://www.bls.gov/spotlight/2017/science-technology-
engineering-and-mathematics-stem-occupations-past-present-and-future
to students’ use of plans while solving problems. I plan to [2] M. McCracken, V. Almstrum, D. Diaz, M. Guzdial, D. Hagan, Y. Ben-
investigate the following research questions: David Kolikant, C. Laxer, L. Thomas, I. Utting, and T. Wilusz. “A Multi-
Is the ability to recognize and recall programming plans national, Multi-institutional Study of Assessment of Programming Skills
of First-year CS Students,” In Working group reports from Innovation
correlated with problem-solving success? and Technology in Computer Science Education, 2001, pp. 125-180.
A closer investigation of how knowledge of programming [3] R. Lister, O. Seppala, B. Simon, L. Thomas, E. S. Adams, S. Fitzgerald,
plans is related to success in different types of programming W. Fone, J. Hamer, M. Lindholm, R. McCartney, J. E. Mostrom, and
K. Sanders. “A multi-national study of reading and tracing skills in
problems, such as reading code, fixing code, and writing code, novice programmers,” In Working group reports from Innovation and
will help us understand the promise and limitations of this Technology in Computer Science Education, 2004, pp. 119-150.
approach. [4] A. E. Tew and M. Guzdial. “Developing a validated assessment of
fundamental CS1 concepts,” In Proceedings of the 41st ACM Technical
How can instructors increase the ability of students to Symposium on Computer Science Education, 2010, pp. 97-101.
recognize and recall programming plans? [5] G.L. Nelson, B. Xie, and A. J. Ko. “Comprehension first: evaluating a
There are two techniques I plan to investigate. The first novel pedagogy and tutoring system for program tracing in CS1,” In
Proceedings of the 2017 ACM Conference on International Computing
approach is to use examples of the plan implemented in Education Research, 2017, pp. 2-11.
a variety of contexts (see Figure 1). This may allow each [6] J.C. Spohrer, E. Soloway, and E. Pope. “A goal/plan analysis of buggy
student to create a mental schema of the abstracted plan that Pascal programs,” Human-Computer Interaction, vol. 1, no. 2, Jun., pp.
163-207, 1985.
fits within their existing knowledge structures. The second [7] R. S. Rist. “Schema creation in programming,” Cognitive Science, vol.
approach is explicit instruction about a programming plan, 13, pp. 389-414, 1989.
using a visualization of an abstract plan. While this approach [8] J. Sorva, “Notional machines and introductory programming education,”
Transactions on Computing Education, vol. 13, no. 2, Jul., pp. 1-31,
has the potential advantage of more accurately sharing expert 2013.
knowledge and decreasing the opportunity for misconceptions, [9] J. Sorva, V. Karavirta, and L. Malmi. “A review of generic program
it also has the potential downside of being too abstract or visualization systems for introductory programming education,” Trans-
actions on Computing Education, vol. 13, no. 4, Nov., pp. 15-78, 2013.
difficult to understand for novices. [10] M. De Raadt, R. Watson, and M. Toleman. “Teaching and assessing
Understanding the utility of plan recognition for novices programming strategies explicitly,” In Proceedings of the Eleventh
and validating techniques for building plan knowledge add a Australasian Conference on Computing Education, 2009, pp. 45-54.
multipurpose tool to the toolbox of programming educators.

270

You might also like