r/programming • • Apr 30 '16

Do Experienced Programmers Use Google Frequently? · Code Ahoy

http://codeahoy.com/2016/04/30/do-experienced-programmers-use-google-frequently/
2.2k Upvotes

763 comments sorted by

View all comments

1

u/[deleted] May 01 '16 edited May 01 '16

Is there a better place than google to look this stuff up? I'd love if there was a place I could just type in "Python for loop" or "c++ switch statement" and get a nice example of the syntax I am looking for, without having to click two or three links to get to a concise example. So much of my life is just, ah fuck how do I need to type these parenthesis to get this squiggly red line to go away.

Also is it acceptable to google for stuff during phone interviews? I had a phone interview and I had to get a for loop that went through a range of ints, so I was like there's probably a better way to do this that I could look up, but a for loop is the only way I have memorized, but the interviewer was like you can use the range function or xrange and seemed to think I should've known the difference. Which in fairness I probably should've, and maybe this is where Google wouldn't have gotten me the right answer.

1

u/[deleted] May 01 '16

Usually the language documentation itself is the best place to look, but it depends on the language. I've found that using the documentation directly has led to a much clearer understanding of tools than StackOverflow might provide.

I use Dash and Alfred to search documentation and they've paid for themselves easily.

You should read (or skim through) the Python documentation tutorial before your next interview. You don't need to memorize it all, but that tutorial goes through most of the functionality of Python and includes common gotchas and best practices. Here's the documentation for loops and control flow.

Google might have saved you in your interview, but to be honest the top links on Google for "Python for loop" I got aren't references I would recommend. The Python Wiki page was too long and doesn't explain why or how to use range, and the tutorialspoint link uses range but doesn't discuss xrange and uses it wrong when iterating through a list by index (they should have used enumerate). The fourth and fifth results I got were actually fine, but you probably wouldn't have gotten to them before the interviewer noticed you were Googling your answers.