Code Complexity in Introductory Programming Courses

Petri Ihantola, Andrew Petersen

Research output: Chapter in Book/Report/Conference proceedingConference contributionScientificpeer-review

Abstract

Instructors of introductory programming courses would benefit from having a metric for evaluating the sophistication of student code. Since introductory programming courses pack a wide spectrum of topics in a short timeframe, student code changes quickly, raising questions of whether existing software complexity metrics effectively reflect student growth as reflected in their code. We investigate code produced by over 800 students in two different Python-based CS1 courses to determine if frequently used code quality and complexity metrics (e.g., cyclomatic and Halstead complexities) or metrics based on length and syntactic complexity are more effective as a heuristic for gauging students' progress through a course. We conclude that the traditional metrics do not correlate well with time passed in the course. In contrast, metrics based on syntactic complexity and solution size correlate strongly with time in the course, suggesting that they may be more appropriate for evaluating how student code evolves in a course context.
Original languageEnglish
Title of host publicationProceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019
Number of pages9
Place of PublicationHonolulu
PublisherUniversity of Hawai'i at Manoa
Publication date2019
Pages7662-7670
ISBN (Electronic)978-0-9981331-2-6
Publication statusPublished - 2019
MoE publication typeA4 Article in conference proceedings
EventHawaii International Conference on System Sciences - Maui, United States
Duration: 8 Jan 201911 Jan 2019
Conference number: 52
http://hicss.hawaii.edu/

Fields of Science

  • 113 Computer and information sciences
  • complexity measures
  • computer science education
  • CS1
  • CURRICULUM
  • programming
  • methods and models
  • software engineering education and training
  • 516 Educational sciences

Cite this

Ihantola, P., & Petersen, A. (2019). Code Complexity in Introductory Programming Courses. In Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019 (pp. 7662-7670). Honolulu: University of Hawai'i at Manoa.
Ihantola, Petri ; Petersen, Andrew. / Code Complexity in Introductory Programming Courses. Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019. Honolulu : University of Hawai'i at Manoa, 2019. pp. 7662-7670
@inproceedings{068e9e8ded93434e8c7721b2e3e781b6,
title = "Code Complexity in Introductory Programming Courses",
abstract = "Instructors of introductory programming courses would benefit from having a metric for evaluating the sophistication of student code. Since introductory programming courses pack a wide spectrum of topics in a short timeframe, student code changes quickly, raising questions of whether existing software complexity metrics effectively reflect student growth as reflected in their code. We investigate code produced by over 800 students in two different Python-based CS1 courses to determine if frequently used code quality and complexity metrics (e.g., cyclomatic and Halstead complexities) or metrics based on length and syntactic complexity are more effective as a heuristic for gauging students' progress through a course. We conclude that the traditional metrics do not correlate well with time passed in the course. In contrast, metrics based on syntactic complexity and solution size correlate strongly with time in the course, suggesting that they may be more appropriate for evaluating how student code evolves in a course context.",
keywords = "113 Computer and information sciences, complexity measures, computer science education, CS1, CURRICULUM, programming, methods and models, software engineering education and training, 516 Educational sciences",
author = "Petri Ihantola and Andrew Petersen",
year = "2019",
language = "English",
pages = "7662--7670",
booktitle = "Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019",
publisher = "University of Hawai'i at Manoa",
address = "United States",

}

Ihantola, P & Petersen, A 2019, Code Complexity in Introductory Programming Courses. in Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019. University of Hawai'i at Manoa, Honolulu, pp. 7662-7670, United States, 08/01/2019.

Code Complexity in Introductory Programming Courses. / Ihantola, Petri; Petersen, Andrew.

Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019. Honolulu : University of Hawai'i at Manoa, 2019. p. 7662-7670.

Research output: Chapter in Book/Report/Conference proceedingConference contributionScientificpeer-review

TY - GEN

T1 - Code Complexity in Introductory Programming Courses

AU - Ihantola, Petri

AU - Petersen, Andrew

PY - 2019

Y1 - 2019

N2 - Instructors of introductory programming courses would benefit from having a metric for evaluating the sophistication of student code. Since introductory programming courses pack a wide spectrum of topics in a short timeframe, student code changes quickly, raising questions of whether existing software complexity metrics effectively reflect student growth as reflected in their code. We investigate code produced by over 800 students in two different Python-based CS1 courses to determine if frequently used code quality and complexity metrics (e.g., cyclomatic and Halstead complexities) or metrics based on length and syntactic complexity are more effective as a heuristic for gauging students' progress through a course. We conclude that the traditional metrics do not correlate well with time passed in the course. In contrast, metrics based on syntactic complexity and solution size correlate strongly with time in the course, suggesting that they may be more appropriate for evaluating how student code evolves in a course context.

AB - Instructors of introductory programming courses would benefit from having a metric for evaluating the sophistication of student code. Since introductory programming courses pack a wide spectrum of topics in a short timeframe, student code changes quickly, raising questions of whether existing software complexity metrics effectively reflect student growth as reflected in their code. We investigate code produced by over 800 students in two different Python-based CS1 courses to determine if frequently used code quality and complexity metrics (e.g., cyclomatic and Halstead complexities) or metrics based on length and syntactic complexity are more effective as a heuristic for gauging students' progress through a course. We conclude that the traditional metrics do not correlate well with time passed in the course. In contrast, metrics based on syntactic complexity and solution size correlate strongly with time in the course, suggesting that they may be more appropriate for evaluating how student code evolves in a course context.

KW - 113 Computer and information sciences

KW - complexity measures

KW - computer science education

KW - CS1

KW - CURRICULUM

KW - programming

KW - methods and models

KW - software engineering education and training

KW - 516 Educational sciences

M3 - Conference contribution

SP - 7662

EP - 7670

BT - Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019

PB - University of Hawai'i at Manoa

CY - Honolulu

ER -

Ihantola P, Petersen A. Code Complexity in Introductory Programming Courses. In Proceedings of the 52nd Hawaii International Conference on System Sciences, HICSS 2019. Honolulu: University of Hawai'i at Manoa. 2019. p. 7662-7670