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:

Is a programmer required to learn and memorize all syntax, or is it ok to keep handy some documentation?

Would it affect the way that managers look at coders?

What are the downside of depending on intellisense and auto-complete technologies and pdf documentation?

share|improve this question
4  
The biggest downside to relying on documentation is time - if you have to look up common things repeatedly, you're being very inefficient. But there's no need to remember every edge case of every obscure function, either. –  Bobson Jun 13 '13 at 18:33
    
If you can't program at all without auto-complete, I think you might not be really proficient in the language you are using. –  DogDog Jun 13 '13 at 18:35
7  
I'd much rather work with the person who looks everything up than the one who only thinks he knows how everything works. –  Tim Goodman Jun 13 '13 at 18:46
2  
If you are completing your projects, and your work is meeting requirements, is maintainable, and is exceeding expectations, you are a good programmer. How you got there - using/not using documentation - isnt very relevant. –  GrandmasterB Jun 13 '13 at 19:48
1  
Relying on the IDE to read and understand the code is where the real problems start. Write code you could read without it. Always. –  Erik Reppen Jun 14 '13 at 5:20
show 1 more comment

marked as duplicate by MainMa, gnat, Dan Pichelman, Dynamic, MichaelT Jun 14 '13 at 3:10

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.

5 Answers

up vote 19 down vote accepted

It is completely normal. Hardly anyone can say that he/she knows the syntax of every PHP or Java class, function or framework.

Your brain is better used for problem solving than for memorizing things.

Obviously you tend to memorize things you use in a daily basis but as soon as several month pass without doing that specific thing, you forget the syntax.

If remembering syntax was key in developing, computers would have already substituted humans in that field.

Using your brain for abstraction, imagination, problem solving and pattern recognition is priceless. For everything else, there's Master Card. (1)

(1) Or in this case documentation, auto-completion etc.

What you shouldn't definitively do is ask your co-workers every time you don't remember the syntax of something. That would be laziness.

share|improve this answer
4  
I would only add that you probably should have your core programming language memorized in its entirety, but rely on IntelliSense for things like library syntax, method overloads, etc. –  Robert Harvey Jun 13 '13 at 18:46
    
@RobertHarvey quick, what's the syntax to define a delegate and where can you put them? (I still have to look this up every 4 months when I actually do it) Not sure I agree with your point, but close to it... –  Jimmy Hoffa Jun 13 '13 at 19:11
    
@JimmyHoffa: Well, delegates are an actual Type, and they've been mostly supplanted by lambda expressions and anonymous types anyway. That said, I can never remember delegate syntax either. –  Robert Harvey Jun 13 '13 at 19:15
    
@RobertHarvey true, but every so often I'll define a delegate for a custom event signature. Moral of the story, given your answer you haven't memorized the delegate syntax either, what about generic constraints? Do you know all possible constraints off hand? Having memorized your entire language's features is unlikely, even for you and I who have lived and breathed this stuff for years. –  Jimmy Hoffa Jun 13 '13 at 19:18
    
@JimmyHoffa: There is some subset of the core language that can live in your head in its entirety. Clearly generic constraints is not part of that subset. :) Arguably, it's one of the lesser-used language features. C++ programmers are either super-human, or they gave up memorizing a long time ago. –  Robert Harvey Jun 13 '13 at 19:21
add comment

In terms of memorization, I think it's pretty crucial to have a solid knowledge of your language's core syntax. That does not mean, however, that you need to memorize the core libraries. For Java that's the JSCL, for C#/VB that's .NET, for PHP it's, well... that.

Anyway, point is, know your syntax, but not necessarily every class, function, and/or method. Knowing the syntax is like knowing grammar in english: you know how a sentence should be formed. Knowing the libraries is more akin to vocabulary. If you don't know a word, you can look it up pretty easily; you may not find the perfect word, but you'll find something suitable. If you don't know the grammar, you're going to have a much harder time getting a message across clearly and correctly, and a much harder time looking up what you need when you need it.

share|improve this answer
3  
+1 I like the analogy of the grammar. –  Florian Margaine Jun 13 '13 at 19:22
add comment

Is a programmer required to learn and memorize all syntax, or is it ok to keep handy some documentation?

No and yes. Programmers who can't learn new things from documentation are crippled. They can't solve new problems. All they can do is cut-and-paste code that someone else has written. I prefer programmers who read documentation, because they know enough not to reinvent existing library functions. In hiring, I rarely care if the candidate has any experience with our current implementation language. We may start using a new language any day now, so I want people who are happy to work in multiple languages.

Would it affect the way that managers look at coders?

No, except for a subset of measure zero.

share|improve this answer
add comment

I'm going to tell you a story.

Up until about May 30th 1999, John Carmack did not know that scissor test was not enabled by default in OpenGL.

The next thing is sort of funny. I had been suspecting that a lot of the OpenGL drivers were clearing the entire depth buffer for each of the 3D icons on the status bar, instead of limiting it to the scissor region. I added code to the g200 driver to explicitly crop the clear region in the driver, but it never got executed. A little more investigation showed that I had been making an improper assumption for years -- scissor is not enabled by default. Doh.

Finding this out came to him totally by accident, in the context of doing something else, and gave his code a fairly nice performance increase (given that he works in an area where performance is hugely important, this is worth noting):

Now I know that I was just being an idiot about that for the last three years... With scissor enabled, most of the cards got a few percent faster.

It's also worth noting his self-awareness here: "I was just being an idiot about that for the last three years".

Now, if he had read the documentation ("The test is initially disabled"), he would have been aware that scissor test was disabled by default and would not have made that mistake.

Is this a case where reading documentation would have made John Carmack a bad programmer? Is this a case where not reading documentation made John Carmack a better programmer? I don't think I need to answer those questions.

As for intellisense, it's important to realize that intellisense is a productivity tool, designed to save your time. You type "." or "->" and up pops a list of members, you type the first few characters of the one you want, and hey-presto! That's your precious time it's saved, it may have also saved you breaking a build owing to that supid typo you made because you hadn't had your coffee yet, and you've now got more time to get on with doing productive stuff instead of just grinding out code.

Intellisense is not designed as a crutch for bad programmers, it's an example of what Fred Brooks calls a "Sharp Tool".

By the same logic that one may dismiss intellisense, one comes to the obvious end conclusion that any tool designed to increase programmer productivity is also something that may make one a bad programmer. That's a dangerous line of thinking because next thing you'll be rejecting compilers and debuggers.

When I was back in college last century, one of my lecturers told us that "the best programmers are lazy". That's very tongue-in-cheek, and what he meant was that the best programmers find ways to maximize their productive time and minimize time spent doing donkey work. I still think that's good advice today.

share|improve this answer
add comment

No way; on the contrary, it makes you a way better programmer since they are productivity tools, and programmers using them makes a program faster/better. The purpose of the programmer is to make a program not to know how a library or framework has some methods or classes called.

A programmer doesn't necessarily need to know the syntax of a language; but in someway it obliged to know it since the modern IDE immediately alerts him/her if something is wrong, so s/he will definitely learn it just to stop the IDE prompting error messages. I really cannot imagine anyone programming with red underlines under some words, before solving the issue. Regarding the utility of a library s/he should know only that a library can perform a certain functionality and eventually s/he will find a way to use it.

I can say that code completion really helps a programmer to find new functionality of a given library. Any good library is based on abstraction - interfaces. Suppose we have an interface Sort that is supposed to perform some logic of sorting; now this logic can be performed in some various ways but I as a programmer don't know what the given library can really do with it. So I type Sort sort = Ctrl+Space and immediately all the possible implementations appear (I have really discovered new things about many libraries in this way). Among the implementations QuickSort appears, but I don't really know so much about it so (in my IDE - Intellij) I press Ctrl+Q and I immediately see the documentation of the class, and I see how it can be used. Things go further as I might be interested how QuickSort is implemented so I press Ctrl+B and choose to download the implementation from Maven repository and I immediately see implementation code.

share|improve this answer
add comment

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