3

When I'm in a helpful mood, I like to browse unanswered questions. I like to visit the "Unanswered" tab, then filter by "my tags" (it's a tab on the right side - easy to miss). Of course, I choose 50 per page.

The problem is that Stack Overflow's definition of "unanswered" is different from mine. Questions may have scores of answers, but they're not considered "answered" until an answer is accepted (or perhaps up-voted; not entirely clear on the rules here). I want to browse questions with 0 answers.

This can be fixed with a lick of JavaScript, and it's even easier because Stack Overflow uses jQuery. Here's the bookmarklet I came up with:

javascript:(function(){var q=$('#questions').hide();$('.question-summary:not(:has(.unanswered))').hide();q.show();})();

It simply hides all questions that have answers. Your page of 50 results will probably filter down to 10 or so. Tested in Firefox 3.5 and Safari 4 on OS X 10.5. (please, post a comment if it doesn't work in your browser)

To make the bookmarklet: Stack Overflow's text policy won't allow me to make a bookmarklet-style link that you can simply drag into your bookmarks bar, so instead:

Here's a formatted and commented version for curious individuals:

// create an anonymous function
(function () {
    // hide the #questions container element (see the
    // WebKit bug below), and cache #questions in q
    var q = $('#questions').hide();
    // hide all elements of class 'question-summary' that
    // do not have any child elements of class 'unanswered'
    $('.question-summary:not(:has(.unanswered))').hide();
    // show #questions, which causes the page to re-flow
    q.show();
})(); // close the function block and execute it
8

If you want to see questions with zero (0) answers, search with this:

answers:0

If you want to see those with no accepted answers:

hasaccepted:0

If you want to see both zero and non-accepted:

answers:0 hasaccepted:0

If you want to narrow it down to a tag, put that in:

[hash] answers:0 hasaccepted:0

When the page is loaded, click one of the sort tabs: Newest, Active or what have you and then bookmark that page. It works cross-browser.

  • Well that sure beats my solution. Can you tell me where you found that? I searched around for at least 5 minutes before opening up firebug and scripting. Vote this guy up! – user139788 Dec 3 '09 at 3:42
  • 1
    it was found on the mysterious search help page! meta.stackoverflow.com/search -- this is linked from every search result page in the sidebar under "Want better search results? See our search tips!" – Jeff Atwood Dec 3 '09 at 3:50
  • 1
    ::: smacks head ::: – user139788 Dec 3 '09 at 19:10

You must log in to answer this question.