Could Code Review be used to create a community library?

Here is the elevator pitch:

Using Code Review to assemble a collection of extension methods for .NET and extracting a library out of it.

Originally I created a separate SE site proposal to achieve this, which got closed since SE isn't created for this purpose. In a general Programmers.SE discussion whether or not creating a library through a democratic process similar to SE is possible, Yannis Rizos pitched the idea that it might be interesting to discuss the same topic on Code Review meta, so here goes ...

The proposal I just created isn't a typical SE site. It is inspired by extensionmethod.net which attempts to create a listing of interesting .NET extension methods. The main problem this site has at the moment is moderation. It is my belief that the SE platform is perfectly suitable to do the forms of moderation which extensionmethod.net is missing.

Why would it be suitable on Code Review?

The basic idea fits the Code Review format. Code is posted, reviewed, and improved. For a simple listing of extension methods I feel Code Review is already a correct place as it is now. One problem which could occur is that many extension methods are posted which can't be improved, and thus no answers for them will ever appear. Another is how to handle duplicate extension methods, which meta still isn't clear about at the moment.

Why it isn't suitable on Code Review (as is)?

In order to properly extract all the posted extension methods, tag-specific conventions would need to be introduced. Some I can think of now:

• Specific tag needs to be applied.
• Type of the object to which the extension method belongs needs to be applied as a tag.
• A category for the extension method should be given through a tag. (e.g. LINQ, general, reflection, ...)
• No duplicates should be posted. (Extension method with the same functionality.)
• Answers and questions should contain complete compilable code samples, not just pointers on how to improve the code.
• Preferably a particular coding convention should be followed, and methods should contain XML documentation.
• When calling other custom extension methods from within an extension method you should link to them on CR. (Or some other convention needs to be figured out in order to resolve dependencies.)

This discussion should be about the following two questions:

1. Would it be worth trying out this concept on Code Review?
2. Are tag-specific conventions like this a problem, and what would be a way to easily enforce them?
• Interesting, I had this idea myself (thinging of StackOverflow) yesterday – Lyndon White Dec 20 '11 at 13:50
• @Oxinabox: I blogged about it recently as well ... ;p Unfortunately it looks like the idea won't be testable on SE. :-( – Steven Jeuris Dec 20 '11 at 13:53
• Actually upon furthur reading my thoughts were different. I was looking at it more as a datamining / natural text recongniton problem – Lyndon White Dec 20 '11 at 13:56

Why not just host it on GitHub or similar and come here to request review of parts?

I have this extension method which does much bla and even more bla if blu:

 Some awesome code here.


I'm specifically looking for suggestions on how much bla I need to get a real conversion going and if the bla on line 666 is not evil.

Note: This is extension method is part of the MAELitW (Most Awesome Extension Library in the World) project.

Edit: My first thought is that such an effort does not fit well into the Q&A style.

The biggest problems I see are:

• Organisation, tagging and stuff. I'm not very fond of creating tags just for that purpose. Also, one question per method? Per Type? Per Collection?
• Review, to avoid duplication and fragmentation questions need to be edited, which will render most answers useless, or at best confusing. Deleting questions or answers for cleanup will destroy valuable information. Marking questions as old will need a link to the newest question, which turns into much work after some time.
• Forks, if there's such a thing for .NET, there'll also be such projects for Java, C++ and similar, including all kinds of libraries.
• Megalomania, why stop at extension methods? We can host a whole Driver-Suite here!

Edit2:

one question per extension method

That means you'll need a special tag for it, which does not collide with the normal usage of the site.

duplication shouldn't be a problem, close as duplicate; when would an answer be edited so that answers (improved functions) become obsolete?; questions shouldn't be deleted, but closed;

If you close as duplicate to a newer version, you'll get a Duplicate-Chain in time, with different versions cluttering up the site. Answers might become outdated only if you edit the original question.

forks and megalomania: true, which is why I first posted it as a SE site proposal. There is a limit to how far you can take this within SE. An extension method library is the simplest form of loosely coupled methods I can think of, which makes it a nice proof of concept.

Not really, no. Where's the difference between a library with extension methods and a library with some static methods? Additionally, extension methods can use each other (as far as I know), which means that they can interact with each other and can gain the same complexity as any other library. If you have code, it doesn't matter how loosely coupled it is as long as you wrap it under one umbrella, it's still one big piece.

• Because that isn't the question? I know it is possible to post specific parts of code on Code Review for review ... yes. – Steven Jeuris Nov 23 '11 at 10:35
• Okay, then I've misunderstood you somewhere...let me trace that. You want to create a library with extension methods. You want them to be reviewed and improved. You want them under one umbrella, read: Code Review. Did I get it so far? – Bobby Nov 23 '11 at 10:40
• "Could Code Review be used to create a community library?", "Would it be worth trying out this concept on Code Review?", "Are tag-specific conventions like this a problem, and what would be a way to easily enforce them?" – Steven Jeuris Nov 23 '11 at 10:46
• I think that questions has been answered with the closing of the proposal. It doesn't fit well into the Q&A scheme. – Bobby Nov 23 '11 at 10:50
• Then feel free to down vote, and additionally even better, leave an answer stating why it wouldn't work on Code Review. – Steven Jeuris Nov 23 '11 at 10:53
• Thanks for the update! With some of the points you mentioned I had the following in mind: one question per extension method; duplication shouldn't be a problem, close as duplicate; when would an answer be edited so that answers (improved functions) become obsolete?; questions shouldn't be deleted, but closed; forks and megalomania: true, which is why I first posted it as a SE site proposal. There is a limit to how far you can take this within SE. An extension method library is the simplest form of loosely coupled methods I can think of, which makes it a nice proof of concept. – Steven Jeuris Nov 23 '11 at 11:46
• "If you close as duplicate to a newer version, you'll get a Duplicate-Chain in time, with different versions cluttering up the site." ... Oh i.c., that's not what I intended. Each answer to one question is a suggested improvement for that extension method. An improvement shouldn't be posted as a new question, but as an answer, just like how Code Review works ... – Steven Jeuris Nov 23 '11 at 13:15
• "extension methods can use each other" That is your most valid point. I was thinking about simply linking to the used extension methods. It would show up in 'Linked'. This would work as long as the interface stays the same. – Steven Jeuris Nov 23 '11 at 13:29