Lurker News

Comments (1,436) 302 threads

Show all comments

Showing thread 7 of 302

obl15 replies#
Tangentially related, but maybe microsoft could actually do that : why is github's search so terribly bad ?

If they had developed a good powerful code search (custom semantic engine for most used languages, complex queries, exact/fuzzy matches for syntax, use of history, etc) they could have become the primary way you interact with code you don't know yet.
As it stands now it's simply more efficient to clone and use plain old grep, it's really sad.

ezekg2 replies#
Their search is really frustrating, I agree. I feel like they only index a small percentage of files, so results are always bad.
tomduncalf#
The fact that you can’t search within a branch too...
brazzledazzle1 reply#
They don’t index forks. Cloning a fork just to search through it locally is always fun. Very annoying when a fork becomes the de facto project because it’s the one being maintained.
ezekg#
I’m not even talking forks. I’m talking largish projects hosted on GitHub (100k+ loc). The actual results will contain less than half the results you’d see with grep, and even then the indexed content may even be out of date. This is exacerbated even more when database migrations are kept in source control, with older migrations archived, and the only search results you get for eg a stored proc search will be a version of the sp from 6 months ago.
aarongolliver#
Github won't let you do a code search in a forked repository. Clone & grep is literally the only option!
amagasaki#
That would be really great. To improve looking through new repos at least a litte bit I like the browser plugin [Octotree](https://github.com/buunguyen/octotree), it adds a tree view of the code and eases jumping between files.
blt2 replies#
It is shockingly bad. The fact that you can't code search in a fork blows my mind. How have they not fixed this basic, important feature after so many years? What could possibly make it more difficult than a few person-months of effort?
brazzledazzle#
Maybe avoiding the costs associated with keeping the indexes available for every fork? I believe they use elastic search so maybe someone with more experience with that can comment.
blt#
> You will not be able to search the code in a fork that has less stars than its parent.

... but since it's allowed if the fork has more stars, I guess they're just trying to save compute cost. Seems like a bad place to scrimp to me.

jxub2 replies#
SourceGraph tries to fix it, and the experience of searching, jump-to-definition and generally getting to grips with a codebase is way better there IMO. They also have browser plugins with integration to GitHub. I recommend you to check it out.
sqs1 reply#
Sourcegraph CEO here. Glad you like Sourcegraph! Regardless of what happens with GitHub and Microsoft, we agree that developers need great code search.
brazzledazzle1 reply#
Do you have an on-prem version (to pair with GitHub Enterprise)?
ianwalter1 reply#
Sourcegraph is great, but I had to disable the browser plugin because it opens a new tab on every github search. So annoying.
sqs1 reply#
Sourcegraph CEO here. There was always a toggle for that feature, but it was too hard to find. It is now off by default and you can enable it in the browser extension settings. I'm sorry you had a bad experience. I hope we get another chance to give you an awesome code search experience.

Continue this thread — 1 reply

curiousgal2 replies#
So we're asking the creators of Bing to fix it?
fwdpropaganda#
Bing is actually quite good. Not as good as Google, but much better than Github.
jenscow1 reply#
Or whoever implemented the start menu search.
wierd0#
I used to be able to execute programs through the start menu. Can't do that anymore.

I used to go:
press start btn --> type "utor" --> press enter --> uTorrent.exe executes.
Why would they remove such a useful feature?

fulyscentedking#
Search in Windows is horrible too.
tbodt#
Part of the reason GitHub search is so bad is to mitigate people uploading their AWS keys and passwords.
ianwalter#
Yea, Microsoft should acquire sourcegraph too.
deft1 reply#
I think they purposely weakened the search because people were using it to find secret keys.
manigandham#
That doesn't make sense. Ruin the feature to potentially help someone who made a mistake with security? Why wouldnt they just run the search to find keys themselves and remove them from search results.

Continue this thread — 5 more replies