Skip to main content
4 of 8
added 8 characters in body
Weijun Zhou
  • 4.9k
  • 12
  • 15

Is it always appropriate to comment saying that coding challenges are a poor learning strategy, and to suggest a different strategy?

Very often when I come across a question post that has any sort of connection to a coding challenge site such as leetcode, hackerrank, etc., such as being about a problem on that site, or even if the question is about how the site builds/runs code, I will see a comment or multiple comments saying that coding challenges are not a good way to learn, and sometimes also suggesting some other learning strategy.

For example, in How is Leetcode able to compile a C++ program without me writing a 'main()' function?, there are the comments

  • "in theory you would learn c++ from a book rather than jumping into codign competitions and get confused that they dont teach you the basics."
  • "I would seriously suggest forgetting that leetcode even exists."
  • "A good c++ book will be more useful than leetcode."

Frankly (and I'm mentally prepared for this to be an unpopular stance), I don't see how these comments are relevant enough to this particular question to be considered appropriate. I dare even to go as far as to think them as indiscriminate and unwarranted. As I hovered over the "No longer needed" flag reason, it struck me to ask what other people think about this.

On one hand, I get where the people who leave these comments are coming from: Good intentions, and wanting to share a bit of personal wisdom. I leave comments like this too sometimes.

On the other hand, when I leave comments like this, often it's to shine more clear light on a weakness of a particular technology that is already on display through the question, and directly related to the problem. For example on a question where the VS Code Code Runner extension fails to quote arguments properly for a specific shell, I will say something like "this is why I suggest people not to use Code Runner for one-off programs. It doesn't quote arguments properly for all common shells", and often follow with "<X dominantly popular language-support extension> already supports doing this (and I believe) with proper shell quoting, so you don't even need Code Runner".

But on questions where I see the type of comment I'm asking about here, I often feel like the comment section of the question post isn't an appropriate space to share that "personal wisdom". (I'm sorry for injecting my opinion into a question asking for peoples' thoughts, but I wouldn't be asking this question if I weren't conflicted like this).

What say/think ye? Is there a line? Is it fine and good to leave a "leetcode bad- go read textbooks" comment on every question that mentions leetcode? If there is a line, how is that line defined? Or if you have a personal line, how is your line defined?

starball
  • 48k
  • 5
  • 58
  • 141