296 comments

[ 3.3 ms ] story [ 286 ms ] thread
A useful cue sheet thank you.
My pleasure. What tip did you like the most?
Also just Google any error messages (minus your specific bits)...
That, and knowing how to ask questions on StackOverflow or in IRC/Discord/Slack/Matrix.
Man, I really wish SO had a "Close question because answer is in the documentation" option. They'd see their traffic halve overnight.
It's the other way as well, if a question gets asked/answered on SO, it may be a great addition to the documentation.
Sometimes searching StackOverflow is quicker than reading the documentation/manual.
So far the most useful thing I have found has been the bangs from duckduckgo.

With it I can avoid an additional search and go directly search the place I want to look whether that is python docs, rust docs, Wikipedia, reddit or Amazon. Heck I can forward myself directly to google too.

All of this with just a !w, !a, !python3, !rust, !g added to my query.

I understand why google doesn't support this, largely because they want people to stay on the google page and be subject to ads.

I just question the utility of showing advertisements for at least programming related queries where I think the direct to websites seems a lot more useful.

You can drop the "3" from !python3, it has the same result.
For those who aren't aware: Google is a lesser-known competitor of the recommended search engine DuckDuckGo.
This is more useful than I thought it was going to be. Specially the "-" for exclusion is new to me, and I can recollect a few times where that would have been handy to know.
Especially excluding Pinterest results while searching for images ;)
Is there a animated gif search anywhere that excludes results that don't actually give you a damn gif when you follow the link? Giphy and friends have made it impossible to find actual gifs.
Sorry for the late response. You can try Google advanced image search to find image files of a particular format. I have used it in the past to find SVGs.

To exclude giphy and friends, you can just type:

  -giphy ...
at the end of the search query.
It's funny how this knowledge seems to get lost these days because they try to make the interface less complex. I remember these modifiers supported by the most common search engines were even discussed in magazines aimed at children here in the early 2000s! These days it's almost expert knowledge...
Using search engines effectively is such a great, often overlooked skill. It's something that folks often think as a given, but being able to quickly find an answer or resource can appear as "techno voodoo" to some.

I've tried to make a habit of not telling people "just Google it!" when they ask me a question, and instead "Let's Google it" - to open up for an opportunity to help someone try to find an answer by "asking" in a different way.

Well said. What tip did you like the most?
What's often overlooked and omitted from this sort of guide is a person's ability to identify the trustworthiness and usefulness of a website that shows up in search results. It's not enough to juggle operands and search hacks. You also need to know which result to click.

Another commenter suggested just searching for your error message. Try searching for "cannot read property of undefined" and scroll through the results. There are dozens of dodgy domains like asdfsdf.cornelius714.site that are just scrapes of stackoverflow or other forums.

The academic and scholarly field you are referencing in your first paragraph is referred to as “information literacy“

We’re looking at this and students generally we look for the number of stages that need to be completed:

Identification of the need for new information

Searching and strategies for finding the needed information.

Assessment of the usefulness of the information

Evaluation of the credibility of the information

Use of the information to progress a project forward

Reflection on the process and identification of opportunities for improvement

For me those google hacks seem a bit of micro optimization. I use some and there are helpful, but more importantly are things like what sources are trustworthy, how to read error messages and stacktraces, being able to formulate your problem, etc.
I buy a lot of obscure stuff off ebay. Mostly old computers / engineering equipment build for a specific purpose.

Because of this, i normally try to google around for the product to see if I can get some information or a manual on it so I don't end up with something next to useless because I can't figure out how to use it. Unfortunately a lot of the time I get these sort of sites that are basically just archives of previous or current ebay listings.

Even weirder, I'll get some really strange URLS (I swear one or two I've found before didn't even look like the TLD's were real). The text below the link will often look like a keyword dump that just happens to have what I typed in plus all sorts of other random words and such. Clicking on them usually just leads to an unresolved link.

Totally, and even on a good website, the real best answer isn't always obvious. I feel like on 30% of answers on StackOverflow the highlighted answer is either flat-out incorrect or out of date by 10 years and one of the answers further down will have 10x the upvotes and be more correct.

And then of course there's always the problem of asking the wrong question. Like searching "how to read string between nested brackets" or something, when really the person is just trying to parse JSON but isn't aware of what JSON is.

It is googling in this generation, might be different for the next generation.

The core skill is to know how to acquire information and filter the noise from the signal.

Today yesterday it was the user manual, today its google, tomorrow its stackoverflow. And beyond that, who knows !

The article is missing several operators that are useful. Like inurl:, intitle:, allintitle:, etc.

The "AROUND" proximity search is neat as well, especially for words with dual meaning. like:

bootstrap AROUND(6) cpu

Finds "bootstrap" within 6 words of "cpu", which culls out most (not all) of the unwanted results about the bootstrap js library.

This article seems to cover most of the ones I'm aware of: https://ahrefs.com/blog/google-advanced-search-operators/

Edit: Changed around(6) to AROUND(6). Apparently the lowercase version doesn't work, as it's highlighting the word "around" in the results.

I've found the "around" proximity search to be one of the most useful, if not THE most useful operators. It's SUPER useful if you're looking for something you just know someone must've already posted somewhere but you just can't find it!

It always reminds me of learning how to search databases back in the 90s when you had to pay by the minute and you really needed to know all the operators and how to use them! Old school librarian skills :-)

AltaVista had this 25 years ago as the "near" operator. Early Google was relatively gimped in comparison with it's limited search syntax in comparison to the main incumbents.
Wow had no idea most of these operators existed. Thanks for sharing (and to the original post too, I didn't know a couple of those e.g. before:)
Same here, thought I was a master of Googling already, but good to learn something new.
From the linked article:

> “search term”

> Force an exact-match search. Use this to refine results for ambiguous searches, or to exclude synonyms when searching for single words.

Author claimed they tested all of the operators, but this one in particular I can confirm haven't worked reliably for me for over a decade and across a number of machines and accounts.

Some times it can be traced down to things like me searching for "foo bar" and Google thinking

> He said foo. Bar immediately replied [...]

is a valid match which is kind of understandable.

But most of the time I can't really see why the page shows up at all. No trace when searching in the page nor in the page source.

Try opening the “Search tools” menu in the results page and selecting “Verbatim”... I think that makes “literal” searches work, because otherwise Google uses synonyms and language analysis to attempt to match your search to results.
That too has consistently failed between 2007 and late 2020.

Now it just fails inconsistently (i.e. it sometimes works).

Google the company, runs on an algorithm of arbitrary complexity.
The first two results for "bootstrap AROUND(6) cpu" are about bootstrap though.

"bootstrap cpu" gives far higher quality results.

Yes, it's a difficult term. Even "bootstrap compiler" returns JS library results. I'm not claiming my example was the best one for demonstrating AROUND(N).
You can always try excluding JS-related hits: `bootstrap AROUND(6) cpu -js -javascript`
This used to be in Altavista but I think it was NEAR. It was even more useful then when the default algorithms weren't great.
The inurl: keyword is extremely useful when combined with the site: keyword, e.g.,

https://www.google.com/search?q=site:reddit.com+inurl:progra...

This would pull up results for "Vim tutorial" from the /r/programming subreddit. Of course, there are better ways to search by subreddit, but using site: and inurl: is the most website-agnostic way to narrow down results. Both these keywords also work on DuckDuckGo.

I also often use the "I'm Feeling Lucky" keyword "\" on DuckDuckGo, e.g., to search for lyrics

https://www.duckduckgo.com/?q=\rebecca+black+friday+lyrics

You can just do site:reddit.com/r/programming :)
Of course, for Reddit that's definitely better. But there are cases where the inurl + site solution is the only possible one -- I'm a physicist and I often want to find papers from a specific journal, e.g., the Physical Review Letters. Now, I could use the search function on the journal's page, but in my experience that doesn't often give you good results. So I search PRL using the site:link.aps.org+inurl:PhysRevLett keyword, e.g.,

https://www.google.com/search?q=site:link.aps.org+inurl:Phys...

Sadly, every time I try to get technical with these when I'm trying to Google with precision, after two or three searches I start getting blocked by really hard Captchas, and messages saying I might be either a bot or a hacker. It's really annoying.
Obviously a human user would never use such cryptic and complex search terms. /s
Googling is important, and I hear it everywhere, but in my opinion "deep work", learning the basics, and focus is just as important.

You can't google yourself out of every situation. You must be willing to dive deep into a topic, read a lot, think and understand things well.

What googling often means is that you just open on the top 10 hits, scroll through, read two paragraphs, and if the solution is not immediately clear, you go to the next page...

> You can't google yourself out of every situation.

I attended a user group presentation on Hadoop a while back (back when Hadoop was pretty new) and the guy giving the presentation was talking about how difficult troubleshooting was. One woman in the front said, "but whenever there's a problem, why don't you just google the error message?" The presenter (and most of us in the audience) were struck by the horrifying realization that not only had she never had to resolve a problem that "googling the error message" couldn't fix, it literally didn't occur to her that that could happen. (And yes, she was a project manager).

Right. Often I find myself moving away from pages that actually have the content that I need. I just have not read them fully or actually understood the information.

Googling is part of the skill, actually digging into results is another one that is just as valuable.

I'd suggest to change the editorialized submission title, as it predisposes people to share opinions that can easily be unrelated to the article's contents in question.
Agreed - the article is tips and tricks to use google effectively, not an editorial about the value of googling
Changed now. Submitted title was "Googling is one of the most important skills for every developer". It wasn't exactly editorialized, since it's the first sentence of the article (which is often an ok fallback for an HN title) - but I agree with you that it's misleading here, and also still too baity.
I know it was not the most important thing by a long shot, but having a named that is verbifiable was/is still handy. "Just google it". You can't do the same with other search tools. "Just bing it" is the closest, but "binging" is not only not an important skill, it's something they do on Netflix.

Yahooing? Ducking? Dogpiling? Altavisting? Binging?

The ability for the word 'google' to be transformed to multiple use cases still impresses me.

When people started using “google” as a verb, there was the same reaction. You probably feel more comfortable with “google” just because you’ve been using it longer (and depending on your age, you may not remember a time before google).
it's not just familiarity though - it was a word able to be verbified at the start. it didn't sound or feel wrong - certainly 'different' or 'new' up front, but few tools have names that are this malleable up front.
"Searching"?
sure, but google had the ability to be commoditized - people "google" even when they're just 'searching' (and the browser is set to default to DDG, for example). "googling=searching" for a sizable portion of the population, much like "kleenex=tissue" or "Xerox=copy" (back in the day).

You could just say 'Xerox these reports' and people knew what you meant, even if your office had a Ricoh copier.

Long-term, more important than Googling, is building a mental picture of 'who can be trusted to give solid advice or write great code'.

Nowadays, I don't hit StackOverflow, but go to GitHub to look at what the best Software Engineers I know did to solve a problem. For each topic, there is somebody that comes to mind that I think is better than everybody else, and I look to them for direction.

The GitHub Code Search feature is really useful. If I run into a weird problem that's somewhat outside "mainstream" programming (e.g. 2D Line Arrangements with CGAL), I'll often use Code Search to try to find repos that are using the API I'm using to see how they used it.
Is that really better or faster than adding GitHub to your Google search terms? (Real question)
Hmmmmm that’s an interesting question! I think the GitHub search has a better semantic understanding of what I’m looking for, but I’m going to have to try it out!
Google used to be better, I feel.

Nowadays when you add a particular word to make the search specific (otherwise it's too general), Google decides for you, there aren't many results with that keyword, so it excludes the word and gives you a list of irrelevant things.

Yeah I know to put the words I want in quotes, but why doesn't it do that by default?

Google works much better when you use the information they know about you.

At the office, I get much better work related searches than at home. This has the benefit of profiling my coworkers and not just me, and the searches/ sites visited are generally work related.

Edit: I don't like Google's intrusiveness either. I do not use it much at home. The searches are better when you teach it with better data. Searching in a a place that others have taught it with similar good results (work) will yield better results than if it was learned at places searching for terms that are similar but in different fields.

There's an idea: you get better results based on the corporate IP you're coming from. :(
On the topic of profiling, I remember starting at a new company and getting ads for surface-to-air missiles. Then I learnt the imprecise geo-location "located" my computer in the town a few miles away where there's a helicopter manufacturer which is part of a defense contractor..
I think that’s part of the problem, their new algorithm essentially railroads you into the same results that you’ve looked at before which becomes self reinforcing. Part of the magic that’s missing now is the kismet of searching for something and finding a tangentially related result that happens to be better than the thing you were looking for. Now you have to be aware that your results are being filtered by your past behaviour and that of your cohort and actively fight against it which is terrible user experience.
Lately I've actually been getting better results and I have complained about search quality for over a decade: first time I wrote about it must have been around 2008 I think.

A time or two I have even seen it admit that no results matched my query (for those who wonder: this is a good thing! Knowning there are no known results is a valid and useful result in its own right!)

It is still not consistent but now it is at least not consistently annoying.

Sadly this means it is now marginally better than DuckDuckGo.com who more or less consistently thinks it knows better than me if I search for something unusual.

I'll still use DDG first and only fall back to Google.

> Yeah I know to put the words I want in quotes

That also doesn't work reliably anymore. Somewhere along the line Google changed it from "exact words" to "exact words and synonyms", with its definition of a synonym being pretty dumb.

Search for something obscure to do with "nginx" and Google shows you results for apache2, even bolding apache2 to indicate a match.

Using DDG's !bangs is far superior.

Bang for what engines? DDG has a similar problem with the usage of “-dogs“. This just means fewer dogs in results, not excluding all results with dogs. If you want more dogs you can actually do “+dogs” which somehow changes the weighting of terms.
Using "nginx" in DDG will never return websites that have apache2 (and not a single mention of nginx) as a match, Google will.

As for the last sentence, I was using the said example to generalise that it's far better to learn which website is right for the query and add a bang. In this case "<something obscure> nginx !sf", which will return serverfault.com results, which also won't do this stupid thing of equating apache2 and nginx.

I've read similar comments so many times. Am I the only one who thinks Google has become way way better than it used to? Very often I get immediate answers even without needing to click on any site. It's truly magical.
I agree with you. There are way too many "X used to be better" for all of them to be true, most likely you don't remember all the bad parts.

I remember when half of search results would be pages literally filled with nothing but keywords to get hits. I remember getting a ton of programming results from forums that couldn't even format code snippets properly.

Not to be dismissive of other people's subjective experience but it seems to be like nostalgia glasses remembering things in a more favorable way from the past.

> Very often I get immediate answers even without needing to click on any site. It's truly magical.

Yeah, why should anyone else but Google be able to monetize a website? If you click through to anywhere else but Google, you risk diverting some ad money to someone else than Google! The horror! Naah, much better to read the Google-approved cooypasta...

Also, ~90% of those "immediate answers" are directly copied from Wikipedia anyway; if those are what your after, why not just go directly there and see the whole article in stead of just Google's snip of the intro? (Furthermore, ISTR reading somewhere that WP isn't all that enthusiastic about that "magic".)

I noticed this effect too, but then I considered it might be something related to actually becoming competent.

Do you think concert pianists bother to pull up lists of scales on google after the 10,000th hour of practice?

If you work in a large organisation and use Slack, I think that Slack search is overlooked by people. Most forget that it's even there, but I've found it has saved me a lot of time for getting answers to any organisation specific issues that I cannot google. "query in:#channel" and "query from:@person" are very useful.
Funny how this is overlooked while slack stands for "Searchable log of all conversation and knowledge"
Cause you now have to pay for that luxury... otherwise you only get 3 days worth of history :)
I don't use slack a lot so this was new to me. Wow, kinda defeats the whole selling point.
I was waiting for this article for so long. Yes, it is incredible, how many people do not know how to use properly Google, they are asking questions on forums, while a simple search would give them the response
If nobody asks the questions on fora, google doesn't have an answer to show
No, that's not it.

You Google bubble is the most important asset.

I was routinely ask to search the same thing as a colleague. And I regularly got better answers since I trained my bubble on technical queries. While the other person had more interests and Google returned varied results.

So, if you get a hobby in landscaping, don't ruin your search bubble by polluting it with that.

After frontend/backend engineers, we see the rise of the full stack..overflow developer.
To abstract it a bit more - the core skill is being able to learn search engine syntax and search operators. Much in the same way that learning regex can be incredibly rewarding.

I've (unfortunately) met senior managers that equate googling with incompetence, because they've assumed that coders who rely too much on google (or other search engines) simply can't or don't want to learn languages enough to do stuff by memory.

But, it's just a tool, like any other. I've worked with people that simply could not look up things, and would grind to a halt if they could not find any clues in their regular literature.

> because they've assumed that coders who rely too much on google (or other search engines) simply can't or don't want to learn languages enough to do stuff by memory.

How do these people expect developers to learn if not by searching for knowledge? There's a big difference between searching for information and blindly copy-pasting solutions from Stack Overflow.

I've worked with older engineers that only used manuals / man pages, but with that said, they are part of a small minority these days. But with age / seniority, they're often in senior positions.
One of the things to teach new people is when to try an experiment and when to Google. You need something (error msg whatever) specific enough to Google.
that's basically how i look up non-existent terraform documentation "intext:google_pubsub_topic (site:github.com OR site:gist.github.com)"
I used to be a pro at using Alta Vista. Google was so much better, enabling me to get much better results without the tricks that I never mastered it to the same extent.
Same here. One could argue that the “arcane” query languages are just stepping stones towards our machines really understanding what we want. But I still cringe when I catch myself writing prose in the google search box “like some noob”
Two more tips added to the article. `before` and `after` operators.

If you know any other tips & tricks, send me a DM on twitter @denicmarko. DMs open.

For those who don't know about Google it is just like DuckDuckGo with ads and trackers.