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

Is it possible to search/filter questions containing code or that have answers containing code?

share|improve this question

3 Answers 3

No it is not.

You could probably search based on some keywords within certain programming languages. But a perfect search for only questions/answers that contain code will be close to impossible.

share|improve this answer

To expand on Ólafur's response, even if you could, you would find that a very large number of questions and answers contain code. And of those that don't, they may still contain code blocks used for formatting.

By contrast, if you need coding help, such a filter might omit the result you need merely because someone describes the procedure in prose rather than in a code block.

So, why would you need such a search?

share|improve this answer
    
I find reading code to be beneficial. –  JeffO Sep 15 '09 at 18:24
    
@GoogleUser: Me too. Also, waffles. –  ベレアー アダム Sep 15 '09 at 18:29
    
@Adam: How do you read a waffle? –  gnostradamus Sep 15 '09 at 18:31
2  
Same as you read braille. –  Ólafur Waage Sep 15 '09 at 18:32
    
@gnovice: you read the burn pattern before you eat it. –  Ladybug Killer Sep 15 '09 at 18:33
    
@gnovice: You need the backside of the Rosetta Stone. –  JeffO Sep 15 '09 at 18:33
    
StackOverflow dev days need to serve waffles. On a stick with butter and syrup dipping sauce. –  JeffO Sep 15 '09 at 18:37
    
@Ólafur: But then a waffle would just be a bunch of whitespace (i.e. no raised dots). –  gnostradamus Sep 15 '09 at 18:47

You can use http://statoverflow.com/sandbox. Query for posts with <code> in the body of the question and at least one joined answer. Note that the site is using data that's couple months out of date now, though.

share|improve this answer
    
So how do I search for code examples on that? ;) –  JeffO Sep 15 '09 at 18:35
    
The big box takes direct sql queries. –  Joel Coehoorn Sep 15 '09 at 20:15
    
"Hey, I know SQL!" (Jurasic Park takoff). –  JeffO Sep 16 '09 at 15:10

You must log in to answer this question.

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