

Ask HN: Would Snippet Repo Help You? - jonobird1
http://www.snippetrepo.com?

======
ehartsuyker
My concern here is that with a small user base people won't be able to
review/vet the snippets. With something like StackExchange, there's enough
people using it that there's some amount of peer review.

How would you ensure code validity in Snippet Repo?

edit: Also, how would you handle multiple submissions for the same snippet in
the same language? I.e., two Java snippets that both safely retrieve an
element from a map.

~~~
jonobird1
Great question and a big one I am faced with at the moment. My thoughts for
that is on each snippet, a user can provide a better way of doing this and
this will either be showed back to the original user to decide if this way is
better, or to have multiple options somehow.

There is no official way to ensure code validity just as there isn't with
StackOverflow. But we do have a voting system and invite only community so by
having this, developers can upvote and downvote based on quality and this
weeds out low quality snippets and invalid/bad code.

