I am new to Stack Overflow, though I am a professional programmer since years.

I feel it should have been easier to get along for new ones.

I was looking for epoll to read from many sockets with better efficiency than select or simple poll.

I found a Stack Overflow thread whose answer contained working code claiming it works well for up to 125k connection.

I tried that with a little over 10k connections and it started failing. Looking around the best way I could find was to answer below the answer containing code. It was deleted telling me I should ask question separately. Even if I ask a separate question, and refer to that thread, one still has to go a long way down the thread finding the answer containing the code i was referring to. So it doesn't seem like a good way.

Is there a better way to address this? If not there should be one created.

share|improve this question
2  
In your new question, you can link to a particular answer of another question. Note how every answer has a "link" link at the end. –  Jonas Heidelberg Feb 21 '12 at 22:26
    
It can be a little rough at the beginning, because when you don't have any rep you get fewer privileges. –  Matt Fenwick Feb 21 '12 at 22:54
add comment

3 Answers

up vote 11 down vote accepted

Stack Overflow can definitely be a confusing place for people who are more familiar / comfortable with forums. Once you stop thinking about Stack Overflow as a forum, it should begin to make more sense.

For example, consider how you phrased your question here.

Even if i ask a separate question, and refer to that thread, one still has to go a long way down the thread finding the answer containing the code i was referring to. So it doesn't seem like a good way.

Stack Overflow doesn't really have threads, it only has questions and answers. Note that answers can be ordered in three ways—by activity, by post date, and by votes—so an answer that appears near the bottom of the page when sorted by votes may actually appear near the top of the same page when sorted by activity. You cannot assume that answers will always appear in the same order.

In short, if you have a new question, post a new question. As simchona pointed out, you can click the link button under an answer to get a permalink to include in your question. Be careful, though:

[...] because Stack Overflow is not a forum or a newsgroup or similar, each question should be entirely self-contained. That means reproducing enough of the original question/answer under inquiry in order for someone to be able to answer the question without clicking a link.

In other words, don't ask a question that is just a link to another answer followed by the text "Why doesn't this work?" Each of your questions must be able to stand on its own.

share|improve this answer
3  
Yes, you can link to other questions/answers to provide additional background context for those who desire it. But because Stack Overflow is not a forum or a newsgroup or similar, each question should be entirely self-contained. That means reproducing enough of the original question/answer under inquiry in order for someone to be able to answer the question without clicking a link. –  Cody Gray Feb 22 '12 at 3:25
add comment

If you have a question about the code included as an answer in another question, you should create your own (new) question and cite that code. For example, you might say:

I found this code over in this question over here, but I think that this part of the code doesn't work because...

You can link directly to that other answer in your question by scrolling down to the answer, and clicking the "link" button (next to "edit" and "flag"). Including a link is useful to provide context and background for your question, but do keep in mind that all questions are expected to be self-contained. Therefore, you should reproduce enough of the code in question so that someone could answer without having to click on a link.

If you're particularly interested in hearing an answer to your question from the user who initially wrote the code, you can try leaving a comment on their answer, and asking something like:

The code you've shown in this answer has been very useful to me, but I'm struggling to make it work with large numbers of clients. I've posted a new question about it here (link).

Although it's worth noting that the person who originally wrote the code certainly won't be the only person able to answer your question, and may not even be the person who can contribute the best answer! That's another good reason to open a new question.

share|improve this answer
add comment

Looking around the best way I could find was to answer below the answer containing code. It was deleted telling me I should ask question separately.

If you are asking a question about the code shown in an answer, you are not answering the question being asked from the OP. Answers are just for what answers the question being asked.

What you can do is asking a question about the code, reporting in your question the code you saw in that answer.
I would not suggest to link that answer to avoid writing the code again for a simple reason: If the user who wrote that answer changes his answer for any reason, who answers your question would not see the code you are trying. This could have a low probability to happen, but when it happens it causes you to have the wrong answer, as you are using code that is different from what the other users see.

share|improve this answer
add comment

You must log in to answer this question.

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