News for hackers. Stuff that matters.

How often do you "Google" while programming?

Let's face it. We all google/search a lot while programming. I am a new programmer (from the last 2yrs) and I hate it, but when ever I am stuck, I search for quick solutions online.

What about you guys? How can this "problem" be solved? or...its ok?

( 18 comments | 14 points | on HN )
Re:How often do you "Google" while programming? by brisance on Tuesday August 31, 2010 @04:05AM (#1648771)
It depends a lot on the experience/background of the person, as well as the problem at hand. Most programming "problems", like any other engineering field, have already been solved, so there's no shame in turning to a search engine or even better, StackExchange, for solutions. The best coders are the ones that are learning all the time.

On the other hand, there is usually an impedance mismatch between the description of the problem and the actual solution. Take a look at the horror stories on The Daily WTF. http://thedailywtf.com/

Anyway, try to read as much code as possible, both good and bad, find a mentor(s), be able to take constructive criticism, and just persevere, and you should be fine.

Re:How often do you "Google" while programming? by viraptor on Tuesday August 31, 2010 @05:52AM (#1648904)
My search history page says ~70 queries/day on work days and ~30 on weekends - majority of that stuff is about programming. So yeah it's not a problem.

That said - I don't even bother remembering the links to documentation. When I need something I just go to "python docs multiprocessing" or similar address and hope that I'm lucky. Search is the new URL ;)

Re:How often do you "Google" while programming? by jedbrown on Tuesday August 31, 2010 @06:40AM (#1648956)
Same here, but that might not be the best example since there is `pydoc multiprocessing`, perhaps integrated with your editor.
Re:How often do you "Google" while programming? by jbr on Tuesday August 31, 2010 @03:38AM (#1648735)
I've been programming since middle school and I'm now almost 30 and I google all the time. There's too much to remember, and I wouldn't want to burden my memory with too many specifics. I try to focus on remembering generic patterns, since those are far harder to search for.
Re:How often do you "Google" while programming? by rndmcnlly0 on Tuesday August 31, 2010 @03:21AM (#1648714)
More than 10 years in (implies mastery, right?) I still search all the time. However, I'm not looking for solutions per se. Instead, I'm just looking to refresh myself on the available building blocks (whether it be the API or whatever syntactic sugar the particular language at hand provides). In exchange for this constant dependence on external technical reference, you can gain fluency in a large number of languages libraries and tools.

Learn the big, important concepts in a variety of domains, and don't ever worry about memorizing the finicky details (which might very well change in the next release anyway).

Re:How often do you "Google" while programming? by Kliment on Tuesday August 31, 2010 @04:19AM (#1648790)
I find searching is the fastest way to find documentation for library functionality as well as example code for when the documentation didn't cut it. I don't see why you should hate it. I did a fair bit of Win32 stuff a while back, and still poke around the occasional bit of Windows driver code when trying to make weird/outdated stuff work. The documentation on those is terrible. Searching is the only way. I mostly write Python now, but I still find I rather search modulename+functionname than use help().
Re:How often do you "Google" while programming? by exline on Tuesday August 31, 2010 @06:11PM (#1651041)
Its perfectly ok. A lot of times others have already ran into the particular problem and already solved it. You need to understand the solution, just don't blindly accept some random solution found on the internet. If you do this, then your code will get ugly fast and you will not know what it is doing. But there is nothing wrong with finding a solution, studying it, understanding it, and then using it in your own code.
Re:How often do you "Google" while programming? by c1sc0 on Tuesday August 31, 2010 @06:04AM (#1648911)
I remember only 5 years a gruffy old sysadmin preaching "Can't you guys code without googling all the time? Programming is not what it used to be." I listened to his advice for a while & I'm thankful for it. I now try to do big conceptual work in offline mode but google like crazy for all the nitty-gritty details.
Re:How often do you "Google" while programming? by benkant on Tuesday August 31, 2010 @10:33AM (#1649495)
$needle, $haystack

or

$haystack, $needle

Re:How often do you "Google" while programming? by Throlkim on Tuesday August 31, 2010 @11:44AM (#1649718)
I google this nearly every time I use a PHP function.
Re:How often do you "Google" while programming? by mikeknoop on Thursday September 02, 2010 @03:00AM (#1655495)
I can't remember off the top of my head but it should be ($needle, $haystack) if it isn't because of the appearance order in the English colloquialism "NEEDLE in the HAYSTACK".
Re:How often do you "Google" while programming? by clueless123 on Tuesday August 31, 2010 @10:12AM (#1649423)
Technology changes fast. So fast, that now days the most effective strategy is not to know everything, but to know how to find relevant docs efficiently. Of course you also need basic skills for understanding and using them properly.. Now that, comes from experience.
Re:How often do you "Google" while programming? by jwdunne on Tuesday August 31, 2010 @07:54AM (#1649068)
I google all the time at work. Hell, I google all the time at home and 90% of the time it's about programming in some way or form.

I think Google is one of the greatest and most useful tools in my very meager toolbox.

Re:How often do you "Google" while programming? by spooneybarger on Tuesday August 31, 2010 @03:10AM (#1648695)
It is like reaching for a reference book albeit, perhaps one that is less edited. Reference books exist for a reason... to reference.
Re:How often do you "Google" while programming? by zengr on Tuesday August 31, 2010 @03:12AM (#1648702)
But, the old way of referencing is using an index, so I think I should go to javadocs and look for the method and not search for "how to do xyz+java"
Re:How often do you "Google" while programming? by rcfox on Tuesday August 31, 2010 @04:16AM (#1648782)
Why on Earth would you limit yourself to the old way of doing things? You're not recreating a war; you're trying to get stuff done.
Re:How often do you "Google" while programming? by spooneybarger on Tuesday August 31, 2010 @04:00AM (#1648763)
That is a mighty limited concept of 'reference' you have. Reference books are books you refer to when you want to know how to do something. Build a deck, grow orchids, how to do xyz in java.
Re:How often do you "Google" while programming? by gojomo on Tuesday August 31, 2010 @04:48AM (#1648821)
But don't you jump to the right class javadocs via a well-tuned Google search?

(I've probably queried some variant of [java Pattern 5] hundreds of times to look up Java regex syntax. It's odd to see that the Sun Javadocs have now dropped from the rankings for this query with the Oracle re-domaining, and now some Columbian University mirror is the top hit.)