Hacker News new | past | comments | ask | show | jobs | submit login
Crokage: A New Way to Search Stack Overflow (stackoverflow.blog)
90 points by ingve on Aug 14, 2019 | hide | past | favorite | 17 comments



Around 2013 it was bothering me that the process of typing my question into Google, then clicking on the first result, then scrolling down to the most useful answer took so much time and interaction, to get simple answers of things I just couldn't remember. Let's say I forgot how to concatenate a list of strings in Python and wanted to find out.

So I built http://www.stacksnippet.com/ back then, leveraging Google search results which work well for natural queries and retrieving the StackOverflow answers. The actual answers are listed directly on the search page in a compact format.

After dogfooding this for a while I found that it really is just not that useful. The questions that I had that could be answered in one-liners came in bursts, but the format wasn't great for answering all queries I had.

Not figuring out a good direction where to go with this I abandoned it quickly after building, but it's nice that it's still working, 5 years later (albeit without https).


Glad to see this at least orders by votes.

One of the problems StackOverflow is facing due to its age is that what was (correctly) accepted as the best answer 5 years ago isn't always the best answer today. For some questions, the better answer has more upvotes, and this reflects that.

I kind of wish StackOverflow had something like "Order by most votes in the past year" or "Order by most recent 50% of votes" or something, as it would probably be more accurate, but I get that it's complex both technically and from a UX perspective.


I wish stackoverflow would come up with a way to make an expert's votes count more. It already has a system for a vote's value to go from 0 (you can't) to 1. I want each of Jon Skeet's votes to be worth more (or more depending on knowledge domain like C#?). Maybe the top limit is a 4x multiplier?

I would like the same for hacker news e.g. if patio11 adds the 1000th comment in a thread, I want to see it. Perhaps even individually ranked: opt in to get a clintside ordering of a discussion that uses my own up and down votes to help re-rank the comments.

Stackoverflow is frustrating because experts get much the same influence as ignorants. I am forced to read every answer and comment to find the information gold (the ranking helps, but it doesn't help enough). Best answers almost invariably are written badly and don't cover corner cases (possibly it is because I usually have to find JavaScript answers, or because JavaScript is hard to write well).


It really shouldn't be that hard. The behavior could work by question: it's fine to show the accepted answer while the original asker is maintaining the question.

But if a question gets a lot of new answers without the original answerer reacting any more, just change the algorithm to show the answer with the most votes in the pas month/year.


Perhaps just a simple linear decay function for every upvote would work. Every anniversary, a vote would lose 20% of its value, so after 5 years, a vote would expire, unless re-confirmed by the original voter (or the voter could upvote a newer, different answer).


Go to https://meta.stackoverflow.com/ and add your proposal as a question (don't have to be in actual question format, as existing examples show).

This is a problem which should be solved.


Great idea, I like how quickly basic questions like 'javascript combine array' gives me instant code snippets that tell me I was looking for the .concat opertor.

I wonder if there is a way to have a confidence in the answers and to redirect you to the good old fashioned Google if there doesn't appear to be relevant info. I also understand this is among the most challenging problems facing Computer Science today.


It's hard competing with Google, the Crokerage answers to the example they use ("how to remove an element from an array" in Java) gives me

  ArrayList<char> charList = new ArrayList<char>(0);
  
  for (int i= 0; i < b.length; i++) {
      if (b[i] == condition) {
          charList.Add(b[i]);
      }
  }
  
  charList.toArray();
in Crokerage and

  array = ArrayUtils.removeElement(array, element)
in Google/Stacksnippet.

It'll be interesting to see how long it takes that Google have a way of determining the confidence in the answers and have some algorithm that is able to reliably give a code answer. I'm sure they'll immediately put this in their snippet then, removing the need to click the StackOverflow links any more.


That is a great point to score the confidence the search mechanism has in the answers, either because it couldn't match the query adequately, or because the answers don't have high standard quality. If the confidence is not high, we could at least warn about that, or maybe help the user enhance the query.


This is nice ...

I threw something totally random at it ("png to base64 c#") and it gave the exact snippet it should.


Great tool! Very useful.


I can't ever think of a time I opened up SO to figure out the correct algorithm to use for a specific problem, for me the use case 90% of the time is "This library/module/system does not work like it supposed to and now some other abstraction is leaking"

If you could automate a way to understand and resolve all the bizarre bugs and leaky abstractions in the world of tech now that would be a service!


The initial results for my search queries look pretty good. Looking forward to having StackOverflow integrate this into their API.

Would be a great workflow to explore for our app: https://www.cacher.io


Indeed there might be an interesting synergy on both concepts, Crokage and Cacher! Did you ever think about creating a collaborative space for sharing snippets and their short explanations? Or maybe a repository of well-documented snippets, where a search mechanism such as Crokage would be applicable?


This is going to be a great step in the right direction for early devs on stackoverflow. I really hope this cuts down on the duplicate questions which is both good for the askers and the rest of us.


Great suggestion! More features will be added in the later version for sure.


> This is beta version. For now, we only provide solutions for Java.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: