DEV Community

Cover image for 🔍 2 Tips on Googling Effectively
Sammy Tran
Sammy Tran

Posted on • Updated on • Originally published at softwaremastery.beehiiv.com

🔍 2 Tips on Googling Effectively

This is a repost from the Software Mastery newsletter. If you like what you see, consider subscribing to get emails delivered right to your inbox!

Welcome to the first issue of the Software Mastery newsletter.

In this issue, I want to share two tips about how to search effectively on Google.

Googling is a fundamental skill for software engineers, so much so that it’s a meme:

Googling Meme

Engineers use Google for various reasons:

  1. They forgot how to do something in a particular programming language.

  2. They want to understand an error they’re seeing.

  3. They need to learn about some engineering concepts.

Googling is a way to find resources, but ultimately, whether we’re able to find what we’re looking for depends on our search query.

Sometimes, the resource we’re looking for is out there, but Google isn’t ranking it highly enough in the search results for us to see it.

To refine a search query, here are two tips to get started:

Use the site: operator to restrict results to a particular site.

Use the after: operator to filter outdated results.

The site: Operator

For certain search queries, we’re only interested in results from specific websites. To force Google to only show us results from a particular website, we can add site: to a search query, followed by the website.

If you, for example, are particularly interested in what the people of Hacker News have to say about working at Google, you could write a search query like:

working at Google site:news.ycombinator.com
Enter fullscreen mode Exit fullscreen mode

Here’s a more practical example. Suppose you’re developing on an EC2 instance and just ran docker build -t my-project . to create a Docker image for your application. After a few minutes, the command fails with the following error message:

> docker build -t my-project .
Unable to find image 'python:latest' locally
latest: Pulling from library/python
5040bd298390: Pull complete
fce5728aad85: Pull complete
76610ec20bf5: Pull complete
52f3db4b5710: Extracting [==================================================>] 129.8 MB/129.8 MB
45b2a7e03e44: Download complete
75ef15b2048b: Download complete
e41da2f0bac3: Download complete
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: failed to register layer: Error processing tar file(exit status
 1): write /usr/share/doc/libfreetype6/reference/ft2-type1_tables.html: no space left on device.
Enter fullscreen mode Exit fullscreen mode

To filter Google’s search results for Stack Overflow posts, you could write the following search query:

docker no space left on device site:stackoverflow.com
Enter fullscreen mode Exit fullscreen mode

This type of query can be useful sometimes if websites other than Stack Overflow are ranking highly for this particular search query but do not contain what you’re looking for.

The after: Operator

Software engineering moves fast. As new versions of programming languages, frameworks, and libraries get released, tutorials and other resources get outdated quickly.

To retain search results after a certain year, we can add the after: operator to a search query, followed by a year, year-month, or year-month-day.

For example, if you’d only like to see Spring Boot tutorials written in 2024, you can write a search query like:

spring boot tutorial after:2023
Enter fullscreen mode Exit fullscreen mode

Here’s another example that combines the after: operator with the site: operator.

Suppose I’m interested in what OpenAI has been up to in the past month, and I’m particularly interested in discussions about OpenAI on Reddit. I can find recent OpenAI-related Reddit posts with:

openai after:2024-07 site:reddit.com
Enter fullscreen mode Exit fullscreen mode

Your Turn!

I hope this week’s issue gave you some ideas on how you can use Google’s search operators to find what you need on the Internet.

Do you have any tricks for refining your search queries? Reply to this email or comment below!

Thanks for reading! Until next time,

Sammy

Top comments (10)

Collapse
 
kurealnum profile image
Oscar

Putting something in quotes makes Google search for an exact match. For instance, you might search for "python3" type error if python3 type error returns a lot of results from older versions of Python. This isn't a good example though. I can't think of any better ones at the moment, but there are a lot of great use cases for this.

Collapse
 
martinbaun profile image
Martin Baun

Wonderful to see googling skills still being taught. Its almost like a science, really :P

Collapse
 
sammytran profile image
Sammy Tran

Thanks, Martin!

Collapse
 
roshan_khan_28 profile image
roshan khan

this should be taught in every school. would make the online learning process more easy!

Collapse
 
sammytran profile image
Sammy Tran

Agreed!

Collapse
 
jottyjohn profile image
Jotty John

Interesting!

Collapse
 
sammytran profile image
Sammy Tran

Thanks, John!

Collapse
 
kumarsalugu profile image
Kumar Salugu

Cool!

Collapse
 
genius_ram2005 profile image
Raghav Sharan Mishra

Very Impressive!

Collapse
 
sammytran profile image
Sammy Tran

Thanks, Raghav!