Answers.Body: <p>Some will love it, a few will excel, most will hate it.</p>
  
  <p>Around here we have elective courses preparing for programming contests. They cover more advanced algorithms, more in-depth C++ (or Java, or what have you) and do <em>lots</em> of "hands on" training (e.g. solving problems to be submitted to online judges).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-01T20:28:54.560Z
Answers.LastActivityDate: 2018-08-01T20:28:54.560Z
Answers.UserDisplayName: vonbrand
Answers.Body: <p>Time pressure is a given in industry.  Schedules are driven by a number of factors - company cashflow, legal requirements, changing business environment - which have non-negotiable time constraints. Even professionally, programmers have to make a snap decision about speed versus robustness, and there are often times that speed is critical and you can come back for robustness.</p>
  
  <p>Any student that wrote their own heapsort in the middle of a time constrained project should lose marks unless it can be demonstrated that it required less time to build and gave a better result than the facility built into the language. Unless you have Dijkstra Version 2.0 in your class, I would not expect this to be an issue (but leave the door open for appeal just in case).</p>
  
  <p>Good code is time saving code. Using Java as an example (given my handle, you can guess why, but equivalent practices work in almost any programming language), you can design in javadoc and interfaces, then implement the interfaces. This allows you to follow a complete waterfall methodology (ugh!) with documentation, yet still code at turbo speed and produce robust code. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-16T03:09:57.120Z
Answers.LastActivityDate: 2018-07-16T03:09:57.120Z
Answers.UserDisplayName: pojo-guy
Answers.Body: <p>While I think that all of your observations are correct, there are other considerations. I'm not a big believer in these contests, nor in the kinds of problems that students are asked to solve in them. </p>
  
  <p>However, the issue of student enthusiasm for programming (as a part of CS) is also very important. IF you have a bunch of students who need external motivation such contests can, perhaps be helpful. </p>
  
  <p>On the other hand, the "take no prisoners" ultra competitive attitude that is exhibited by many young males is a negative consideration. A more cooperative environment would be better preparation for future endeavors in CS, I think. Some competitions, I note, are for teams, not individuals. And competition against your own self is likely a good thing whereas competition against the "other" has a down side. </p>
  
  <p>Finally, I worry a bit about preparation for these contests. If your class attends to the issues 1-3 (and others) that you list, you are likely doing a good job. However, if the entire course is spent in working on small, tricky problems (Solving NIM, I call it), then the students aren't really learning what it is to be a "player" in CS. Only a very small fraction of the time spent by a professional or an academic in CS is spent on such "cute" problems. Sometimes that way of thinking can be very helpful, but not very often. Structure, correctness, usability, extendability, etc. are all more important in general. </p>
  
  <p>I note that the OOPSLA conference (later SPLASH) of ACM used to have a Design Fest in which teams of folks (adults) would create an OO design of a fairly large system. This sort of thing can be competitive or not, but doesn't involve coding. Later they added Code Fest in which other teams would implement some design from a Design Fest. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-10T10:05:42.633Z
Answers.LastActivityDate: 2018-07-10T10:05:42.633Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>Programming contests are useful for some students in some contexts, but they're harmful to other students in other contexts.</p>
  
  <p>Contests are useful for students who already self-identify as programmers, are motivated by competition, and enjoy the high-stress environment of a competition. But like you said, the skills acquired by participating in programming contests aren't always useful outside of that environment. I'll also note that your examples are all very math-oriented, so the contests might be geared towards students with a more mathematical background.</p>
  
  <p>But they're less useful for students who are not motivated by competition. Notably, students from under-represented groups or who don't self-identify as programmers are <a href="https://www.huffingtonpost.com/entry/a-grand-challenge-reimagining-competitions-for-the_us_58701d23e4b0a5e600a78aca" rel="noreferrer">less likely to participate in these</a>, and requiring them to participate can actually discourage them from pursuing computer science.</p>
  
  <p>So, while programming competitions might be one small part of a course, I'd recommend balancing it with other activities that might help other types of students, and pointing out the problems with "competition code" that you mentioned in your question.</p>
  
  <p>I'd also recommend focusing on "<a href="https://en.wikipedia.org/wiki/Hackathon" rel="noreferrer">hackathons</a>" or "<a href="https://en.wikipedia.org/wiki/Game_jam" rel="noreferrer">game jams</a>" more than competitions. These have the fun and motivation of a competition, but it's more of a collaborative / cooperative environment. This can be beneficial to students regardless of whether they already self-identify as programmers.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-10T17:09:31.983Z
Answers.LastActivityDate: 2018-07-10T17:36:27.337Z
Answers.LastEditDate: 2018-07-10T17:36:27.337Z
Answers.UserDisplayName: Kevin Workman
Body: <p>Background: I’m not entirely a CS educator, but I did run into a debate on whether programming contests are good for students.</p>
  
  <p>A lot of people around me have fun in programming contests. Usually, those contests require participants to “solve” several problems (like 7 to 8) within certain time (2 to 3 hours). Students are ranked by their scores, calculated from the number of problems they are capable of solving, and then the time spent. There are test cases on the submission system to which students have to submit their source files, and the submission “passes” when it compiles to a program which passes all the test cases.</p>
  
  <p>Given all these, while students are (probably?) good at problem solving skills, there are several problems:</p>
  
  <ol>
  <li><p>Students focus too much on the time spent on writing their programs. Therefore, they employ a lot of poor practices. For example, they always use short variable names, universal headers (#include ), using namespace std; etc in order to speed up their typing. They claim that iostream is implemented on top of C’s stdio and so they use printf even in C++.</p></li>
  <li><p>They always put extra assumptions. For example, while they know how to find the “unpaired” integer in an integer array (by taking the XOR sum), they won’t think of how to check whether the array has only one unpaired item. Also, they usually allocate large arrays in advance and skip bounds checking (they believe the array is large enough), which create concerns in both program stability and security.</p></li>
  <li><p>They don’t understand how to maintain a large project. Since OOP (usually) requires them to type more, they, for example, manipulate raw arrays with a part of custom heapsort algorithm, instead of creating a struct representing a heap, when they are writing in C. While sometimes OOP is unnecessary, for them code reuse is either impossible or requiring a lot of copy-and-paste.</p></li>
  </ol>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-07-16T02:52:45.143Z
Comments.Text: Why would you ever write a heapsort algorithm in a coding competition?  The correct answer o that problem is always "use what the programming language provides - it's been thoroughly vetted and will be closer to error free than you could possibly do in the time allowed, and you can focus on the real problem instead of rewriting something Dijkstra solved decades ago."
Comments.UserDisplayName: pojo-guy
Tags: <best-practice><project>
Title: Are programming contests beneficial to students?
ThreadText: # Are programming contests beneficial to students?
  
  (Asked by: username_0 on 2018-07-10)
  
  Background: I’m not entirely a CS educator, but I did run into a debate on whether programming contests are good for students.
  
  A lot of people around me have fun in programming contests. Usually, those contests require participants to “solve” several problems (like 7 to 8) within certain time (2 to 3 hours). Students are ranked by their scores, calculated from the number of problems they are capable of solving, and then the time spent. There are test cases on the submission system to which students have to submit their source files, and the submission “passes” when it compiles to a program which passes all the test cases.
  
  Given all these, while students are (probably?) good at problem solving skills, there are several problems:
  
  1. Students focus too much on the time spent on writing their programs. Therefore, they employ a lot of poor practices. For example, they always use short variable names, universal headers (#include ), using namespace std; etc in order to speed up their typing. They claim that iostream is implemented on top of C’s stdio and so they use printf even in C++.
  2. They always put extra assumptions. For example, while they know how to find the “unpaired” integer in an integer array (by taking the XOR sum), they won’t think of how to check whether the array has only one unpaired item. Also, they usually allocate large arrays in advance and skip bounds checking (they believe the array is large enough), which create concerns in both program stability and security.
  3. They don’t understand how to maintain a large project. Since OOP (usually) requires them to type more, they, for example, manipulate raw arrays with a part of custom heapsort algorithm, instead of creating a struct representing a heap, when they are writing in C. While sometimes OOP is unnecessary, for them code reuse is either impossible or requiring a lot of copy-and-paste.
  
  **Tags:** best-practice, project
  
  > **Comments:**
  > **username_1**: Why would you ever write a heapsort algorithm in a coding competition?  The correct answer o that problem is always "use what the programming language provides - it's been thoroughly vetted and will be closer to error free than you could possibly do in the time allowed, and you can focus on the real problem instead of rewriting something Dijkstra solved decades ago."  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_3 on 2018-07-10. Score: 6 | Accepted answer
  
  While I think that all of your observations are correct, there are other considerations. I'm not a big believer in these contests, nor in the kinds of problems that students are asked to solve in them.
  
  However, the issue of student enthusiasm for programming (as a part of CS) is also very important. IF you have a bunch of students who need external motivation such contests can, perhaps be helpful.
  
  On the other hand, the "take no prisoners" ultra competitive attitude that is exhibited by many young males is a negative consideration. A more cooperative environment would be better preparation for future endeavors in CS, I think. Some competitions, I note, are for teams, not individuals. And competition against your own self is likely a good thing whereas competition against the "other" has a down side.
  
  Finally, I worry a bit about preparation for these contests. If your class attends to the issues 1-3 (and others) that you list, you are likely doing a good job. However, if the entire course is spent in working on small, tricky problems (Solving NIM, I call it), then the students aren't really learning what it is to be a "player" in CS. Only a very small fraction of the time spent by a professional or an academic in CS is spent on such "cute" problems. Sometimes that way of thinking can be very helpful, but not very often. Structure, correctness, usability, extendability, etc. are all more important in general.
  
  I note that the OOPSLA conference (later SPLASH) of ACM used to have a Design Fest in which teams of folks (adults) would create an OO design of a fairly large system. This sort of thing can be competitive or not, but doesn't involve coding. Later they added Code Fest in which other teams would implement some design from a Design Fest.
  
  
  ---
  
  ### Answer by username_4 on 2018-07-10. Score: 8
  
  Programming contests are useful for some students in some contexts, but they're harmful to other students in other contexts.
  
  Contests are useful for students who already self-identify as programmers, are motivated by competition, and enjoy the high-stress environment of a competition. But like you said, the skills acquired by participating in programming contests aren't always useful outside of that environment. I'll also note that your examples are all very math-oriented, so the contests might be geared towards students with a more mathematical background.
  
  But they're less useful for students who are not motivated by competition. Notably, students from under-represented groups or who don't self-identify as programmers are [less likely to participate in these](https://www.huffingtonpost.com/entry/a-grand-challenge-reimagining-competitions-for-the_us_58701d23e4b0a5e600a78aca), and requiring them to participate can actually discourage them from pursuing computer science.
  
  So, while programming competitions might be one small part of a course, I'd recommend balancing it with other activities that might help other types of students, and pointing out the problems with "competition code" that you mentioned in your question.
  
  I'd also recommend focusing on "[hackathons](https://en.wikipedia.org/wiki/Hackathon)" or "[game jams](https://en.wikipedia.org/wiki/Game_jam)" more than competitions. These have the fun and motivation of a competition, but it's more of a collaborative / cooperative environment. This can be beneficial to students regardless of whether they already self-identify as programmers.
  
  
  ---
  
  ### Answer by username_2 on 2018-08-01. Score: 1
  
  Some will love it, a few will excel, most will hate it.
  
  Around here we have elective courses preparing for programming contests. They cover more advanced algorithms, more in-depth C++ (or Java, or what have you) and do *lots* of "hands on" training (e.g. solving problems to be submitted to online judges).
  
  
  ---
  
  ### Answer by username_1 on 2018-07-16. Score: 1
  
  Time pressure is a given in industry. Schedules are driven by a number of factors - company cashflow, legal requirements, changing business environment - which have non-negotiable time constraints. Even professionally, programmers have to make a snap decision about speed versus robustness, and there are often times that speed is critical and you can come back for robustness.
  
  Any student that wrote their own heapsort in the middle of a time constrained project should lose marks unless it can be demonstrated that it required less time to build and gave a better result than the facility built into the language. Unless you have Dijkstra Version 2.0 in your class, I would not expect this to be an issue (but leave the door open for appeal just in case).
  
  Good code is time saving code. Using Java as an example (given my handle, you can guess why, but equivalent practices work in almost any programming language), you can design in javadoc and interfaces, then implement the interfaces. This allows you to follow a complete waterfall methodology (ugh!) with documentation, yet still code at turbo speed and produce robust code.
  
  
  ---
  
  