Click here to Skip to main content
15,861,168 members
Articles / Operating Systems / Windows

How to Use Google and Other Tips for Finding Programming Help

Rate me:
Please Sign up or sign in to vote.
4.38/5 (161 votes)
8 Mar 2008CPOL5 min read 246.3K   129   64
A primer for people looking to learn to help themselves find answers to programming questions

Introduction

CodeProject 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 its 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 guarantees 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 CodeProject 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 CodeProject itself, often the first few hits I get when I do a Google search to show to someone, are CodeProject 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 CodeProject 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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Australia Australia
Programming computers ( self taught ) since about 1984 when I bought my first Apple ][. Was working on a GUI library to interface Win32 to Python, and writing graphics filters in my spare time, and then building n-tiered apps using asp, atl and asp.net in my job at Dytech. After 4 years there, I've started working from home, at first for Code Project and now for a vet telemedicine company. I owned part of a company that sells client education software in the vet market, but we sold that and I worked for the owners for five years before leaving to get away from the travel, and spend more time with my family. I now work for a company here in Hobart, doing all sorts of Microsoft based stuff in C++ and C#, with a lot of T-SQL in the mix.

Comments and Discussions

 
Questionnice post Pin
Afzaal Ahmad Zeeshan14-Jul-14 0:10
professionalAfzaal Ahmad Zeeshan14-Jul-14 0:10 
GeneralMy vote of 5 Pin
DrABELL12-Aug-13 7:34
DrABELL12-Aug-13 7:34 
QuestionNo mention of enigmatic count? Pin
RedDk29-Mar-13 13:42
RedDk29-Mar-13 13:42 
QuestionThank you for sharing Pin
Mazen el Senih15-Mar-12 9:53
professionalMazen el Senih15-Mar-12 9:53 
GeneralMy vote of 5 Pin
jim lahey12-Apr-11 23:48
jim lahey12-Apr-11 23:48 
GeneralMy vote of 1 Pin
sensboston13-Dec-10 3:39
sensboston13-Dec-10 3:39 
GeneralRe: My vote of 1 Pin
Dave Kreskowiak6-Jan-11 18:25
mveDave Kreskowiak6-Jan-11 18:25 
GeneralRe: My vote of 1 Pin
jim lahey12-Apr-11 21:48
jim lahey12-Apr-11 21:48 
QuestionI need stuff. Pin
IWASAM BENJAMIN EDU27-Nov-08 7:05
IWASAM BENJAMIN EDU27-Nov-08 7:05 
Questionhow to buy a java text book. Pin
IWASAM BENJAMIN EDU27-Nov-08 6:56
IWASAM BENJAMIN EDU27-Nov-08 6:56 
AnswerRe: how to buy a java text book. Pin
Boby Thomas P30-Mar-09 6:00
Boby Thomas P30-Mar-09 6:00 
Generalgoogle changed the query language Pin
Tom Deketelaere29-Oct-08 23:53
professionalTom Deketelaere29-Oct-08 23:53 
GeneralYou got my 5 Pin
Jonathan C Dickinson1-Jul-08 1:13
Jonathan C Dickinson1-Jul-08 1:13 
GeneralRe: You got my 5 [modified] Pin
The Web Developer11-Aug-08 21:00
The Web Developer11-Aug-08 21:00 
GeneralApologies Pin
Pete O'Hanlon30-May-08 8:50
subeditorPete O'Hanlon30-May-08 8:50 
GeneralRe: Apologies Pin
Paul Conrad28-Jun-08 8:59
professionalPaul Conrad28-Jun-08 8:59 
Generalhttp://google.com/microsoft Pin
MidwestLimey1-May-08 6:25
professionalMidwestLimey1-May-08 6:25 
GeneralSearch on "dotnet" not .Net Pin
GWSyZyGy13-Mar-08 6:52
GWSyZyGy13-Mar-08 6:52 
GeneralRe: Search on "dotnet" not .Net Pin
Christian Graus13-Mar-08 9:25
protectorChristian Graus13-Mar-08 9:25 
QuestionHow to get an answer message Pin
Muhammad Gouda13-Mar-08 0:43
Muhammad Gouda13-Mar-08 0:43 
Generalhttp://search.live.com/macros Pin
Wil Peck11-Mar-08 6:23
Wil Peck11-Mar-08 6:23 
GeneralMandatory Read for New Posters Pin
Vasudevan Deepak Kumar11-Mar-08 0:17
Vasudevan Deepak Kumar11-Mar-08 0:17 
GeneralA little doubt ... Pin
Vasudevan Deepak Kumar11-Mar-08 0:14
Vasudevan Deepak Kumar11-Mar-08 0:14 
GeneralRe: A little doubt ... Pin
Christian Graus11-Mar-08 9:05
protectorChristian Graus11-Mar-08 9:05 
GeneralI like it! Pin
Muammar©10-Mar-08 23:05
Muammar©10-Mar-08 23:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.