Good Examples for Exposing Bad Practice
A “Killer Examples” Workshop
Dale Skrien
Michael E. Caspersen
Jürgen Börstler
Colby College
djskrien@colby.edu
University of Aarhus
mec@daimi.au.dk
Umeå Universitet
jubo@cs.umu.se
Adrienne Decker
Carl Alphonce
University at Buffalo
adrienne@cse.buffalo.edu
University at Buffalo
alphonce@cse.buffalo.edu
Abstract
Keywords Object-orientation, Pedagogy, Process, Teaching, Learning, Programming
The “Killer Examples” series of workshops are highly interactive workshops which have been an annual occurrence
at OOPSLA since 2002. The goals of the workshop are to
bring together educators and developers to share their objectoriented expertise, and to provide a forum for discussion
of teaching techniques and pedagogical goals. The theme
of last year’s workshop was pedagogically sound examples
for object orientation; this year’s workshop continues that
theme, but rather than focusing on examples that demonstrate sound object-oriented design, it will focus on examples that expose bad practice and so lead to better appreciation of good practice, as obtained by following sound objectoriented principles.
The workshop will present such examples which are or
can be used in the teaching of object-orientation. All participants in the workshop will critique the examples and actively
engage in refining the examples in a way that they support a
clear and sound pedagogy.
While there was a formal application procedure to guarantee admission to the workshop, we do accept walk-ins if
space permits and the walk-ins are determined to have adequate interest and background in the workshop theme to be
able to contribute positively to the discussions.
Themes and Goals
Since 2002 we have organized and run, with various colleagues from different institutions, the “Killer Examples” series of workshops at OOPSLA. These workshops have been
well-received, and have adapted over the years in response
to attendee feedback to keep interest high.
Early “Killer Examples” workshops focused on gathering
examples of design pattern usage which are suitable for use
in a CS curriculum, especially in beginning courses. In these
workshops the focus was, to a large extent, on what we teach.
One piece of feedback that we have received regarding
the killer examples that have come out of previous workshops is that while the examples themselves are good to
have, the example themselves do not come with a roadmap
for bringing them into the classroom. To begin to address
this, in 2007 the focus was placed more on how we teach
object orientation.
In this year’s workshop we continue with this focus. In
particular, we wish to focus the workshop’s attention on the
use of examples that expose bad practice.
Students, when presented with good (killer) solutions
Categories and Subject Descriptors K.3.2 [Computers
to problems, can appreciate how the solutions incorporate
and Education]: Computer and Information Science Education— sound OO principles, but they may not understand what is
Computer Science Education
wrong with alternative solutions that also appear good to
them. It is important that students learn how to look at a bad
General Terms Design
solution to a problem and critique it with regard to standard
OO principles, such as Law of Demeter or the Liskov Substitution Principle. Skill at critiquing bad code is valuable
in code reviews and in other situations involving reviews of
existing or proposed solutions to problems.
Good examples that demonstrate bad practice can be as
Copyright is held by the author/owner(s).
simple
as a section of code with a poorly named variable
OOPSLA 2009, October 25–29, 2009, Orlando, Florida, USA.
ACM 978-1-60558-768-4/09/10.
that misleads the reader regarding the behavior of the code.
711
In our workshop, participants are encouraged to discuss
examples that they have used in their teaching, whether it
be in a traditional classroom or in an industry training setting. During the course of the pre-workshop and workshop
activities, the workshop community has worked together to
ensure that there is a clear description of the problem, the
context in relation to a topic or course, relevant supplemental materials (e.g. diagrams, code snippets), and that there
is a defined progression of how to present the example and
eventual solution. This process might involve discussion of
pure classroom examples (those that are demonstrated fully
in the classroom), or pure assignments (those that are given
solely for the students to complete), or ideally, an example
that is started and explained in the classroom and then given
to the students to finish as an assignment.
Alternatively, a good example might be one that looks to
be well-designed at good at first glance, but demonstrates
fragility when changes are attempted. Another example
might consist of an inappropriate application of a design
pattern. Also, a large method that can easily be refactored
using the Extract Method refactoring could be another example.
Some examples could demonstrate several bad practices,
and so require a series of design changes or transformations
in order to be converted into a good solution.
In our workshop, participants will discuss examples exposing bad practice that they have seen or used in their teaching, whether it be in a traditional classroom or in an industry
training setting. Such examples are often found in students’
solutions to problems or in existing code bases in industrial
applications.
During the workshop the organizers will present the
workshop participants with problems and solutions to those
problems that utilize bad practice. The participants will then
play the role of students and will work in groups to discuss
what is wrong with the solutions and how they can be made
better. After the group work, the participants will come together to compare their results. Finally the participants will
discuss ways to improve the initial problems and solutions
to better expose bad practices.
In the past we have disseminated results from the workshops in several ways. We have presented posters reporting
the results of past workshops at both OOPSLA and SIGCSE.
Post-workshop activities
After the workshop participants will be expected to submit
final versions of their examples for inclusion on a web site
for general dissemination via the workshop website:
www.cse.buffalo.edu/faculty/alphonce/OOPSLA2009/
We have in the past presented posters of the workshop
at the conference poster session, and will do so again. The
workshop poster is halfway prepared ahead of time, with
general information about the workshop and its presentations, but with open space for workshop outcomes, to be
filled in after the workshop. Workshop participants are encouraged to help present the poster.
Workshop activities and format
Participation
This is a full-day workshop, held from 8:30 AM to 5:00
PM on Sunday, October 25, in Pastoral 3 (please check
conference schedule for last-minute changes). The workshop
is highly participatory, with different levels of contribution
possible.
The organizers will first set the stage for the day’s activities by reiterating the goals and format of the workshop. For each accepted presenter we will have a presentation/discussion session. During each of these sessions the
participant who submitted examples will present their examples, along with solutions to those problems that utilize bad
practice. The other participants will then work in groups to
discuss what is wrong with the solutions and how they can
be made better. After the group work, the participants will
come together to compare their results. Finally the participants will discuss ways to improve the initial solutions to
better expose bad practices.
The workshop has a formal application procedure to guarantee admission, but we will accept walk-ins if space permits
and if the walk-ins are determined to have adequate interest
and background in the workshop theme to be able to contribute positively to the discussions.
712