News for hackers. Stuff that matters.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by obl on Sunday June 03, 2018 @04:25PM (#17221608)
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.

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by blt on Sunday June 03, 2018 @04:37PM (#17221741)
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?
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by brazzledazzle on Sunday June 03, 2018 @05:21PM (#17222196)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by knownothing on Sunday June 03, 2018 @10:03PM (#17223942)
Um, have you actually tried doing anything about this? https://help.github.com/articles/searching-in-forks/
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by blt on Sunday June 03, 2018 @10:21PM (#17224045)
> 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.

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by jxub on Sunday June 03, 2018 @04:47PM (#17221852)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by sqs on Sunday June 03, 2018 @05:21PM (#17222198)
Sourcegraph CEO here. Glad you like Sourcegraph! Regardless of what happens with GitHub and Microsoft, we agree that developers need great code search.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by brazzledazzle on Sunday June 03, 2018 @05:26PM (#17222248)
Do you have an on-prem version (to pair with GitHub Enterprise)?
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by sqs on Sunday June 03, 2018 @05:30PM (#17222293)
Yep. Sourcegraph is self-hosted on your own network. Check out 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#githu....
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by ianwalter on Sunday June 03, 2018 @05:30PM (#17222292)
Sourcegraph is great, but I had to disable the browser plugin because it opens a new tab on every github search. So annoying.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by sqs on Sunday June 03, 2018 @05:32PM (#17222308)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by ianwalter on Sunday June 03, 2018 @05:38PM (#17222365)
Cool, for sure, thanks for the response!
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by ezekg on Sunday June 03, 2018 @04:29PM (#17221638)
Their search is really frustrating, I agree. I feel like they only index a small percentage of files, so results are always bad.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by brazzledazzle on Sunday June 03, 2018 @05:25PM (#17222234)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by ezekg on Sunday June 03, 2018 @05:36PM (#17222351)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by tomduncalf on Sunday June 03, 2018 @04:33PM (#17221693)
The fact that you can’t search within a branch too...
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by neongreen on Sunday June 03, 2018 @05:55PM (#17222482)
As 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. Indexing all of npmjs is coming soon.

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by curiousgal on Sunday June 03, 2018 @04:58PM (#17221959)
So we're asking the creators of Bing to fix it?
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by jenscow on Sunday June 03, 2018 @05:20PM (#17222185)
Or whoever implemented the start menu search.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by wierd0 on Monday June 04, 2018 @03:25AM (#17225361)
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?

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by fwdpropaganda on Sunday June 03, 2018 @05:14PM (#17222132)
Bing is actually quite good. Not as good as Google, but much better than Github.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by fulyscentedking on Sunday June 03, 2018 @05:07PM (#17222061)
Search in Windows is horrible too.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by mrep on Sunday June 03, 2018 @08:30PM (#17223451)
Search 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.

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by telltruth on Sunday June 03, 2018 @10:59PM (#17224227)
Exactly. 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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by deft on Sunday June 03, 2018 @05:40PM (#17222385)
I think they purposely weakened the search because people were using it to find secret keys.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by manigandham on Sunday June 03, 2018 @07:24PM (#17223077)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by dom96 on Sunday June 03, 2018 @05:57PM (#17222499)
I 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.

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by sb8244 on Sunday June 03, 2018 @06:02PM (#17222535)
Huh.... 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...
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by coldseattle on Sunday June 03, 2018 @05:53PM (#17222471)
Microsoft should be able to leverage Bing to do good deep searches across all code. This would be a big win for everyone (and Bing!)
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by amagasaki on Sunday June 03, 2018 @04:34PM (#17221715)
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.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by taspeotis on Sunday June 03, 2018 @10:41PM (#17224140)
Yes they could, since they already have reasonable code search for VSTS [1].

[1] https://docs.microsoft.com/en-us/vsts/project/search/code-se...

Re:Microsoft Is Said to Have Agreed to Acquire GitHub by aarongolliver on Sunday June 03, 2018 @04:34PM (#17221707)
Github won't let you do a code search in a forked repository. Clone & grep is literally the only option!
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by tbodt on Sunday June 03, 2018 @05:21PM (#17222199)
Part of the reason GitHub search is so bad is to mitigate people uploading their AWS keys and passwords.
Re:Microsoft Is Said to Have Agreed to Acquire GitHub by ianwalter on Sunday June 03, 2018 @05:26PM (#17222253)
Yea, Microsoft should acquire sourcegraph too.