The Competitive Mindset in CS Education
A look at the pros and cons of incentivizing a competitive mindset in Computer Science students.
Competitive programming is a form of coding that involves solving algorithmic problems in competition with other coders, usually within some time and resource constraints. The most common competition format (e.g., the ICPC, International Collegiate Programming Contests) involves teams of 3 programmers solving short coding problems in real time. This activity requires an in-depth understanding of data structures and algorithms and fast thinking and coding skills.
For this reason, competitive programming has become an increasingly popular element of Computer Science education. Many introductory courses in algorithms and data structures lend themselves easily to this format. It also simplifies evaluation, as problems are graded simply by a well-crafted set of input/output pairs.
As a CS college professor, having taught introductory programming courses and specialized courses on algorithms, I have observed many pros and cons when fostering a competitive mindset in my students. In this essay, I want to explore ways to enhance CS classes with a bit of competitive programming flavor while avoiding its main caveats. I'm focusing on competitive programming for the purpose of clarity, but I think the main takeaways of this post apply to many other forms of competition in education.
Benefits of the competitive mindset
Many students excel in competitive environments because the drive to win serves as motivation. This competitive environment can push students to reach their full potential and develop valuable skills.
In competitive programming, problems are rarely straightforward. Students must exercise creativity to decode the underlying problem. Even once the real problem is identified, applying a standard algorithm is often insufficient. Problems may require combining two or more classic algorithms unconventionally or implementing a non-trivial change to a data structure. To come out on top, one must master complex programming problems that require a deeper understanding of algorithms and data structures.
Additionally, participating in competitions encourages students to code quickly and anticipate errors because feedback is indirect —they only know if they solved the problem or not, but not which test cases failed. This cultivates creative and innovative thinking, valuable skills that extend beyond competition.
Participating in competitive programming entails collaborating with a team to solve a specific problem while coding on the same computer. Although this setup is only used during the competition, students must practice working in teams to develop a collaborative mindset. Over time, they establish strong bonds that often endure throughout their careers. Typically, teams consist of at least one member who excels in coding speed and another with solid math skills. This method of working in teams fosters trust and encourages students to divide tasks based on each individual’s strengths.
However, there are several drawbacks to overemphasizing a competitive mindset. In the following section we’ll examine these potential downsides. While I’ll be discussing the negative aspects in greater detail, it doesn’t necessarily mean that I believe they outweigh the benefits. However, it’s often easier to argue in favor of the positive aspects, whereas the negative aspects require more careful consideration.
Possible harms to be aware
One major disadvantage of competitive programming is the missed opportunities for many students who do not achieve significant success beyond their university studies. I have witnessed numerous students focusing solely on competition after competition, neglecting their other subjects but still not reaching the top. These are not poor-performing students, as they could have excelled in other subjects if they had redirected their efforts. However, the nature of the competition is such that only the winners are recognized, leaving the second-best teams with little recognition despite their hard work and dedication.
Note that extreme cases where one team consistently outshines all others are rare. Typically, the top two or three teams will alternate winning in different events, and multiple prizes are often available. However, when considering the 10 or 15 teams that never place in any competition, it becomes clear how much talent and hard work are sacrificed in a competitive environment. This is a downside of competition in general; for a few to win, you need a long tail of equally talented and hardworking participants who will lose.
An additional concern with focusing too much on competitive coding is that it can lead to the formation of bad habits. Competition problems are often artificial and come with pre-defined inputs and expected outputs. It’s also common for the expected performance to be provided, making it easier to determine if a linear, quadratic, or brute-force solution is needed. However, real-world problems are rarely so straightforward, and students who excel in competitive programming may struggle when faced with open-ended problems that lack a clear path forward.
To succeed in competitive coding, particularly during a competition, students must rely on their instincts as there is no time to unit-test or formally prove a solution’s efficacy. However, this approach can lead to poor software engineering practices in the long run. It may also promote rote learning of pre-made solutions instead of genuinely comprehending the fundamental principles of computer science.
I have noticed a particularly concerning issue among some students. They have become so accustomed to winning that they shy away from challenges where they cannot achieve maximum success. As they progress in their careers, projects become more realistic, and there is no limit to performance - there will always be room for improvement. Additionally, there is often a need to balance trade-offs, making it challenging to optimize performance metrics. These students don’t just struggle with these problems, but actively avoid them, choosing not to participate in research groups or tackle interesting open problems due to a fear of not being at the top.
Lastly, it is the emphasis on competition can have a negative impact not only on the students who directly participate in competitive coding activities. If we base an entire course around a competitive mindset, it can negatively affect those who do not excel under pressure. As any teacher knows, students come in all different flavors and have countless ways of demonstrating creativity, intelligence, and talent. Forcing them all through a competitive funnel can stifle their potential. I have witnessed this disproportionately affect marginalized students, but it is not limited to them. Any student who struggles with working under pressure will see their performance and motivation impacted in an environment overly focused on competition.
Now that we’ve thoroughly discussed the pros and cons, let’s briefly discuss additional strategies to implement in a competitive environment. These strategies will help students who find it challenging to perform under pressure by fostering a more encouraging and supportive atmosphere.
Alternatives to competition
A straightforward way to provide students with flexibility is by allowing them to revise assignments after completion. For instance, in my programming classes, students participate take coding exams that mimic the competitive coding environment to an extent: they are constrained in time and resources.
However, I always remind the students that if they don’t perform well during the exam, there’s still an opportunity for improvement once they get home. They can rework their solutions and submit a better version to their professor for evaluation. This somewhat reduces the stress on exam performance alone. Their TA will assess the initial attempt made during the exam and subsequent revisions and give a final evaluation that considers not only what the student managed to solve during the exam but the ideas they had afterward. This approach acknowledges that factors such as time constraints or nervousness may lead to mistakes and allows students to demonstrate their proper understanding of the material.
Another way to create flexible assignments is by providing open-ended projects for students to work on in teams. These projects involve a loosely defined problem, and the students must refine and define it correctly. This approach benefits those who may not excel when given strictly limited constraints. For example, posing an open-ended question like “How can we improve healthcare using machine learning?” allows students to explore various aspects of the problem through research, interviews, and critical thinking. As a result, they may develop more innovative solutions than initially anticipated.
And finally, I also encourage my students to demonstrate their learning in any way they can think of beyond the assigned tasks. Submitting well-formatted lecture notes, expanding on in-class examples, or solving additional problems from textbooks or online sources are all valuable ways to showcase their understanding. They are free to work on independent projects or delve deeper into the theory only briefly discussed in lectures. I assure them their efforts in exploring and sharing these areas with me will be appreciated and acknowledged in their final evaluation as a testament to their growth and progress in the subject matter.
The key takeaway is that flexibility is crucial when designing assignments. Recognize that each student has unique abilities and expectations; there isn’t a one-size-fits-all approach to learning. By being adaptable with your teaching methods, you can better cater to diverse needs and facilitate effective education for all students.
Competitive programming allows students to develop their coding abilities as they work together to solve complex problems. It also encourages students to think outside the box, as they must develop creative solutions to complex problems. Additionally, competitive programming can foster collaboration and a sense of camaraderie among students as they work together to reach a common goal.
On the other hand, competitive programming can also create an environment of unnecessary stress and competition. As a result, it can cause students to become discouraged or overwhelmed. Additionally, competitive programming can lead to students exclusively focusing on problem-solving instead of learning the underlying concepts of the discipline.
Ultimately, every student deserves a chance to explore competitive programming and discover if it interests them. It can be a great way to increase problem-solving and critical thinking skills and hone coding abilities. If students enjoy competitive programming, it can provide a great platform to develop and showcase their technical skills.
However, it is essential to strike a balance when incorporating competitive programming into the classroom. While providing an environment where the most competitive students can flourish is beneficial, it is also essential to remember those who do not thrive in competition. Instead of solely focusing on competitive programming, providing mechanisms better suited to different learning styles is just as important.
I have argued before about how beneficial it is to foster the mindset of being an effective team player. While competitive programming can be a valuable team skill, it should not be the only one. Encouraging collaboration among students and having them work together to learn will significantly benefit them in the long run. As educators, our role is to build a diverse classroom environment that caters to different learning styles so that students can benefit from each others’ strengths and create something better than they could on their own.
This post was written in collaboration with , a brilliant student I had the honor to teach and a hugely successful competitive coder during his college days. He now shares his hard-earned insights on algorithms at . Check it out!