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

I'm banging my head against the wall trying to find a decent example of the Twisted framework with GTK. I had the idea to use SO to get me going, so my idea was to:

  1. Write a simple PyGTK program illustrating the basic behaviour I want to achieve
  2. Post a question with an eventual bounty asking "how do I do this properly using Twisted?"

Firstly, is this acceptable use of SO? It seems like it to me, since it's a programming question with a fairly well-defined answer (notwithstanding the subjectivity of implementation details).

Secondly... the trouble is, the result of step #1 is a set of three files with 46, 104 and 88 lines respectively. Browsing through the answers to "Best way of pasting a lot of code into a question or answer?", I get the impression that it is not okay to post this much code.

That's okay, it's on GitHub, so I can just point people there, right? But then... People might get annoyed that I expect them to look somewhere else to be able to see the details of my problem. And it kind of short-circuits SO as a self-contained Q+A site.

So should I just post 250 lines of code in a question? (Probably not.) Maybe some important snippets, leaving the rest for potential answerers to look up? Would this be just as annoying as posting none at all, and saying "look over here?"

share|improve this question
add comment

1 Answer

When I encounter questions that are just mountains of code with requests to solve some unknown or generic problem I move on from the question. I notice many people answer, and I imagine if there were a bounty you'd get several takers.

That said, I think it's reasonable to include up to 10-20 lines of code to help others get enough context for a concise and reasonable question that shows you put in the work to figure out what to ask. Posting so much code is almost a cop-out and suggests you're having a problem before you got to coding -- and you should really be asking about that.

Fundamentally, you should be asking either:

  1. Where can I find an introduction/example of the Twisted framework with GTK?
  2. I'm having trouble doing [xyz] with my implementation.

In the first case you're looking for a getting-started guide, this is really your fundamental problem, ask the community for help where you really need it rather than asking them to do work creating your solution.

In the second case (ideally) you've started down the path of actually implementing your solution (having found a good tutorial) and you cite specific problems or instances where you need guidance or assistance.

share|improve this answer
    
I already know the answer to #1. There is only one example that I have been able to find, and it's completely unhelpful. There are no tutorials. So, given that... now what? Basically, without any knowledge of how or where to start, I can't have implementation details to ask about. All of this might go in the extra details of my actual question, but it sort of determines whether I would ask the question in the first place. –  detly Jul 6 '10 at 3:26
1  
@detly: the point of asking #1 is for others to help you with the search. Just because you can't find more than one example doesn't mean more don't exist. Either way, in my opinion, posting 250 lines of code or pointing to your GitHub project is inappropriate. –  Mark Elliot Jul 6 '10 at 3:35
    
Okay, I'll give that a shot first. –  detly Jul 6 '10 at 4:02
add comment

You must log in to answer this question.

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