Incorporating Competitive Programming into a Beginner Programming Course

Introduction

Driven by the increasing automation and digitalization of virtually every workflow, programming has become an indispensable part of our lives. As a result, introducing programming at the earliest stage of education has become a hot topic of discussion among educators and academics alike.

A particular area of interest is the concept of competitive programming (CP). Long viewed as a niche domain, a small group of enthusiasts often pursue CP to challenge their coding capabilities; many faculty have challenged the area as an unnecessary part of computer science. However, recent research underscores the potential of competitive programming as a useful pedagogical tool, especially in the context of introductory programming courses. This blog post will discuss the results of various studies that have been conducted on incorporating CP into a beginner’s programming course. I’ll review existing studies on integrating CP into intro-level programming courses, examining its effects on learning outcomes, student engagement, and skill acquisition. In addition, I will also propose some areas of CP that require further research.

Understanding Competitive Programming

Competitive programming is a mind sport, like chess and bridge, that involves participants competing to solve algorithmic problems as quickly and efficiently as possible. The ACM ICPC (Association for Computing Machinery – International Collegiate Programming Contest) is one of the world’s oldest, largest, and most prestigious programming contests, which started in the 1970s. Today, it has grown to involve tens of thousands of participants, attracting the world’s top Computer Science universities.

Several elements define each problem in the contest. First, there’s a problem statement describing the issue the team needs to solve. Next are the input and output specifications, which explain the type of data the team’s program should accept and produce. Thirdly, sample inputs and outputs are given to help the team understand the problem. Finally, constraints are provided to outline the maximum size or other limitations of the inputs and the required efficiency of the solution.

The contest is scored based on the number of problems solved and the time penalty. The number of problems solved is the most critical factor; the more problems a team solves, the higher their rank will be. Teams are primarily ranked by the number of problems they have solved. To break ties among teams who have solved the same number of problems, the ICPC uses a time penalty calculated from the beginning of the contest to the time of the first correct submission, with an additional penalty added for each incorrect submission. The team with the shortest total time is ranked highest.

The Impact of Competitive Programming on Beginners

Studies such as those conducted by Moreno et al. (2018) and Bandeira et al. (2019) employed this scoring system and contest setup to engage first-year students in programming classes. Both studies found that students introduced to competitive programming in their first year demonstrated a superior understanding of programming principles compared to those who did not. These students exhibited faster problem-solving abilities, improved code efficiency, and an increased capacity to work under pressure. Additionally, these students reported higher retention of material and reduced difficulty in grasping programming concepts.

However, not all studies concluded that CP led to improved performance. Coore and Fokum (2019), facing a lack of teaching assistants and quality feedback in first-year programming courses, employed a system of weekly competitive programming competitions to reinforce the week’s material. Their study found that while using competitive programming in assessments did increase student engagement and interest, it did not enhance the overall performance of the first-year students.

The Challenges

While CP introduces students to the rigours and excitement of coding under constraints, it’s important to recognize that CP cannot address every aspect of introductory programming. Also, certain facets of CP, such as its pace and competitive element, may only suit some learners.

Astrachan (2004) has pointed out that competitive programming only allows students to delve into key areas such as Object-Oriented Programming (OOP) design principles and enhancing code quality. CP emphasizes speed and efficiency, often overlooking the importance of well-structured, maintainable code, a crucial aspect in real-world development.

While competitive programming can inject a sense of competition into the classroom, it’s important to remember that it’s not a one-size-fits-all solution. The competitive aspect of CP may be intimidating for some students, leading to heightened anxiety and stress. This could, in turn, hinder learning and deter participation. Moreover, the pace of competitive programming, which requires swift comprehension of problem statements and speedy code implementation, may only cater to some learning styles. Some students may require more time to thoroughly grasp concepts and develop robust solutions, which could make the fast-paced environment of CP feel overwhelming.

Given these characteristics of CP, it’s clear that it should not be used as the sole determinant in course assessments. Relying too heavily on CP for grading could inadvertently favour students who possess abilities unrelated to computer science, such as high reading speed and fast typing. These intangibles can be advantageous in a competitive programming environment but have little relevance to a student’s understanding of computer science principles or their potential as a programmer.

Future of Competitive Programming in Classrooms

Although much research has been done involving introducing competitive programming into the classroom, little work explores the impact of cultural relevance in problem-setting, the role of artificial intelligence (AI) in integrating CP, and how CP interacts with various cultural and social intersections in the academic sphere.

The classroom is often characterized by a variety of cultural and social intersections. Incorporating CP in such a setting prompts us to consider how it might affect the likeability, acceptability, and academic performance across these intersections. Is CP equally appealing and accessible to students of different cultures, genders, or social backgrounds? How might the competitive nature of CP impact the dynamics of these intersections? Delving into these questions would allow us to devise strategies to ensure a more equitable and inclusive learning environment.

A unique feature of competitive programming is its creative liberty in problem-setting. This opens the possibility of integrating culturally relevant problems. Introducing programming problems referencing students’ home countries or cultures could make the learning experience more relatable and be a powerful tool to increase engagement among international students. However, the impact of such an approach is yet to be fully understood. How might culturally sensitive problems influence students’ interest and engagement? Could they enhance learning outcomes, or could they unintentionally alienate students who do not share the same cultural background?

Artificial Intelligence offers exciting possibilities in CP. For instance, large language models such as ChatGPT can assist in problem setting, which is typically a significant demand on an instructor’s time. AI-based tools could also serve as programming partners for first-year students, providing personalized assistance such as debugging help or hints for specific problems during a contest. This could supplement the responses from auto-grading judges, which is currently limited to categorized feedback that can sometimes be vague. This approach increases access to individualized learning support and mitigates common challenges associated with competitive programming, such as anxiety and intimidation. However, areas that require further exploration include the effectiveness of such tools and the best strategies for integrating them into the learning experience.

References

Moreno, J., & Pineda, A. F. (2018). Competitive programming and gamification as strategy to engage students in computer science courses. Revista ESPACIOS39(35).

Bandeira, I. N., Machado, T. V., Dullens, V. F., & Canedo, E. D. (2019, October 1). Competitive programming: A teaching methodology analysis applied to first-year programming classes. IEEE Xplore. https://doi.org/10.1109/FIE43999.2019.9028518

Astrachan, O. (2004). Non-competitive programming contest problems as the basis for just-in-time teaching. https://doi.org/10.1109/fie.2004.1408553

Coore, D., & Fokum, D. (2019). Facilitating Course Assessment with a Competitive Programming Platform. Proceedings of the 50th ACM Technical Symposium on Computer Science Education. https://doi.org/10.1145/3287324.3287511

2 Replies to “Incorporating Competitive Programming into a Beginner Programming Course”

  1. CP seems to be an excellent tool for improving problem-solving abilities, code efficiency, and the capacity to work under pressure with higher retention of material and programming concepts for beginners. Do you know of universities that have already built CP into their curriculum? If not, what could be the reasons? Thank you for the great blog post!

    1. Hi Jane,

      Thank you for the comment. Since course portfolios (CPs) are a tool for instruction, it is difficult to assess specific courses that have used them. This is because CPs are rarely mentioned in course outlines. Given the limited attention faculty pay to CPs, I suspect many instructors do not use them. This may be due to the difficulty of setting up CPs and their lack of associated assessment capabilities.

Leave a Reply

Your email address will not be published. Required fields are marked *