Skip to main content
clarify
Source Link
ggorlen
  • 56.2k
  • 2
  • 20
  • 22

Online exercises are arguably a pretty decent way to learn programming fundamentals (basic language features, syntax, develop problem-solving skills in a controlled environment, etc), but it's tightly coupled with competitive programming, which is a separate domain from real-world programming with its own standards. Code quality and maintainability have little value. using namespace std; and #include <bits/stdc++.h> are perfectly acceptable in CP, and are standard idioms as much as doing the opposite is in production is. That's OK. It may be aggravating that students are blissfully unaware of the issues with these practices, or with competitive coding/online judges in general, but I think the pedantry needs to be doled out judiciously. It's a matter of balancing the SO orientation towards professional, practical pedantry with the online judge domain.

  • Commenting on potentially production-headed code to avoid using namespace std;.
  • Commenting that Leetcode benchmarks are unreliable, if timing is part of the question.
  • Commenting that C++ code shouldn't be written with C idioms like malloc and free, regardless of the domain (a lot of beginner C++ code is basically "C with vectors" or "C with cout").
  • Commenting to request improvements to egregious formatting and variable name issues. If code is posted on SO, even if it's for CP, it should be well-formatted and readable.
  • Commenting on obvious online judge/competitive programming challenges to avoid using namespace std;. Just let 'em--it's standard in CP and basically zero risk within that domain. The focus is on solving the problem, not clean namespacing and imports. Feel free to mention in an answer as an addendum, though.
  • Commenting on a Leetcode Python question that the class method should be snake_case, per PEP-8, or that there's no need for a class (Leetcode provides classes and methods that can't be changed, and generally don't adhere to Python standards).
  • Commenting that Leetcode benchmarks are unreliable, if timing isn't part of the question.
  • Comments suggesting not doing programming challenges (or Leetcode) entirely.
  • Commenting to nitpick when you're not really sure of the domain standard idioms and you just want to grind an axe.

Online exercises are arguably a pretty decent way to learn programming, but it's tightly coupled with competitive programming, which is a separate domain from real-world programming with its own standards. Code quality and maintainability have little value. using namespace std; and #include <bits/stdc++.h> are perfectly acceptable in CP, and are standard idioms as much as doing the opposite is in production is. That's OK. It may be aggravating that students are blissfully unaware of the issues with these practices, or with competitive coding/online judges in general, but I think the pedantry needs to be doled out judiciously. It's a matter of balancing the SO orientation towards professional, practical pedantry with the online judge domain.

  • Commenting on potentially production-headed code to avoid using namespace std;.
  • Commenting that Leetcode benchmarks are unreliable, if timing is part of the question.
  • Commenting that C++ code shouldn't be written with C idioms like malloc and free, regardless of the domain (a lot of beginner C++ code is basically "C with vectors" or "C with cout").
  • Commenting on obvious online judge/competitive programming challenges to avoid using namespace std;. Just let 'em--it's standard in CP and basically zero risk within that domain. Feel free to mention in an answer as an addendum, though.
  • Commenting on a Leetcode Python question that the class method should be snake_case, per PEP-8, or that there's no need for a class (Leetcode provides classes and methods that can't be changed, and generally don't adhere to Python standards).
  • Commenting that Leetcode benchmarks are unreliable, if timing isn't part of the question.
  • Comments suggesting not doing programming challenges (or Leetcode) entirely.
  • Commenting to nitpick when you're not really sure of the domain standard idioms and you just want to grind an axe.

Online exercises are arguably a pretty decent way to learn programming fundamentals (basic language features, syntax, develop problem-solving skills in a controlled environment, etc), but it's tightly coupled with competitive programming, which is a separate domain from real-world programming with its own standards. Code quality and maintainability have little value. using namespace std; and #include <bits/stdc++.h> are perfectly acceptable in CP, and are standard idioms as much as doing the opposite is in production is. That's OK. It may be aggravating that students are blissfully unaware of the issues with these practices, or with competitive coding/online judges in general, but I think the pedantry needs to be doled out judiciously. It's a matter of balancing the SO orientation towards professional, practical pedantry with the online judge domain.

  • Commenting on potentially production-headed code to avoid using namespace std;.
  • Commenting that Leetcode benchmarks are unreliable, if timing is part of the question.
  • Commenting that C++ code shouldn't be written with C idioms like malloc and free, regardless of the domain (a lot of beginner C++ code is basically "C with vectors" or "C with cout").
  • Commenting to request improvements to egregious formatting and variable name issues. If code is posted on SO, even if it's for CP, it should be well-formatted and readable.
  • Commenting on obvious online judge/competitive programming challenges to avoid using namespace std;. Just let 'em--it's standard in CP and basically zero risk within that domain. The focus is on solving the problem, not clean namespacing and imports. Feel free to mention in an answer as an addendum, though.
  • Commenting on a Leetcode Python question that the class method should be snake_case, per PEP-8, or that there's no need for a class (Leetcode provides classes and methods that can't be changed, and generally don't adhere to Python standards).
  • Commenting that Leetcode benchmarks are unreliable, if timing isn't part of the question.
  • Comments suggesting not doing programming challenges (or Leetcode) entirely.
  • Commenting to nitpick when you're not really sure of the domain standard idioms and you just want to grind an axe.
deleted 81 characters in body
Source Link
ggorlen
  • 56.2k
  • 2
  • 20
  • 22
  1. Online judge problems tend to be theoretical or contrived, and are not terribly applicable to professional programming jobs (munging together APIs, working with frameworks, making apps). Some users think SO is primarily (or exclusively) a Q&A for practical, real-world problems like these. Coding challenge-oriented questions draw ire on grounds of practicality/realism.
  2. Professionals tend to be resentful that they are (still!) often required to complete algorithm challenges as part of a hiring process even though they're not terribly applicable to their day-to-day jobs.
  3. The people who do algorithm challenges typically write poor-quality code from a production standpoint. They may not care, because the only yardstick for coding challenges is whether the solution passes the judge, and whether it can be written quickly (hence the ubiquitous comments on these questions about not using namespace std; and #include <bits/stdc++.h>, or whatever the language's equivalent CP shorthands are if it's not C++, although C++ is the de facto standard CP language).
  4. The people who typically do algorithm challenges are students and/or beginner programmers, which means they're green on multiple levels: in terms of their code quality, the educational path they're on, as well as how to ask good quality questions on Stack Overflow (or anywhere else).
  5. Professional programmers tend to resent the classical CS education curriculum based on theory and algorithm problems over real-world software development skills (they have to hire and work with graduates produced by this CS system, so there's an iron in the fire). Many schools give online judge problems as exercises.
  1. Online judge problems tend to be theoretical or contrived, and are not terribly applicable to professional programming jobs (munging together APIs, working with frameworks, making apps). Some users think SO is primarily (or exclusively) a Q&A for practical, real-world problems like these. Coding challenge-oriented questions draw ire on grounds of practicality/realism.
  2. Professionals tend to be resentful that they are (still!) often required to complete algorithm challenges as part of a hiring process even though they're not terribly applicable to their day-to-day jobs.
  3. The people who do algorithm challenges typically write poor-quality code from a production standpoint. They may not care, because the only yardstick for coding challenges is whether the solution passes the judge, and whether it can be written quickly (hence the ubiquitous comments on these questions about not using namespace std; and #include <bits/stdc++.h>, or whatever the language's equivalent CP shorthands are if it's not C++, although C++ is the de facto standard CP language).
  4. The people who typically do algorithm challenges are students and/or beginner programmers, which means they're green on multiple levels: in terms of their code quality, the educational path they're on, as well as how to ask good quality questions on Stack Overflow (or anywhere else).
  5. Professional programmers tend to resent the classical CS education curriculum based on theory and algorithm problems over real-world software development skills (they have to hire and work with graduates produced by this CS system, so there's an iron in the fire). Many schools give online judge problems as exercises.
  1. Online judge problems tend to be theoretical or contrived, and are not terribly applicable to professional programming jobs (munging together APIs, working with frameworks, making apps). Some users think SO is primarily (or exclusively) a Q&A for practical, real-world problems like these.
  2. Professionals tend to be resentful that they are (still!) often required to complete algorithm challenges as part of a hiring process even though they're not terribly applicable to their day-to-day jobs.
  3. The people who do algorithm challenges typically write poor-quality code from a production standpoint. They may not care, because the only yardstick for coding challenges is whether the solution passes the judge, and whether it can be written quickly (hence the ubiquitous comments on these questions about not using namespace std; and #include <bits/stdc++.h>, or whatever the language's equivalent CP shorthands are if it's not C++, although C++ is the de facto standard CP language).
  4. The people who typically do algorithm challenges are students and/or beginner programmers, which means they're green on multiple levels: in terms of their code quality, the educational path they're on, as well as how to ask good quality questions on Stack Overflow (or anywhere else).
  5. Professional programmers tend to resent the classical CS education curriculum based on theory and algorithm problems over real-world software development skills (they have to hire and work with graduates produced by this CS system, so there's an iron in the fire). Many schools give online judge problems as exercises.
added 81 characters in body
Source Link
ggorlen
  • 56.2k
  • 2
  • 20
  • 22
  • Commenting on obvious algorithmonline judge/competitive programming challenges to avoid using namespace std;. Just let 'em--it's standard in CP and basically zero risk within that domain. Feel free to mention in an answer as an addendum, though.
  • Commenting on a Leetcode Python question that the class method should be snake_case, per PEP-8, or that there's no need for a class (Leetcode provides classes and methods that can't be changed, and generally don't adhere to Python standards).
  • Commenting that Leetcode benchmarks are unreliable, if timing isn't part of the question.
  • Comments suggesting not doing programming challenges (or Leetcode) entirely.
  • Commenting to nitpick when you're not really sure of the domain standard idioms and you just want to grind an axe.
  • Commenting on obvious algorithm/competitive programming challenges to avoid using namespace std;.
  • Commenting on a Leetcode Python question that the class method should be snake_case, per PEP-8, or that there's no need for a class (Leetcode provides classes and methods that can't be changed, and generally don't adhere to Python standards).
  • Commenting that Leetcode benchmarks are unreliable, if timing isn't part of the question.
  • Comments suggesting not doing programming challenges (or Leetcode) entirely.
  • Commenting to nitpick when you're not really sure of the domain standard idioms and you just want to grind an axe.
  • Commenting on obvious online judge/competitive programming challenges to avoid using namespace std;. Just let 'em--it's standard in CP and basically zero risk within that domain. Feel free to mention in an answer as an addendum, though.
  • Commenting on a Leetcode Python question that the class method should be snake_case, per PEP-8, or that there's no need for a class (Leetcode provides classes and methods that can't be changed, and generally don't adhere to Python standards).
  • Commenting that Leetcode benchmarks are unreliable, if timing isn't part of the question.
  • Comments suggesting not doing programming challenges (or Leetcode) entirely.
  • Commenting to nitpick when you're not really sure of the domain standard idioms and you just want to grind an axe.
added 91 characters in body
Source Link
ggorlen
  • 56.2k
  • 2
  • 20
  • 22
Loading
Source Link
ggorlen
  • 56.2k
  • 2
  • 20
  • 22
Loading