6 ms·
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 (
by obl 8y ago
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.
- ezekg 8y agoTheir search is really frustrating, I agree. I feel like they only index a small percentage of files, so results are always bad.
- tomduncalf 8y agoThe fact that you can’t search within a branch too...
- brazzledazzle 8y agoThey 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 8y agoI’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 8y agoGithub won't let you do a code search in a forked repository. Clone & grep is literally the only option!
- amagasaki 8y agoThat 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 https://github.com/buunguyen/octotree), it adds a tree view of the code and eases jumping between files.
- blt 8y agoIt 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 8y agoMaybe 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.
- deleted 8y ago[deleted]
- knownothing 8y agoUm, have you actually tried doing anything about this? https://help.github.com/articles/searching-in-forks/ https://help.github.com/articles/searching-in-forks/
- blt 8y ago> 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.
- jxub 8y agoSourceGraph 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.
- sqs 8y agoSourcegraph CEO here. Glad you like Sourcegraph! Regardless of what happens with GitHub and Microsoft, we agree that developers need great code search.
- brazzledazzle 8y agoDo you have an on-prem version (to pair with GitHub Enterprise)?
- sqs 8y agoYep. Sourcegraph is self-hosted on your own network. Check out https://about.sourcegraph.com/ https://about.sourcegraph.com/ and run the Docker image to get started. Docs on the GitHub.com/GitHub Enterprise integration at https://about.sourcegraph.com/docs/config/repositories#github-configuration https://about.sourcegraph.com/docs/config/repositories#githu....
- ianwalter 8y agoSourcegraph is great, but I had to disable the browser plugin because it opens a new tab on every github search. So annoying.
- sqs 8y agoSourcegraph 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.
- curiousgal 8y agoSo we're asking the creators of Bing to fix it?
- fwdpropaganda 8y agoBing is actually quite good. Not as good as Google, but much better than Github.
- jenscow 8y agoOr whoever implemented the start menu search.
- wierd0 8y agoI 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 8y agoSearch in Windows is horrible too.
- tbodt 8y agoPart of the reason GitHub search is so bad is to mitigate people uploading their AWS keys and passwords.
- ianwalter 8y agoYea, Microsoft should acquire sourcegraph too.
- deft 8y agoI think they purposely weakened the search because people were using it to find secret keys.
- manigandham 8y agoThat 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.
- coldseattle 8y agoMicrosoft should be able to leverage Bing to do good deep searches across all code. This would be a big win for everyone (and Bing!)
- neongreen 8y agoAs one of my pet projects, I'm trying to resurrect Google's Code Search (a fast search indexer that supports regular expressions). It's in alpha stage so far and lots of useful features (like multi-line search) are missing but you can already try it out for Crates.io and Hackage: https://codesearch.aelve.com https://codesearch.aelve.com. Indexing all of npmjs is coming soon.
- dom96 8y agoI cannot agree more with this. It boggles my mind why GitHub's search finds results across various commits, giving patchy results. It would be far better and likely easier for GitHub to just search HEAD. This frustrates me about GitHub every day.
- sb8244 8y agoHuh.... GitHub only searches head for me. This is confusing as I've often wanted to search other branches and can't find a way to...
- mrep 8y agoSearch seems to be surprisingly bad at a lot of companies. I don't know about github but reddits search is so bad it cannot even find something when you type it character for character. I'm super curious to what all these companies are using for search because they are so atrocious that tend to not even work in a basic substring search solution.
- telltruth 8y agoExactly. I can’t search my own tweets on Twitter. Facebook doesn’t know how to rank people when I do people search there. Search is terrible across the internet except Google.
- taspeotis 8y agoYes they could, since they already have reasonable code search for VSTS [1]. [1] https://docs.microsoft.com/en-us/vsts/project/search/code-search?view=vsts https://docs.microsoft.com/en-us/vsts/project/search/code-se...