We've had Stack Snippets for a few months now, and a few nice snippets have been written, which will probably come in handy time and time again. It's been brought up a few times in chat, that it might be nice to collect these on meta, so we don't have to reinvent the wheel for each new challenge.
The first question is: does anyone object to that? If so, why?
However, even if we do want to collect these there are several ways we could structure this, and it would be nice if we decided this upfront, so that it's consistent.
- Post a single meta question, The Snippet Toolbox, where each answer contains a single snippet. Feature requests and bug reports go in the comments.
- Post one meta question per snippet task, e.g. "Do we have an existing Stack Snippet which generates leaderboards for code golf challenges?" Each answer would contain one snippet implementing the task (so we might have multiple snippets for the same purpose). Feature requests and bug reports go in the comments.
- Post one meta question per snippet. This could work like StackApps. The question itself contains the snippet, whereas answers are used for bug reports and feature requests - either in a single CW answer, or across multiple answers so that votes can indicate urgency.
- Any other format I didn't come up with.
Which format should we use and why?
As per Peter's request, a few snippets we already have:
- KennyTM's Levenshtein distance calculator has been used a few times.
- I've been reusing my own code golf leaderboard several times, and got some positive feedback for it, so it might be nice to make it more easily reusable.
- It was based on this answer-dependent challenge dashboard which could see some more use if we get more of these challenges. (This one was in turn based on Optimizer's snippet here on meta.)
And a few snippet ideas we could probably use, but which I haven't seen yet:
- A pair of leaderboards/dashboards for cops and robbers challenges.
- Mostly for challenges with list-like input, a snippet which converts the test cases to the most common list formats would be nice.
- ...and who knows what else we might come up with in the future?