users用户.csclpoly.pptVIP

  • 1
  • 0
  • 约6.53千字
  • 约 25页
  • 2017-03-09 发布于上海
  • 举报
users用户.csclpoly

Test-Driven Learning in Early Programming Courses David Janzen California Polytechnic State University San Luis Obispo, CA Hossein Saiedian University of Kansas Lawrence, KS I Have a Dream That all students will some day… learn to design and test as they learn to program “... we have as many testers as we have developers. And testers spend all their time testing, and developers spend half their time testing.” Bill Gates in Information Week, May 2002 How to Accomplish the Dream? Test-Driven Development TDD is a design (and testing) approach involving short, rapid iterations of TDD in Action Adoption Evolution Objects Questions We Want To Answer Can we teach automated unit testing in first year programming courses without sacrificing other first year topics? Is it better to teach test-first (TDD) or test-last programming to first year students? What do students think about TDD? How Do We Teach TDD? Test-Driven Learning involves teaching testing by example Experiment Design Proposed TDD/TDL integration into CS1 and CS2 courses at University of Kansas in 2006 as part of PhD research We don’t always get what we ask for Given permission to teach two labs and assign two projects Weeks 6 and 7 in a 16-week CS1 course Weeks 1 and 3 in a 16-week CS2 course Experiment Design Experiment Context CS1 and CS2 both used C++, vi/emacs, and g++ Goal: Keep Unit Testing Simple CS1 Results: Grades Effort Project grades were virtually the same Time spent on project was ~10% higher for test-first programmers CS1 Results: Unit Tests Test-first programmers wrote more tests on the first project, but fewer on second Remember that students switched approaches CS1 Results: Confidence No difference in confidence on first project On second project, test-first programmers were more confident of their solutions (P1 tests) CS1 Results: Student Opinions CS2 Results: Grades Project grades were higher for test-first No significant difference in previous experience or gpa CS2 Results: E

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档