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.

I found my self often paused to check a certain usage of one core API when writing either javascript or Ruby. I am wondering how the other guys doing? Is it necessary to remember every Core API usages?

It the answer is yes, how did you guy do it efficiently?

share|improve this question
3  
You'll remember the ones you use all the time, but don't think that people remember every single thing about APIs. Even the most experienced people need to consult documentation. –  birryree Apr 3 '12 at 4:50
    
@birryree would you spend time just memorizing the API calls and returns? –  yangchenyun Apr 3 '12 at 5:58
    
No, that would be pretty pointless for me because I tend to forget some details if I don't actively use things. If I use it a lot though (like a common C++ library or Python standard library or Java API, etc.), then I'll pretty much remember all those details, save for some doc reading time to time. For things I rarely ever use, like OpenGL functions, I will spend more time looking through the book and documentation when I do have to use it. –  birryree Apr 3 '12 at 6:27
    
Good point to let the 'natural selection' process to work the thing out~ THX. –  yangchenyun Apr 3 '12 at 12:14

5 Answers 5

Don't remember the actual API details. Remember where to find the API details.

share|improve this answer

Yangchenyun, whenever I hear remember or memorize in a programming context, my alarm bells start ringing.

You need to understand what a certain part of the API is doing and what concepts the API is based on. Then the fact that the API is able to do a certain thing will stay in your head automatically, even if you don't have all the details present in your head at any time.

After that Mad Keith's and Geerten's answers will kick in.

Just keep programming in your language of choice and your API knowledge will increase automatically.

share|improve this answer
2  
+1 because understanding is important, though I'd actually reformulate it - the hard part isn't the API syntax or details, it's coming up with the right idea in the right way, after which using the APIs is just filling in the blanks (gross oversimplification). –  Joris Timmermans Apr 3 '12 at 9:15
    
@Raku Thx. What bothers me is that when I focus on the problem at hand, I constantly find my self refer back to find the API usage - what type does this method return? What class does it belong ? I wonder whether others does the same thing or they just have everything API usages memorized. –  yangchenyun Apr 3 '12 at 12:11
1  
@yangchenyun Don't worry, it's normal. In the beginning you don't know all the parts of the API, but your knowledge will increase over time and you won't have to look up the exact syntax all the time anymore. –  Raku Apr 4 '12 at 9:23

Most important is to learn the idioms and conventions of a particular framework / API. I'm a .NET developer and because of the consistency across the .NET Framework class libraries, I can pick up entirely different parts of the framework in very little time, because I understand the idiosyncrasies which permeate the entire .NET ecosystem. I would imagine the same is true for the Java universe, although perhaps not for more fragmented environments such as PHP.

share|improve this answer
    
Dou you mean knowing the underlying working mechanism? Vote up for that. –  yangchenyun Apr 3 '12 at 12:13

You're not going to be able to magically acquire and retain all of the API documentation for a language. I think it is a pretty natural progression when starting something new to just dive in and start working on it. During the process, you'll run into errors or need a function that you don't know the name of, and you'll look it up. Ruby's documentation (for example) is pretty fast to navigate.

It may be something that you only have to look up once, and after that, you've committed it to memory. Other things you may need to solve a problem, and you will never use them again. As your documentation grows, you should not be looking at the same things over and over again - you should be exploring new parts of the documentation and growing as a developer.

share|improve this answer

I don't think it's necessary to remember the API details, but more the global API structure and setup. Be sure to know how things are structured, so you know what to look/search for when you need the details.

This way you will always find what you need after one search on the web.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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