Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question already has an answer here:

I just came from an interview in which they asked me several questions about programming and problem solving. Regarding the programming questions, I asked them to let me Google so I can see the code (I quoted that logic is the thing to learn, not the language). At the end of the interview they told me that my skills very good but what would I do if Google has been blocked around our country(It can happen in Pakistan, Youtube is yet blocked). Is it really that a programmer should know the code too?

share|improve this question

marked as duplicate by gnat, Martijn Pieters, Kilian Foth, MichaelT, GlenH7 Mar 22 '13 at 18:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

4  
Googling to help find solutions? Good! Googling for pretty much every line of code you write? Definitely Bad! Yes, programmers should know how to code. –  Joachim Sauer Mar 22 '13 at 7:36
    
If you're just looking up API calls which are internal to the language or the libraries you're using, I'd recommend downloading this documentation to your work computer. Using reference material for anything but basic calls seems reasonable behaviour. –  Alison Mar 22 '13 at 8:08
    
Are you talking about syntax for a language you aren't familiar with, and library calls? Or are you talking about something else? You need to have a basic knowledge of the language you're using - it'll slow you down otherwise. –  lunchmeat317 Mar 22 '13 at 13:18

4 Answers 4

You should be able to develop algorithms without the IDE and definitely without Google, and without help.

In terms of solviing simple problems I would say yes.

The only thing you should rely on research is complex problems, and particularly learning new developments and frameworks.

I used to be able to code in VB3 when I was 12 with no internet, no intellisense. I consulted help when I needed to.

With that said, I wouldn't appreciate an applicant Googling to find an answer for a sort algorithm or for a simple structure such as a list or queue.

share|improve this answer
1  
+1 for without an IDE. You shouldn't need intellisense to write bubble sort... –  tjameson Mar 22 '13 at 8:19
2  
Yeah well, I remember those days as well. Reading old paper manuals to find stuff took ages and ages. Most of us don't want to do it that way anymore. –  Martin Wickman Mar 22 '13 at 10:18
2  
@tjameson you shouldn't write a bubblesort. –  Pieter B Mar 22 '13 at 12:44
    
@PieterB - I was going to say qsort, but it's both relatively tricky and provided by default. Stupid example, I know. –  tjameson Mar 22 '13 at 18:10

It depends on the situation.

Personally if I were an interviewer, I would tell the candidate that they are not allowed to Google, but pseudocode is fine as long as it is sufficiently detailed that I am convinced that it could be translated directly into a real language.

However once you've actually typed in enough code, you're unlikely to need to refer to Google for how to write basic code. Unless, possibly, you're used to having an IDE type for you.

share|improve this answer

I see no problem with that as long as you know you could eventually solve it on your own.

Googling for snippets of code is just a way to find a solution quicker than if you have to do it yourself. Besides, it's rarely the case you find some code that is exactly what you were looking for -- in practice, you always have to change it anyway to suit your problem at hand.

Also, Googling for solutions "just for the heck of it" is a great way to learn new stuff and approaches. Even though your solution certainly works, there might be other, more elegant ways to solve it.

We're not living in the dark. Use whatever tool you have at your disposal!

share|improve this answer

It depends on what you google for.

  • You should not need to google for basic algorithms and logic. If you cannot come up with the basic logic to solve a problem yourself, you have a problem.
  • You may need to google for complex algorithms or for getting an idea how to approach a complex problem. There are many intelligent people out there attempting to solve complex problems using heretofore non-existent algorithms, there's no need for you to have to do the same thing from scratch; benefit from the existing work done by others.
  • You should not google for basic syntax questions. You should know your language of choice well enough to be able to write code without help.
  • You may look at the manual for specific API details. Nobody can be expected to keep the exact parameter order and behavior for every possible functions and method in one's head. You should not google for this, you should be able to go directly to the relevant manual page.

Specifically in an interview, if you're expected to be able to solve a particular kind of problem in your head and you're not able to, then this probably means you do not have enough experience required for the job. If you can do it in pseudocode but would need to look at the documentation for specific API calls, that's fine IMO.

share|improve this answer
1  
"Look at the manual" But stack overflow is often better than MSDN, and Google can tell me when. I don't see the problem for using Google as the index to the manual. –  Philip Mar 22 '13 at 16:11
    
@Philip Sure, if your manual of choice has awful search/index functionality, go for Google as your index. I meant that you should not just randomly google around for random code snippets on 3rd party sites. –  deceze Mar 22 '13 at 16:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.