Following a thread: knitting patterns and program tracing

  • Authors:
  • Michelle Craig;Sarah Petersen;Andrew Petersen

  • Affiliations:
  • University of Toronto, Toronto, ON, Canada;, Toronto, ON, Canada;University of Toronto Mississauga, Mississauga, ON, Canada

  • Venue:
  • Proceedings of the 43rd ACM technical symposium on Computer Science Education
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents observations about teaching program tracing to novices drawn from a study of knitting patterns. Due to changes in audience, knitting patterns have evolved from vague, chatty discourse written for experts to precise, line-by-line procedures that are akin to programs. The modern knitting community has developed numerous conventions for articulating iteration, expressing conditions, and documenting design decisions. "Executing" one of these patterns is analogous to tracing, since the knitter must demonstrate understanding of the instructions. We argue that the conventions adopted by knitters to make their patterns more understandable to non-experts provide useful insight to computer scientists teaching novices. Our observations suggest that phrasing conditions as termination cases ("until" instead of "while") and partially unrolling loops may help beginners understand code and that some structures, like parameters to functions, may be unfamiliar because they have no common analog.