For a programmer, finding information is important. Not just finding information about code, such as while debugging, but finding information in general.
Suppose you need to write a client which talks to a server with sockets, but you don’t know how sockets work in your programming language of choice. This is something quite typical, and even if you’ve been programming a language for a long time, it’s possible that you forget things. I have problems remembering the order of parameters for some rarely used PHP functions, for example. Not to mention various libraries that you may encounter.
Finding information on the internet ought to be easy, right? We have Google, and using Google is as easy as keying in a search word… right?
Googling is difficult
It’s easy to teach someone to use Google. Teaching someone to use Google efficiently is not.
Of course this applies to most search engines, but I’m just going to use the word Google because it’s shorter than “search engines” ;)
I hang on some programming-related IRC channels, and often someone comes there and asks for help. Now, as anyone who has used IRC (or forums and others) probably knows that you don’t always get an answer very quickly. You might not get an answer at all.
So, rather than asking from other people, you need to first ask from a machine. Namely, a search engine (or a specific website, but we’ll get to that in a bit).
However, many times the people asking for help say that they’ve tried googling. Why is it then, that I find an answer to their problem using Google 9 out of 10 times, if I don’t know an answer myself?
The search phrase matters
Finding information in Google isn’t easy for a lot of people. This is beacuse you can’t find information from there by just typing in random stuff, and even coming up with the random stuff is not easy. Many people just don’t know what kind of a search phrase they should use.
It’s easy to tell someone to type in the thing they are looking for, such as “funny pictures”. When what you are looking for gets more complex, it can be difficult to turn it into words.
As a general rule, you can try thinking how you would explain your problem to a person: My script is not working, and I don’t know how to debug PHP scripts.
Then, you need to get the key idea out: I need help in debugging PHP scripts.
That could already be used as a search phrase with moderate success.
You can improve the search by looking for keywords: “Help”, “debugging” and “PHP”
This works quite well
Learning to speak search engine
Now, there are some things that only come with experience. Which form of the word to use, for example. In the above, you could’ve used just “debug” instead of “debugging”. Which one is better and why?
You can think of how people will write about a thing. For example, I’ve written a post called “debugging PHP”. Now, someone might also write “How to debug PHP” or “PHP debugging tips” and so on.
There are other things like that as well, and while it sounds easy when you say it, it might not be that easy to just come up with good search phrases. It takes time to learn what kind of searches are effective. See the end of this post for an excellent resource site for learning google (and other) searching tricks
Using other resources
When it comes to programming, there are many better resources for finding information than search engines. What are these?
It’s called the manual. You might’ve heard about it.
Manuals contain a ton of useful information on a language. For example, PHP’s manual lists all the built-in functions and has many examples on how to use them. Not all languages have a spectacular manual like PHP’s, though, but if your language of choice does, by all means use it! I can’t count how many times the PHP manual has helped me.
Many languages and libraries also have API documentation. For example, the Zend Framework and the Ext JS library have API docs. If you are looking for information on how to use a function/class, the API docs might not help, but if you are looking for a quick overview of what methods a class has, what they do, what parameters they take etc., such as if you want to extend a built-in class, the API docs are very helpful.
There are also some books which work very well as references, such as Mastering Regular Expressions.
In closing
Now, as mentioned, learning to find information will take some practice, but it’s something that pays off in the end.
The best resource for searching tips is Fravia’s website Web Searchlores. The site could in my opinion use a facelift and better navigation, but there’s a lot of useful information if you just bother digging it out.