A Controlled Experiment on Python vs C for an Introductory Programming Course

We performed a controlled experiment comparing a C and a Python Introductory Programming course. Three faculty members at University of Campinas, Brazil, taught the same CS1 course for the same majors in two different semesters, one version in Python and one in C, with a total of 391 students involved in the experiment. We measured the dropout rate, the failure rate, the grades on the two exams, the proportion of completed lab assignments, and the number of submissions per completed assignment. There was no difference in the dropout rate. The failure rate for Python was 16.9% against 23.1% for C. The effect size (Cohen’s D) on the comparison of Python against C on the midterm exam was 0.27, and 0.38 for the final exam. The effect size for the proportion of completed assignments was 0.39 and the effect size for the number of submissions per assignment was -0.61 (Python had less submissions per completed assignments). Thus, for all measures, with the exception of dropout rate, the version of the course in Python yielded better student outcomes than the version in C and all differences are significant (with 95% confidence) with the exception of the failure rate (p-value=0.12).

[1]  Richard J. Enbody,et al.  Performance of python CS1 students in mid-level non-python CS courses , 2010, SIGCSE.

[2]  Holly Patterson-McNeill Experience: from C++ to Python in 3 easy steps , 2006 .

[3]  Ken Kelley,et al.  On effect size. , 2012, Psychological methods.

[4]  C. Borland,et al.  Effect Size , 2019, SAGE Research Methods Foundations.

[5]  Michael H. Goldwasser,et al.  Teaching an object-oriented CS1 -: with Python , 2008, SIGCSE 2008.

[6]  Michael H. Goldwasser,et al.  Teaching an object-oriented CS1 -: with Python , 2008, ITiCSE.

[7]  Tapio Salakoski,et al.  What about a simple language? Analyzing the difficulties in learning to program , 2006, Comput. Sci. Educ..

[8]  Jacob Cohen Statistical Power Analysis for the Behavioral Sciences , 1969, The SAGE Encyclopedia of Research Design.

[9]  Kathi Fisler,et al.  Measuring the effectiveness of error messages designed for novice programmers , 2011, SIGCSE.

[10]  Beth Simon,et al.  Halving fail rates using peer instruction: a study of four computer science courses , 2013, SIGCSE '13.

[11]  Murat Uysal The Effects of Objects-First and Objects-Late Methods on Achievements of OOP Learners , 2012 .

[12]  Bertrand Meyer,et al.  Compiler error messages: what can help novices? , 2008, SIGCSE '08.

[13]  Aharon Yadin,et al.  Reducing the dropout rate in an introductory programming course , 2011, INROADS.

[14]  Andreas Stefik,et al.  An Empirical Investigation into Programming Language Syntax , 2013, TOCE.

[15]  Jussi Kasurinen,et al.  Lower dropout rates and better grades through revised course infrastructure , 2007 .

[16]  Sebastian Kleinschmager,et al.  Do static type systems improve the maintainability of software systems? An empirical study , 2012, 2012 20th IEEE International Conference on Program Comprehension (ICPC).

[17]  Gabriela Silva-Maceda,et al.  More Time or Better Tools? A Large-Scale Retrospective Comparison of Pedagogical Approaches to Teach Programming , 2016, IEEE Transactions on Education.

[18]  Christine Shannon Another breadth-first approach to CS I using python , 2003, SIGCSE.

[19]  John M. Hunt Python in CS1 - not , 2015 .

[20]  Lauri Malmi,et al.  Values and Objectives in Computing Education Research , 2009, TOCE.

[21]  D OldhamJoseph What happens after Python in CS1 , 2005 .

[22]  James H. Davenport,et al.  An Analysis of Introductory University Programming Courses in the UK , 2016, ArXiv.

[23]  Frederick W. B. Li,et al.  Failure rates in introductory programming revisited , 2014, ITiCSE '14.

[24]  Randy F. Pausch,et al.  Teaching objects-first in introductory computer science , 2003, SIGCSE.

[25]  Emilia Mendes,et al.  Empirical Studies of Pair Programming for CS/SE Teaching in Higher Education: A Systematic Literature Review , 2011, IEEE Transactions on Software Engineering.

[26]  Judy Kay,et al.  The Neglected Battle Fields of Syntax Errors , 2003, ACE.

[27]  Ewan D. Tempero,et al.  Understanding the syntax barrier for novices , 2011, ITiCSE '11.

[28]  Lauri Malmi,et al.  A survey of literature on the teaching of introductory programming , 2007, ACM SIGCSE Bull..

[29]  Robert M. Siegfried,et al.  A Longitudinal Analysis of the Reid List of First Programming Languages , 2016 .

[30]  Stefan Hanenberg,et al.  An empirical study of the influence of static type systems on the usability of undocumented software , 2012, OOPSLA '12.

[31]  Stefan Hanenberg,et al.  Can we enforce a benefit for dynamically typed languages in comparison to statically typed ones? A controlled experiment , 2016, 2016 IEEE 24th International Conference on Program Comprehension (ICPC).

[32]  H GoldwasserMichael,et al.  Teaching an object-oriented CS1 - , 2008 .

[33]  Irwin D. J. Bross,et al.  A Confidence Interval for a Percentage Increase , 1954 .

[34]  Robert D. Macredie,et al.  Teaching Introductory Programming: A Quantitative Evaluation of Different Approaches , 2015, TOCE.

[35]  Lauri Malmi,et al.  A survey of literature on the teaching of introductory programming , 2007, ITiCSE-WGR '07.

[36]  Susan Wiedenbeck,et al.  An empirical study of novice program comprehension in the imperative and object-oriented styles , 1997, ESP '97.

[37]  Michelle K. Smith,et al.  Active learning increases student performance in science, engineering, and mathematics , 2014, Proceedings of the National Academy of Sciences.

[38]  Carsten Schulte,et al.  Empirical comparison of objects-first and objects-later , 2009, ICER '09.

[39]  Ewan D. Tempero,et al.  All syntax errors are not equal , 2012, ITiCSE '12.

[40]  Sebastian Kleinschmager,et al.  An empirical study on the impact of static typing on software maintainability , 2013, Empirical Software Engineering.

[41]  Jr. E. Giangrande CS1 programming language options , 2007 .