Hacker News new | ask | show | jobs
by janci5243 2584 days ago
One feature I would love is a global code search that has the quality of the repo (as measured by forks/stars/pagerank...) as a part of relevance ranking. A use case is simple: I have some library and I am not exactly sure how to use it, so I go into global code search and try to find usages of that method. First thing that comes would be some relevant code in a big context of a well engineered repository.
3 comments

> quality of the repo (as measured by forks/stars/pagerank...)

These two seem unrelated. Quality is not measured by popularity. There is plenty of popular stuff that's junk, and good stuff that nobody uses.

Precisely. For my organization, I'm looking for a way to quantitatively measure and compare quality/security postures of repos/packages when importing.
Sounds tough. What are your ideas to measure so far?

For the security angle it seems the first naive thing would be to count prior known vulnerabilities, but then, the projects that do absolute worst at that are not going to have discovered their security bugs let alone document them well.

> One feature I would love is a global code search...

that can usefully search code for more than function names.

Why does the quality of the repo matter? Trying to understand the reasoning.
If you do such a search right now on Github you mostly get copies of example projects and other fairly useless repos.