Skip to main content
eScholarship
Open Access Publications from the University of California

UC Berkeley Library

Berkeley Research Impact Initiative (BRII) bannerUC Berkeley

Authoring multi-stage code examples with editable code histories

Published Web Location

http://dl.acm.org/citation.cfm?id=2502053
No data is associated with this publication.
Abstract

Multi-stage code examples present multiple versions of a program where each stage increases the overall complexity of the code. In order to acquire strategies of program construction using a new language or API, programmers consult multi-stage code examples in books, tutorials and online videos. Authoring multi-stage code examples is currently a tedious process, as it involves keeping several stages of code synchronized in the face of edits and error corrections. We document these difficulties with a formative study examining how programmers author multi-stage code examples. We then present an IDE extension that helps authors create multi-stage code examples by propagating changes (insertions, deletions and modifications) to multiple saved versions of their code. Our system adapts revision control algorithms to the specific task of evolving example code. An informal evaluation finds that taking snapshots of a program as it is being developed and editing these snapshots in hindsight help users in creating multi-stage code examples.

Item not freely available? Link broken?
Report a problem accessing this item