top | item 13775642

Improvements to searching for special characters in programming languages

105 points| TheQwerty | 9 years ago |blog.google

29 comments

order

Animats|9 years ago

I can now find the C+@ programming language. So it's not heavily special cased for common programming languages.

Google Code Search (2006-2013) [1] was more useful. I miss that. Its search allowed regular expressions.

[1] https://en.wikipedia.org/wiki/Google_Code_Search

kristianp|9 years ago

It doesn't seem to work perfectly. Doing a verbatim search for "C+@" programming language produces a lot of results without the "C+@" on the page.

TACIXAT|9 years ago

This is great. I feel Google has slowly become too user friendly. My mobile results are always way less technical than my desktop results. If I'm in the car (passenger) and want to look up a problem I'm having while programming, I get mostly related queries that are a simplified version of what I'm looking for.

I really believe that the technical crowd drives what becomes popular (app recommendations for family and friends). I feel a lot of the "Google hacking" queries have become less obvious and the search bubble stuff was getting bothersome. This is definitely a step in the right direction. Hopefully I'll be a little less frustrated with results in the future.

johnfn|9 years ago

Google tailors its results to the kind of person it thinks you are. For example, if you immediately search "python", you will get results about snakes. But if you search for programming first, and then python second, it will now give back programming results on the second search. This continues to apply if you searched "programming" last week.

This behavior is actually very nuanced and impressive to watch, once you understand what's going on.

I don't think google is becoming more user friendly at the expense of being technical. It certainly isn't for me. What your problem sounds like is that it's built two separate profiles for you - one of which is what you're likely to search of desktop, and the other for what you're likely to search on mobile.

zitterbewegung|9 years ago

I don't think the term user friendly is the right term. More like they have been targeting a different user over the years (also the content on the web has exploded).

Although most of the time Google will give me technical results if I can coax it.

binarymax|9 years ago

To make this change at Google's scale is a triumph. Even dealing with this type of tokenization on our vastly smaller document set can be challenging.

chimprich|9 years ago

Genuine question: why should this be any more difficult than searching for any other type of character? I've long found it hard to understand why Google is so bad at searching for non-alphanumeric characters.

tyingq|9 years ago

Meanwhile, code searching at GitHub completely ignores characters like =, $, {. And, it's case insensitive. Argh.

mxstbr|9 years ago

It's the most frustrating "feature" I've ever seen. GitHub, the platform for hosting code, has a search function that doesn't work for code. How does that make any sense?!

Fixing that seems like PM101 material, yet here we are in 2017 with this still being a thing...

kolemcrae|9 years ago

Only very slightly related:

When I was a teenager I made music under the name shark^^bait

The ^^ is what made it stand out from others.

The issue is there is no efficient way to search for that phrase with the special characters.

I have no idea if I can still find the absolutely god awful music I made back then.

Using the phrase match in google just searches for sharkbait which doesn't help at all.

It doesn't help that years later a little movie called Finding Nemo came out.

rspeer|9 years ago

This will be extremely helpful next time I have to use a Haskell library that decides to implement everything as infix operators named "~<$>" and ".~=" and stuff.

macintux|9 years ago

Catching up with DuckDuckGo?

james2vegas|9 years ago

needs to index perlvar for this; very few hits on anything from there and those that did the results that come up are for bash only

it's google though shouldn't be surprised

AaronFriel|9 years ago

I am a bit sad that no Haskell results show up in this search:

">>= operator": https://www.google.com/#q=%3E%3E%3D+operator&*

But it's a sight better than it was before. It actually shows meaningful programming language results. And if I call the operator by it's Haskell name at the same time, I get very good results:

">>= bind": https://www.google.com/#q=%3E%3E%3D+bind&*

Or just the language name:

">>= Haskell": https://www.google.com/#q=%3E%3E%3D+haskell&*

kyrra|9 years ago

For your first search, I see "Operator Glossary - Haskell Lang" as the 9th result.

doall|9 years ago

Fantastic! As a Lisper and Clojurian, I can say that this really helps beginners to search for reader macros.

ino|9 years ago

Any tips on searching for C and not C++ or C#? (google or ddg)

hashhar|9 years ago

Long due considering DuckDuckGo is quite developer friendly.

TheGrassyKnoll|9 years ago

Agree. On DuckDuckGo just do:

<your programming problem> !so

Takes your search directly to Stack Overflow

If you don't like the results, try it again with !g and your search is submitted to Google.

They've got 9000+ bangs now:

https://duckduckgo.com/bang?q=