What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

See Why does Single() not return directly when more than one element is found?. It's asking why a built-in method from the .NET Framework works as it does.

What is SO's stance on questions like this? It is asking for an implementation detail of a third-party library ("Why did they implement it like this"), which practically nobody can answer, and any answer will be useless.

I mean I understand the concern. If I saw the code I'd have initially thought the same. But what can you do with any answer to that question, be it from an authoritative source from the CLR team or any other user? Are you not going to use .Single() anymore? It's there, it is implemented as-is, take it or leave it.

Yet it rains upvotes, but I fail to see the significance and value of the question. Everyone can use a decompiler, everyone can put up a piece of weird code they find and ask why it does what it does and nobody but the original author will know.

The only viable, proper question in there I see is: "I found that Single() loops over all items, how can I make it stop looping immediately after a second match was found?", to which the answer will be "You can't, write your own foreach loop".

So, how to handle questions like this one? Are they allowed? Or how to flag / close them?

share|improve this question
    
1  
@codecaster, you have forgotten what it is like to be at the beginning. This site is for all levels. Learning to code is CONFUSING, why do you think there are so many sites dedicated to it??? have some tolerance man –  user223277 Jul 19 '13 at 11:22
    
What Cody Gray said, and see also Jon Skeet. –  Old Checkmark Jul 19 '13 at 13:08
    
@doubleDown your point being? –  CodeCaster Jul 19 '13 at 13:11

3 Answers 3

up vote 2 down vote accepted

These questions are perfectly valid.

Sure, there are only a handful of people in the world that can tell you what the design/development team was thinking when they made that decision. But just because a question is hard to answer, or there aren't very many people who know the answer, doesn't mean it's a bad question or off topic. The question still has an answer.

Besides, there are other ways to answer the question. You can explain some important reasons why that decision might have been made, which requires a thorough technical knowledge of the domain, but not any specialized insider-only knowledge. Answers can also point out alternative implementations and their disadvantages, and they can criticize the decision that was made, arguing why it should have actually been done differently.

I suppose one could argue that the answers to these types of questions might still fall into the "speculative" and "subjective" categories, but there is such a thing as good subjective.

There are plenty of examples of these types of "why" questions that have been asked and answered on Stack Overflow already. Many of them are outstanding and extremely useful resources. Several even have answers from actual members of the design/development team.

On the other hand, some of these questions suck. It's not a question category problem. We can't just ban questions that ask "why" or concern API/library design. It's just an issue of individual questions. You have to resolve it on a case-by-case basis—that's why we can vote on closures.

share|improve this answer
    
"Answers can also point out alternative implementations and their disadvantages, and they can criticize the decision that was made, arguing why it should have actually been done differently." - I thought SO was not a forum. –  CodeCaster Jul 19 '13 at 10:54
    
I don't see how that makes it a forum. I'm not talking about criticizing other answers, I'm talking about criticizing the design decision that is being asked about in the question. –  Cody Gray Jul 19 '13 at 10:59

Do not flag the question, that is not what the flags are for.

which practically nobody can answer, and any answer will be useless.

You are quite wrong. There are a number of users floating around SO who are either connected to the CLR team or have enough accumulated knowledge to be able to answer the question with authority. Of course there is no guarantee they will see the question or take the time to answer it, but there is every chance that they will.

Are you not going to use .Single() anymore? It's there, it is implemented as-is, take it or leave it.

You are correct in that respect - knowing how it works isn't necessarily going to change your perception of the world, but that doesn't mean the question shouldn't be asked. And it's a fair enough question, anyone who has used Single() a number of times will know that it throws if more than a single item (or none) is found, which is obviously something the question asker hadn't been hit in the face with yet, hence why they asked.

Even though you cannot change how it works, knowing the details can still be good. Those details can help make you a better coder, can help you understand why certain approaches have been taken when coding the .Net framework, and may even encourage someone to adopt better practices when designing their own functions.

share|improve this answer
    
A handful of users out of hundreds of thousands is practically nobody, but that was not the point of my question. The part whether anyone knows the answer is irrelevant, it is the use of the question and its answers I dispute: "But what can you do with any answer to that question, be it from an authoritative source from the CLR team or any other user? Are you not going to use .Single() anymore? It's there, it is implemented as-is, take it or leave it". –  CodeCaster Jul 19 '13 at 10:51
    
@CodeCaster I was still adding to my answer, see the update :) –  slugster Jul 19 '13 at 11:00
1  
@CodeCaster Such answers are useful for many reasons. For one, you can make more informed decisions about if/when to use the method. The information is useful when debugging problems in code. Additionally, new APIs are designed every day: understanding the problems with, limitations of, and decision-making factors that went into current APIs helps you to do a better job in the future. If you don't care about the answer to the question, you don't have to read it; no one is forcing you. I don't care about the answers to any questions about Java, but I don't want to shut them all down either. –  Cody Gray Jul 19 '13 at 11:01
    
"which is obviously something the question asker hadn't been hit in the face with yet, hence why they asked." - no, OP asks why Single() runs the internal foreach to completion if multiple entities are found, instead of breaking or throwing right at the moment a second match is found. –  CodeCaster Jul 19 '13 at 11:02
    
@Cody "If you don't care about the answer to the question" - I did not say that, I said I didn't see much use for either OP or other readers in any answers to the question. Your comment clarifies for me what use some people can get out of such answers. Thank you. Still I think the question should at least be written as a problem statement, not a "why". Like "I used .Single() today and it seemed to [...], why is this and are there any alternatives?". Because then you'd have a "practical, answerable problem", the sort of question we'd like to see the most, according to the FAQ. –  CodeCaster Jul 19 '13 at 11:27
    
@CodeCaster what do you think of this question stackoverflow.com/questions/17745148/i-dont-undersand-recursion ? I am truly curious –  user223277 Jul 19 '13 at 11:38
    
@Yve I see equally little use to that question as the one I started this question about. I do not like "I don't understand this code, what does it do?" questions. Read the language reference, use breakpoints, write a unit test, add tracing output. –  CodeCaster Jul 19 '13 at 12:12
    
@CodeCaster in this case I flagged it, as it requires a tutorial to explain it.. if it's not putting a break in a loop, it can be remedied in a 2 min answer. Ha the question has been upvoted and answer flocked.. yeh I have to agree with you at some points –  user223277 Jul 19 '13 at 12:15
1  
@CodeCaster You have to remember that not everyone thinks the same way as you do, and there are a lot of novice programmers on the site (many of whom can't think critically or logically). You can always down vote those types of questions if you think they deserve it, or leave a comment for the OP. –  slugster Jul 19 '13 at 12:34
    
@slugster I realize that, that's why I asked this question. :-) I vote and comment enough. :-P –  CodeCaster Jul 19 '13 at 12:36
    
@slugster I love work arounds in code and they are sometimes essential. I would add though that it is pretty important to stick to the documented intended use of a function or feature and as mentioned here, write you own when they are defective. Sometime down the road the developer is likely to repair the defect and break your code. Similarly (ie workarounds), if you high jack a field or property for your own use you run the risk of having a conflict with other 3rd party developers. –  DHorse Jul 19 '13 at 13:26

IMO asking such questions is perfectly valid, as there are many authors of third party libraries who are active on SO and the person asking the question can get vital piece of information from that.

Again if the upvotes are raining means that the community would like to get an answer to that and which should not be a problem.

Advantages

  • Inner Workings can make others more aware
  • Can help them decide whether or not to use this library (In case there are options available)

These are some advantages I can think of off the back of my mind and I am sure there can be many more.

share|improve this answer
    
"if the upvotes are raining means that the community would like to get an answer to that" - the community doesn't always know what is best for itself. I just don't see how this question is going to help OP or any future visitor. Yeah, it's cool to mess with .NET's internals, but it is something completely outside your control so you'll have to take it as-is. –  CodeCaster Jul 19 '13 at 10:59
    
True but if you see the flip side, not exactly CLR but if the third party library is open source and OP gets an answer to the question can also help community to be aware of some behaviors of library or bring some bug in the library to light. But that's just my opinion. –  Narendra Pathai Jul 19 '13 at 11:02
    
@CodeCaster the community doesn't know what's best for itself?? Man I'm glad you're not in control over here politically.. such arrogance OMG –  user223277 Jul 19 '13 at 11:26
    
@Yve I've seen more communities destroyed by their users than you can imagine, but thanks for the ad hominem. –  CodeCaster Jul 19 '13 at 11:29
2  
@CodeCaster My opinions of your comments were not based on emotion, but reason, that you put yourself above others and have in intolerance for people not at your level. SO Is for all sorts, otherwise you'd have a good argument. And when it comes to human beings, the lowest common denominator tends to be the thread that is catered. As I have walked this planet a considerable longer time that you, I have seen more than you can imagine, as the result of human nature. I suggest, if you would like to create change, you approach your targets in a different fashion –  user223277 Jul 19 '13 at 11:35
    
@Yve +1 for such a detailed answer. –  Narendra Pathai Jul 19 '13 at 11:50
    
@NarendraPathai I am now drained, shouldnt get caught up in controversy :) –  user223277 Jul 19 '13 at 11:58
    
@Yve since when is age a measurement for knowledge? Anyhow, I said what I said to illustrate the facts that lots of upvotes doesn't have to corrrelate with question quality. I do not put myself above others, for proof look at this question ("I do not know how to handle this, please tell me your opinions"). I do not look down on users who know less, all humans start with zero knowledge. I do look down on lazy people who offload their debugging and manual reading to SO. –  CodeCaster Jul 19 '13 at 12:10
    
@CodeCaster in many cultures age counts towards wisdom, which is part of the problem with my culture - it doesn't respect it's elders- some people don't know how to debug or interpret manuals when they are starting. Upvotes, means many things, the more upvotes a post gets, the more likely it is to get, for many reasons, aside from the quality of the post... This my dear is a discussion for a philosophy, sociology or psychology site –  user223277 Jul 19 '13 at 12:13
    
@Yve Stack Overflow was meant as a knowledge base, not as a "help beginners start programming" site. It is turning into the latter, driving away people who helped it made the former. –  CodeCaster Jul 19 '13 at 12:17
    
@CodeCaster it has a broad base.. how it started I don't knoe, now it invites all levels of expertise (or not) –  user223277 Jul 19 '13 at 12:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .