Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

I have missed Google Code Search, which launched in 2006 and was discontinued in 2013. Similar to GitHub's code search, it supported searching by regex and filtering by language etc. - but obviously the amount of code to search through is orders of magnitude larger than it was 10-15 years ago. Still I wonder what took GitHub so long to build this - it's hardly a novel idea, and it seems like such an obvious power tool for programmers to have.


sort by: page size:

Google used to have code search but killed it.

I've been wondering the same thing for many years. And I don't know why Google killed Code Search

Google code search looks at github too, actually.

Google used to offer code searching for public repos but then, expectably, they abandoned it. Now it's only used for google-owned/run projects. But when it was around it was really amazing. Github's code search is quite lame in comparison. I often just run ripgrep locally instead.

Anyone using github search as a replacement for the discontinued Google code search service?

Google Code shut down last new year. I have been missing it a lot. It was a search engine for code repositories and tarballs and had a lot of stuff indexed. It had a nice Thompson regular expression search and an ability to filter by metadata like file name or programming language.

Google Code was very useful at giving me examples of how to do a certain thing. I've used it to search and compare different methods for matrix inversion, sought for examples on using certain API calls or samples of using a certain assembly intrinsic function.

GitHub's code search can do some of this but it's not a very good replacement. Has anyone got suggestions on good search engines for code?


Google Code Search is the only service I have been missing. And it is not on this list.

Code search had a good regex search and nice options for searching based on metadata. GitHub's newly launched code search is not good enough (yet) and doesn't have a big enough haystack to search in.

The prime use case for code search was finding example code of badly documented APIs.


"To optimize the code for the most commonly used forms of selectors, we examined a cross-section of code from Google Codesearch."

I assume they found those github projects using code search. Code search may not be used a lot, but the people and projects using it have a large impact. Is there any way we can convince Google it's worth keeping it available?


My primary use of Google Code search was, searching for this rare function (like a POSIX one) whose man page I can't understand and is largely undocumented elsewhere. I would often try to understand how other projects are using this function via internet-wide code search. :D

While Github is great, I think it still hosts only a small fraction of all the code that is public.


i don't understand why codesearch has to go. granted, it felt a bit neglected lately, but it was truly useful.

i wish there was a way for google to open source their abandoned projects. i'm sure someone would be willing to offer a similar service by basing it what the google code search already does.


This is, increasingly, one of the only things I find myself locked into GitHub for: if I'm working in a space that's sufficiently "old" (e.g, macOS APIs), I generally cannot get Google to produce anything useful anymore and end up having to comb through various GitHub repositories. It's maddening.

No other code search engine comes close anymore, unfortunately.


IMHO Github code search totally sucks. It's better than nothing, but it feels like the bare minimum - just a normal fulltext index applied to source code.

- It's not case-sensitive, which sucks for searching code.

- It's unable to search for any punctuation characters (searching for "foo()" is the same as searching for "foo"), which totally sucks for searching source code.

- The search finds lots and lots of duplicates. Even multiple matches in one file are listed as completely separate results.

- You can limit the search to one of the languages in dropdown menu, but if your language of choice doesn't happen to be in there, you're out of luck. For example you can't limit your search only to C header files.

Simply by adding package:github.com to Google Code Search search box one can apply a better tool for code in github, but unfortunately the good times seem to be over soon.

Really sad to see it go...


Last I checked, GitHub's code search was so bad that it's useless. There's definitely a use for good code search.

GitHub's code search lacks regular expressions, which makes it far less useful than Google Code Search.

This just reminds me of Google code search and makes me miss it more. Searching by regex was pretty useful.

Yes, google code search was a great service. One could use regular expressions and limit the search to particular language or license. Moreover it indexed code from any tarball or repository google bot run into, so the sheer size of data one was searching was hard for others to match.

All today. I have been trying to carefully craft searches on Google and Stack Overflow. I wish Google Code Search were still around, or that Github code search were better.

Google made a mistake in killing code search. Indexing the world's source code and making it searchable is so obviously part of their core mission that I wonder how this decision even got made.

Yeah, code search is a niche market numerically speaking, but intellectually and economically (considering the economic impact of software) it is vital. Google was doing so much better a job of it than anybody else that they completely owned the space. How could that not be worth what it cost them to run it? And now we are bereft of anything good.

I used to use Google Code Search like this: encounter an unfamiliar language or API construct, go to code search, get page after page of real-world usages. Or like this: wonder how to do X, imagine what code that does X might say, search for snippets of that until hitting a working example of X. It was a powerful learning device that I am sad to lose. I sure hope a startup comes along to get search right for the world's source code. Github ought to, but their search sucks.

In any case, congratulations Russ Cox et. al. on a brilliant piece of work.


Google used to have public Code Search
next

Legal | privacy