The Community for Technology Leaders
2012 28th IEEE International Conference on Software Maintenance (ICSM) (2012)
Trento, Italy Italy
Sept. 23, 2012 to Sept. 28, 2012
ISSN: 1063-6773
ISBN: 978-1-4673-2313-0
pp: 25-34
Seyed Mehdi Nasehi , Department of Computer Science University of Calgary Calgary, AB, Canada
Jonathan Sillito , Department of Computer Science University of Calgary Calgary, AB, Canada
Frank Maurer , Department of Computer Science University of Calgary Calgary, AB, Canada
Chris Burns , Department of Computer Science University of Calgary Calgary, AB, Canada
ABSTRACT
Programmers learning how to use an API or a programming language often rely on code examples to support their learning activities. However, what makes for an effective ode example remains an open question. Finding the haracteristics of the effective examples is essential in improving the appropriateness of these learning aids. To help answer this question we have onducted a qualitative analysis of the questions and answers posted to a programming Q&A web site called StackOverflow. On StackOverflow answers can be voted on, indicating which answers were found helpful by users of the site. By analyzing these well-received answers we identified haracteristics of effective examples. We found that the explanations acompanying examples are as important as the examples themselves. Our findings have implications for the way the API documentation and example set should be developed and evolved as well as the design of the tools assisting the development of these materials.
INDEX TERMS
Programming, Conferences, Software maintenance, Documentation, Best practices, Web sites, Java, social learning, code example, documentation, API
CITATION

S. M. Nasehi, J. Sillito, F. Maurer and C. Burns, "What makes a good code example?: A study of programming Q&A in StackOverflow," 2012 28th IEEE International Conference on Software Maintenance (ICSM), Trento, Italy Italy, 2012, pp. 25-34.
doi:10.1109/ICSM.2012.6405249
81 ms
(Ver 3.3 (11022016))