Logo

dev-resources.site

for different kinds of informations.

Google Search guide for developers - part 1

Published at
9/13/2022
Categories
python
tutorial
productivity
devlife
Author
nicolaesse
Author
10 person written this
nicolaesse
open
Google Search guide for developers - part 1

Anyone who has been a developer for a day or for several years knows that a percentage of the job consists in finding solutions online, whether it is within FAQs, forums or online community platforms, or official documentation.

A topic that is hardly covered during the programming courses is how to best use Google Search to quickly and punctually find what we need, so as not to waste time and precious attention.

Let's see a roundup of useful tips & tricks for developers of all kinds.

Site statement

The statement site allows you to limit the search to a specific domain or path within the content indexed by Google.
For example, let's say that I want to see the contents that talk about the Python Pandas package but only within the Pypi.org domain.

I would search
pandas site: https://pypi.org/

Search by site

Note that the address can be even more specific and include not only the top-level domain. For example, I might want to search for the term setup within the official Python documentation limited to version 3.9.
I would search
setup site:https://docs.python.org/3.9/

Very useful use of the site statement is to do a global search at the Google Drive or AWS S3 repository level (of course, only for content whose security policy allows access to you and Google).

I would search
python site:s3.amazonaws.com filetype:pdf
Or
python site:drive.google.com

Filetype

The second statement which si rarely used is the one that allows you to specify the type of file we are looking for. Google Search is usually thought to only contain web pages, but that's not the case at all.
For example, I might want to search only pdf files that pertain to ARIMA time series models on Python.
I would search
python time series arima filetype:pdf

Or look for a Python script where the Chilkat package is used
"import chilkat" filetype:py

An incomplete list of file types supported by Google Search is as follows:

  • Adobe Portable Document Format (.pdf)
  • Adobe PostScript (.ps)
  • Autodesk Design Web Format (.dwf)
  • Google Earth (.kml, .kmz)
  • GPS eXchange Format (.gpx)
  • Hancom Hanword (.hwp)
  • HTML (.htm, .html, other file extensions)
  • Microsoft Excel (.xls, .xlsx)
  • Microsoft PowerPoint (.ppt, .pptx)
  • Microsoft Word (.doc, .docx)
  • OpenOffice presentation (.odp)
  • OpenOffice spreadsheet (.ods)
  • OpenOffice text (.odt)
  • Rich Text Format (.rtf)
  • Scalable Vector Graphics (.svg)
  • TeX/LaTeX (.tex)
  • Text (.txt, .text, other file extensions)

Common programming languages:
- Basic source code (.bas)
- C/C++ source code (.c, .cc, .cpp, .cxx, .h, .hpp)
- C# source code (.cs)
- Java source code (.java)
- Perl source code (.pl)
- Python source code (.py)
- Wireless Markup Language (.wml, .wap)
- XML (.xml)

Exact match

To search for an exact phrase (therefore the union of several words) it is preferable to insert the text between double quotes.
For example, I might want to search for exactly the following text generated by an error in compiling a script

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

I would search
"Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed."

The official Google Search documentation does not place a limit on the length or composition of the sentence but, from my experience, I can tell you that I do not recommend using parts of the text that include carriage returns (which may have been typed in various ways on various contents online) and, above all, not to exceed 100 characters of text per single quoted string, as beyond this value it seems to me that there is a significant improvement in performance in terms of quantity and quality of results.

Combined conditions: AND

You can combine AND conditions together simply by writing the words in the field.
For example, if I want to search for results that contain all three of the following words:

  • Python
  • Try
  • Except
  • telepot

It will be enough to write
Python Try Except telepot
In some cases, especially if the number of words is large, it could be that Google shows us the results that contain most of the words we have indicated and not all. We can avoid this behavior by pointing in double quotes the most important words for our search, for example
Python "Try" "Except" telepot

Combined conditions: OR

To combine multiple OR conditions it is important to write the conditions interspersed with the OR word (written in capital letters). I can combine AND and OR conditions together, for example with the following statements
scikit learn "random forest" OR "logistic regression"
The results they contain will be shown
scikit learn AND "random forest" OR scikit learn AND "logistic regression"

Combined conditions: NOT

To exclude a word or condition from the search it is sufficient to indicate the minus symbol "-" before the condition itself.
For example, if I wanted to see the results that talk about time series forecast in Python, but not those that include the Prophet library I could indicate
time series forecasting python - "prophet"

Put all toghether

All that has been seen so far can be combined according to the needs of our search.
For example, if we wanted to search for all sites that link to stackoverflow.com I would search
“Stackoverflow.com” -site: stackoverflow.com

I believe that there are further techniques to fill in at least a couple of other articles like this one so if you liked it and want a second and third part, **let me know by sharing the article with your network and showing appreciation here on Dev.to.

Finally, please get in touch with me on my personal website.

devlife Article's
30 articles in total
Favicon
The Agile Trap: Why Sprinting Alone Won’t Get You to the Finish Line
Favicon
Code That Belongs in a Museum, Not a Repository
Favicon
Don’t Let Your Code Become the Titanic
Favicon
AI: Brilliant…Until It’s Not
Favicon
A dev's Groundhog Day
Favicon
Stop Tool-Hopping
Favicon
Architecture Over Purpose
Favicon
Microservices vs. Monoliths
Favicon
AI and Code: Tool or Threat?
Favicon
Code Quality: Perfection or Practicality?
Favicon
Legacy Code: Love or Hate?
Favicon
Cùng tìm hiểu về Web Development và SEO
Favicon
The Secret Life of a Microsoft MVP
Favicon
“Why Unit Testing Is Not an Option, But a Duty”
Favicon
Codemotion 2024 Milan: Rediscovering My Voice and Passion as a Speaker
Favicon
How I Structure My Day as a Software Developer
Favicon
From Chaos to Clarity: How Kanban Transformed My Daily Routine
Favicon
End of the 16gb RAM era ?
Favicon
Umbraco CodeGarden24
Favicon
Decoding Startup Jargon: A Comprehensive Guide for Entrepreneurs
Favicon
🌱 Embarking on my Spring Boot and Microservices Journey!
Favicon
My web dev blog series
Favicon
Trip to Lisbon for Web Summit 2022
Favicon
Google Search guide for developers - part 1
Favicon
Taking a Creative Sabbatical as a Software Engineer
Favicon
Git merge vs git rebase - why you should avoid using Git merge to update your branches?
Favicon
Tips for Junior Developers
Favicon
What satisfy you when you finish your day as a developer
Favicon
Lo-fi for (DEV) life
Favicon
Welcoming myself

Featured ones: