Hacker News new | past | comments | ask | show | jobs | submit login

Remember Google Code Search? That was a great feature of Google search. You could search for swear words in all the code available worldwide. In one (Sun Microsystems?) code there was a comment "The user is a wanker. He cannot remember his password." The old days were much more fun.



I built https://codesearch.debian.net when Google Code Search was taken down.

Debian Code Search doesn’t crawl, but it indexes all software in Debian, which is typically helpful enough :)


I use this at least once a month! Thanks sooooooo much!!!


Thank you very much for sharing, I am glad to have seen your comment here.


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.


Don't remind me of how awful GitHub search is.

I guess code search is just too niche with no marketability to ever improve


GitHub is most aweful search that I have regularly used. It doesn’t even have basic dedup capability, forget about any thing slightly less basic like limiting search to file names. And it’s not that it is hard to derank potential dedups given that they already know the fork graphs. I have spent good chunk of my productivity manually sweeping through pages upon pages of exact same search results to find the snippets I was looking for and hating creator(s) of this functionality from the bottom of my heart. These people shouldn’t be allowed to build any search again without a mandatory year long rehabilitation training camp (unless they are doing this for enemy states during war times).


How about finding multiple hits per file? Tell me how many matches there are in each file, PLEASE. I should not have to click into the match to know there's more than one match in that file. I shouls also be able to have a view that shows me every match (a la grep/ag). If I need to search, I pull down the repo, index it quickly with ag and do the search. That's really unacceptable, in my eyes, when the basic search is there already.


I find myself using source graph; It seems to work well enough.


yes, source graph looks great. Using docker, every easy to deploy on any OS


Github search also only searches content hosted on github.com which while still large is only a fraction of the code available on the internet.


GitHub search? Try nytimes.com search.


Try the search feature in many CMS systems. Those tend to really suck, with WordPress' being awkward enough that a whole ecosystem of plugins cropped up to replace it.

There's also at least one version of the OpenCart admin search which was designed so poorly that it didn't actually search based on whether the term was anywhere in the page title/content, but whether the title started with the search term (I think they'd screwed up the MySQL syntax). That was interesting.

Either way, search on a system not designed as a search engine is usually okay at best, absolutely terrible at worst.


lol i worked in the same department as the search team. what a nightmare - some of the code in there went back to the 90s


Is it worse than reddit?


This has a similar comment. Gnome Display Manager http://rc.quest.com/viewvc/gdm/vendor/gnome/daemon/slave.c?d...


                /* evil! how this this happen */                                        \
239 if (slave_start_jmp_error_to_print != NULL) \ 240 gdm_error (slave_start_jmp_error_to_print); \ 241 gdm_error ("Bad (very very VERY bad!) things happening in signal"); \ 242 _exit (DISPLAY_REMANAGE); \ 243 }

I'd hate to be the poor soul who encounters this error message and finds no information about it except the source code.


It will only occur if everything is so irrevocably on fire that you need to debug a lot of code anyway, at which point the error message is useless.

Specifically, the branch is only reachable if the PID is not what was expected, or the location that the macro was supposed to longjmp to is not set, which would be fatal defects.


Yes, that may be it. Great find! And sorry to Sun Microsystems, it wasn't you this time.


Google still uses code search widely internally. It's one of their greatest internal-only productivity boosts. The fact it has knowledge of includes and cross-references and function prototypes and templates is amazing...

You can still use it as an outsider to search Chromium:

https://cs.chromium.org/


Regex support is amazing to have in a search engine too... For example, paste in an email address validating regex:

https://cs.chromium.org/search/?q=%5Cb%5BA-Z0-9._%25%2B-%5D%...

Considering that one can't 'index by regex', I wonder how the backend works - does it actually run the regex against every source code line in the repository in a few hundred milliseconds? Sounds expensive! They must have thousands of machines! Maybe thats why they don't have a public codesearch tool for the whole internet...


If you host your code on Google Cloud Source Repository you can use the search feature https://cloud.google.com/source-repositories/docs/searching-...



Another alternative I am working on in past time is https://codegrep.com - currently indexes top few thousand repos from github.


I wonder if the writer of that comment was American or British - it appears that the term is somewhat less offensive in the US. Once, whilst watching a relatively mainstream US series I was surprised to see a character refer to their colleagues as "wankers", which seemed rather incongruous.


it appears that the term is somewhat less offensive in the US.

A lot of ordinary British things are seen in the U.S. through a filter of... let's call it "quaintness."

Swear words. Thatched roofs. Music on AM radio.

So, yeah. Whatever offensive word you heard probably didn't have the same impact on the other side of the Atlantic. There's probably some reciprocity, too.


My experience is that this doesn’t apply to the see you next Tuesday word, at least here in Canada. It’s seen as very offensive according to the Canadians I know. Speaking as a Brit, that word is thrown around quite casually in the UK!


That's what I meant by reciprocity.

Brits have their own quaintness filter for some of the words that NorthAms see as out of bounds.


For clarity's sake, and as a demonstration against censorship: "cunt"


You can still search Chrome though

https://cs.chromium.org/


Standardization took place and the "business class" caught up.


Care to elaborate?


Wankers tend to be good at password remembering.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: