The Wayback Machine - https://web.archive.org/web/20090202040746/http://www.codeproject.com:80/KB/tips/HowToUseGoogle.aspx
Click here to Skip to main content
5,851,569 members and growing! (17,893 online)
General Programming » Programming Tips » General     Beginner License: The Code Project Open License (CPOL)

How to use google and other tips for finding programming help

By Christian Graus

A primer for people looking to learn to help themselves find answers to programming questions
Windows, Java

Posted: 8 Mar 2008
Updated: 8 Mar 2008
Views: 47,457
Bookmarked: 87 times
Note: This is an unedited reader contribution
Announcements
Loading...



Advanced Search
Sitemap
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
138 votes for this Article.
Popularity: 9.25 Rating: 4.32 out of 5
11 votes, 8.0%
1
2 votes, 1.5%
2
12 votes, 8.8%
3
21 votes, 15.3%
4
91 votes, 66.4%
5

Introduction

Code Project is a wonderful resource. Certainly, my career as a developer is built on the help I got here learning MFC in late 1999. However, it's increasingly the case that a lot of the questions on our forums are easily answered by a simple google search, so I'm writing this article to explain how to get the most out of google. It's not a joke article - if you've tried google and can't find your answers, please read this and try the things I suggest.

Note: all the google searches I refer to in this article are presented as links, click on them to see the result.

Buy a book

The other advice I find myself giving often is, a lot of people seem to think that because a designer lets them get a form on the screen without writing code, that they are ready to ask for help here. Truth is, designers will write boilerplate code for you for simple tasks, but your first step into development should be to buy a beginner book and work through it. Online articles are rarely going to be as methodical in going through all the absolute basics, and certainly a lot of forum posts ask questions that just cannot be answered thoroughly in the amount of space available. If you don't have a grasp of some coding basics, you're not going to understand the answers you are given, either here or in an online article that covers a specific topic and assumes some basic knowledge

A naive search

Let's assume our goal is to find out how to show an image on our form. A google search for 'show image' shows a whole lot of stuff related to images, but none of them actually relate to programming. Actually, a more common question ( asked at least 4 times a week, and often with the person asking insisting that they tried google ) is how to send an email in a .NET language. A google search of "send email" ( without the quotes ) gives you a ton of hits, because a lot of pages have the phrase 'send an email' or similar on them.

The easiest way to focus your search

The most obvious and simple way to focus your search is to add the name of the language you're using. 'send email VB.NET' ( again without the quotes ) gives a screen full of hits, all of which answer the question. Google also has it's own 'query language', whereby you can type 'send email +vb.net', the + means that every page hit has to have vb.net in it. You can also do 'send email +vb.net -C#', this will not return any hits that have C# in them ( a minus means, don't match this ). Of course, this guarentees you won't find a page with code in a different language, and links on the page that name your language, but it also would stop you from finding a lot of hits, for example, most Code Project pages have a menu on them that lists the other languages on the site. So, use the minus sign with caution.

Searching for .NET and other Microsoft APIs

Although Microsoft search is getting better all the time, I still use google for all my searches. If you know you're looking for help on how to use a specific Microsoft API, or .NET library, then you can do ' send email vb.net site:*.microsoft.com' ( again without the quotes, I'll get to quotes, soon ). Note I used *.microsoft.com, because some help is now on msdn2.microsoft.com instead of msdn.microsoft.com. For a long time, this was the only feasible way to search MSDN and get meaningful hits. I think MSDN search itself is better now, but I still stick with what I have become accustomed to.

Error messages

From time to time, the question you need to ask will relate to a specific error message that is being thrown in your code. In this case, just wrap the message in quotes, and google it. Putting words in quotes means google searches for the phrase, not for the individual words anywhere in a page. This is probably the most useful google search, I've never failed to find help when I get a weird error by doing this.

Custom google search pages

You can even build your own search page, which searches only the sites you specify. Andrew Vos has set up a page here, which searches popular .NET sites. There's a link there to allow you to create your own search engine, of only sites that you want to search.

Other google tricks

Google will also search for word definitions ( for real words, not programming terms ) if you google something like "define: serendipitous", the matches will take the form of word definitions. I am paid in US dollars, which nowadays are worth slightly less than pesos. I can keep an eye on the rate, and find out exactly how much I will get in AUD when I am expecting a payment, by googling something like "convert 100 AUD in USD". You can also type mathematical calculations into google and get the answer, or do metric conversions ( such as "200 feet in mm" ). You can also use the filetype: term to specify what sort of file you're looking for, for example, filetype:pdf will search only online pdf files.

Summary

If someone linked you to read this article, odds are good you've asked a question that you could easily have found an answer to online. A lot of questions that are asked are also easily answered by searching Code Project itself, often the first few hits I get when I do a google search to show to someone, are CP articles. This site is a great resource, and we'd love to help you, my point here is not to ask you not to use the site, but rather to encourage you to learn some other ways to get help more quickly, and to build skills to a level where you'll be better able to understand the answers you get, and to limit the number of posts that ask the same simple questions, which creates noise and makes it harder for people who ask more complex questions, to get an answer. Hopefully you will find this helpful, and will continue to find code project a great place to get support when you have questions that go beyond what can be easily answered with a quick google search.

History

09 March 2008 - Initial version posted

 Msgs 1 to 25 of 54 (Total in Forum: 54) (Refresh)FirstPrevNext
QuestionI need stuff.memberIWASAM BENJAMIN EDU8:05 27 Nov '08  
PLEASE iwant to buy a java text book ,how then can i do this. what re the procedure for this, i live in nigeria, cross river state to be preside.
Questionhow to buy a java text book.memberIWASAM BENJAMIN EDU7:56 27 Nov '08  
i really wish to own a java text book but i do not known how. please help me out.
Generalgoogle changed the query languagememberTom deketelaere0:53 30 Oct '08  
Perhaps an update of the article is in order since I seem to remember reading about it (and a simple test confirmed it) that google removed the query language ( the + / - / ... stuff)

Otherwise great article (stumbled upon it after a remark you made in the c# forum Smile )
General[Message Removed]memberKatekortez10:12 25 Oct '08  
Spam message removed
Generalhttp://www.searchdotnet.com/memberAbo Yahya23:51 29 Aug '08  
This search engine is based on Google and proclaimed as "a site for .NET developers". It would ONLY search for .NET related topics and has specialty areas for Books and components.

Coupled with some of the useful tips in this article, you would have an unbeatable tool for any .NET developer Smile
GeneralYou got my 5memberJonathan C Dickinson2:13 1 Jul '08  
But how do I vote? Seriously, great article. Maybe a RFC is required at some point in time like RFC 1855 (Nettiquette).

He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chineese Proverb]

Jonathan C Dickinson (C# Software Engineer)

GeneralRe: You got my 5 [modified]memberThe Developer22:00 11 Aug '08  
if you can look just 5 cm up here on the right you will see rate this articule for us. There you can vote

The Developer - CEH

modified on Tuesday, August 12, 2008 3:23 AM

GeneralApologiesmvpPete O'Hanlon9:50 30 May '08  
Christian - sorry I haven't gotten round to this before, but nice article. Earns itself a well deserved 5.

Deja View - the feeling that you've seen this post before.

My blog | My articles



GeneralRe: ApologiesmemberPaul Conrad9:59 28 Jun '08  
I didn't see it until CG had it in his sig. Now I have something I can point people to instead of just google Smile

"The clue train passed his station without stopping." - John Simmons / outlaw programmer

"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon


Generalhttp://google.com/microsoftmemberMidwestLimey7:25 1 May '08  
Perhaps I missed it, but I didn't see reference to Google's Microsoft sub-search. It's usually pretty good if you're trying to find answers solely in the MS domain.

http://google.com/microsoft[^]


I'm largely language agnostic

After a while they all bug me D'Oh!


GeneralSearch on "dotnet" not .NetmemberGWSyZyGy7:52 13 Mar '08  
Great article!

I almost *universally* start my Google searches (web or groups) with the term dotnet. searching for '.Net' is fairly useless, since punctuation is ignored and net is such a common term on the 'net:

Results 1 - 10 of about 4,270,000,000 for .net </small>
Results 1 - 10 of about 17,300,000 for dotnet.</small>

Also, I almost *always* start my search on groups.google.com and then move to web search, blog search, etc. if I can't find answers in the newsgroups. Keep in mind that many product-based newsgroups are not indexed by Google (like, say, Data Dynamics forums). You're better off going to their private forums to search.

Some of the most difficult topics to search on involve syntax. For instance, suppose you ran across the following code and wanted to find out what it's doing:

return (x<<2)|(y<<3)|0xFF;

Good luck if you don't know what it is Smile

GeneralRe: Search on "dotnet" not .NetmvpChristian Graus10:25 13 Mar '08  
GWSyZyGy wrote:
return (x<<2)|(y<<3)|0xFF;


Yeah, I'd answer that in the forums, and not suggest google. Our forums have a place, and are a great resource, there are things better asked there than googled. More than anything, because you get a live person who will answer your further questions, if you're asking something non trivial.

Christian Graus - Microsoft MVP - C++

"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

GeneralHow to get an answer messagememberMohammed Gouda1:43 13 Mar '08  
I suggest to put a link to this article in the "How to get an answer to your question" message of each board

M. Gouda
foreach(Minute m in MyLife)
{
myExperience++;
}

Generalhttp://search.live.com/macrosmemberWil Peck7:23 11 Mar '08  
Microsoft has it's own custom search with a pretty decent set of operators and macros. Check it out Smile
GeneralMandatory Read for New Postersmember Vasudevan Deepak K1:17 11 Mar '08  
This article must be forming an important step in 'Message Posting Wizard' for new and reckless posters.

The other important step they have to cross is http://www.codeproject.com/kb/scrapbook/forumguidelines.aspx[^]

Vasudevan Deepak Kumar
Personal Homepage
Tech Gossips

A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson


GeneralA little doubt ...member Vasudevan Deepak K1:14 11 Mar '08  
CG,

There seems to be a little deviation between

"Google also has it's own 'query language', whereby you can type 'send email +vb.net', the + means that every page hit has to have vb.net in it. "

and

"If a common word is essential to getting the results you want, you can include it by putting a "+" sign in front of it. (Be sure to include a space before the "+" sign.)" -- http://www.google.com/help/basics.html[^]

Vasudevan Deepak Kumar
Personal Homepage
Tech Gossips

A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson


GeneralRe: A little doubt ...mvpChristian Graus10:05 11 Mar '08  
Hmmmm - perhaps I've misunderstood how the + works, maybe I need to google it :P

Christian Graus - Microsoft MVP - C++

"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

GeneralI like it!member Muammar© 0:05 11 Mar '08  
And I think there should be a link of this article in all the forums


Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)

Generalhttp://www.google.com/codesearchmemberJason Witty16:49 10 Mar '08  
http://www.google.com/codesearch[^]


GeneralIt's more than just Google SearchesmemberBert delaVega10:54 10 Mar '08  
It's laziness and attitude. I know why you posted this and agree. But when there's people asking questions (that aren't really even questions) and say "send me codes", "do this for me" or
"urgent and await a response", it's just being lazy and feeling that others owe them something for some reason. I've been amazed to see people asking for complete systems! I don't totally think it's cluelessness, more laziness and not being able to mentally do the job.

Dear,

Vry Urgent: nead plans 2 build suspention brige a cross hudsun rivr into lowr west sides. Very urgent. Plz send plan and codes. Thanks friend Rose
GeneralRe: It's more than just Google SearchesmembergisTimmy4:31 11 Mar '08  
U frgot "plz send $$ 2 build brij too". :->


GeneralRe: It's more than just Google SearchesmvpGuffa8:18 18 Mar '08  
Or even:

vry urgent!!!!!!!! nead plans 2 build suspention brige a cross hudsun rivr into lowr west sides ConfusedConfusedConfusedConfusedConfusedConfused very urgent!!!!!!!!!!! plz send plan and codes to my email asap thanks friend!!!!!!! RoseRoseRoseRoseRoseRoseRose

Despite everything, the person most likely to be fooling you next is yourself.

GeneralSearch microsoft .Net newsgroup on Google GroupsmemberDoc_1324567895:41 10 Mar '08  
You may even search on Microsoft .Net newsgroup on Google Groups

.Net search (you can bookmark this)
http://groups.google.it/groups?hl=it&lr;=&ie;=UTF-8&oe;=UTF-8&q;=+++++++++group%3Amicrosoft.public.dotnet.*&btnG;=Cerca+con+Google&meta;=group%3Dmicrosoft.public.dotnet.*

Example .Net search for "show image"
http://groups.google.it/groups/search?hl=it&lr;=&ie;=UTF-8&oe;=UTF-8&q;=show+image+group%3Amicrosoft.public.dotnet.*&qt;_s=Ricerca


Search for .Net 2.0 / VS 2005 post (exclude old post)
http://groups.google.it/groups/search?hl=it&lr;=#=100&q;=group%3Amicrosoft.public.dotnet.*&qt;_s=Ricerca&as;_drrb=b&as;_mind=1&as;_minm=1&as;_miny=2005&as;_maxd=31&as;_maxm=12&as;_maxy=2008


Search on SQL Server Newgroup
http://groups.google.it/groups/search?hl=it&lr;=&ie;=UTF-8&oe;=UTF-8&q;=+++++group%3Amicrosoft.public.sqlserver.*&qt;_s=Ricerca


There are A LOT of newsgroup related software development Smile Smile Smile
GeneralRe: Search microsoft .Net newsgroup on Google GroupsmvpChristian Graus11:48 10 Mar '08  
Yeah, I started out learning C++ via asking on USENET. Do people still use it nowadays ?

Christian Graus - Microsoft MVP - C++

"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

GeneralRe: Search microsoft .Net newsgroup on Google GroupsmemberDoc_1324567890:05 11 Mar '08  
Christian Graus wrote:
Do people still use it nowadays ?


Luckly, thanks to google groups, a lot of people use newsgroup nowdays.
Maybe that a lot of google groups's users dosen't know what a newsgroup is, but this isn't important Smile

In the microsoft.public.dotnet.* newsgroups hierarchy there are more than 2.450.000 messages Smile
We do have the newsgroups, why do we need so many others forums? Smile

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 8 Mar 2008
Editor: Chris Maunder
Copyright 2008 by Christian Graus
Everything else Copyright © CodeProject, 1999-2009
Web08 | Advertise on the Code Project