Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Comments on How to best ask about algorithmic problems

Parent

How to best ask about algorithmic problems

+5
−0

The question How to efficiently remove every occurrence of one string inside another and discussions in the comments there got me thinking about the best way to ask about algorithmic problems. In particular, which pitfalls should be avoided to not make the question off-topic?

Some issues I see:

  • What requirements should be stated? Is it okay to just ask for any algorithm that solves the problem in any way or should typical input data properties be specified and if speed or memory or other optimization criteria exist.
  • Should an implementation language or set of languages be specified? Or is pseudo-code also okay? If no implementation language or set of languages is specified, there could potentially be a lot of answers in many different languages and voting on them might not make much sense.
  • Do we care about duplicating external content (like Rosetta code for example)? The most often needed algorithms are likely already described or implemented somewhere else.
  • Is the full implementation of algorithms feasible within the Q&A format? The description might just become too long (better suited for other content types like longer articles maybe). Where to draw the line between an algorithm that still can be described and one that cannot anymore?

How would a high quality on-topic question about an algorithmic problem look like?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

Post
+2
−0

This question was of very poor quality and should have been closed. I closed it but someone disagreed, for reasons unknown. I'm not sure if it's an actual algorithm question or just a request for free code. C strings are very specific to that programming language and I'm not sure if it's even meaningful to discuss handling of them in abstract terms.


What requirements should be stated?

What language, compiler, system etc are you using (when this is relevant).

In case a question is about performance then the question might need to define if they are interested in actual run-time execution speed, or theoretical execution speed/number of comparisons ("Big O" etc), or memory consumption etc etc.

Should an implementation language or set of languages be specified?

Only if the question is about implementing an algorithm in a certain language. It is not OK to ask to have free code written by unpaid volunteers - it's (arguably) very rude and a violation of our "be nice" Code of Conduct, so the user might get suspended for posting such.

A question about how to implement something in a specific language is by definition not a broad algorithm theory question.

Do we care about duplicating external content

If some solution already exists we should point them that way; re-inventing the wheel is rarely ever a good idea. But answers that are nothing more than a mere link to an external resource should be avoided. Such can and should be posted as comments instead. Answers should add something of value to this site.

Is the full implementation of algorithms feasible within the Q&A format?

Yes, given that the poster has made an effort themselves and are asking about particular problems they are facing. Code review of complete working code is also on-topic here, use the code review category.

How would a high quality on-topic question about an algorithmic problem look like?

Detailed, with some research effort. Writing such questions is hard!

Here's one attempt I made at some point: https://cs.stackexchange.com/questions/68214/finding-the-spots-furthest-away-from-bad-data. Not sure if it's a great question but at least someone understood it well enough to give a great answer, after which I realized how to best design the algorithm.

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.

1 comment thread

Not asking for free code? What are we asking then for? (3 comments)
Not asking for free code? What are we asking then for?
Trilarion‭ wrote almost 3 years ago

"It is not OK to ask to have free code written by unpaid volunteers..." I know what you mean and I agree that askers should also invest time, at least in asking a clear, focused question and searching for solutions, but apart from this I think that indeed at the core software Q&A does write free code. In the end, we want to help others, right? I'm not completely sure, what you mean in the end? You help lots of other people and give them free code in the course of that. Do you mean that there should be a minimal understanding of a topic necessary or that people should demonstrate a minimal effort somehow?

Lundin‭ wrote almost 3 years ago

Trilarion‭ Essentially; if there is no rule against it people will post endless floods of copy/paste homework dumps with no effort made. This is already a massive problem at SO and they have rules against it - they even suspend people who keep posting such crap for 6 months. We should only help people who are genuinely interested in the topic and actually wish to learn it. The best way to demonstrate this is to put some effort into the question and actually trying to solve the problem before asking about it.

Trilarion‭ wrote almost 3 years ago · edited almost 3 years ago

I fully agree with you. There should be absolutely no interest in repeating that experience. I have seen it too on SO for many years. But I would also like to discuss this more, maybe in another topic. I think about: is genuine interest sufficient to stop endless floods of low quality questions and how to define it so that it can be checked objectively. My guess is that we will have to educate people how to ask a good question, some kind of question asking boot camp maybe, because not educating them means that they will not give up posting these dumps. Even closing squads aren't good enough. There is basically no alternative. The question would then be how to best incorporate this into a workflow.