I personally believe that unless your code offers one or more of the following, you should keep it to yourself:<p>- a novel experience<p>- a solution to a previously unsolved problem<p>- a faster or smaller solution to a solved problem<p>What's your opinion?
Your requirements are from the perspective of people who view/use the code. I'd argue there are many benefits for the coder by releasing code including getting feedback from the community on aspects that could be improved or changed. This learning aspect is important as well
How would you expect to achieve any of the things on your list <i>prior</i> to sharing the code with others, so that people can collaborate? You're basically implying that none of the good stuff happens after the code goes public.
I strongly disagree. For the types of code you mention we already have avenues for this -- academic papers and publications and libraries.<p>Publishing code, say, in a GitHub profile, can serve other purposes though. Sometimes you're applying for a job and the employer just wants to assess that you can write syntactically valid, human-readable, not-too-terrible code and use source control. For this, I'm not too terribly concerned about whether this is the millionth time solving the problem, so much as I am about excluding people who aren't ready to be interviewed by a bona fide developer.