There are lots of other APIs I need to use besides the Selenium test tool to be able to get tests working. Not using them for just one week and the mind has lost all of them.
How is it possible to remember zillions of APIs?
Software Engineering Stack Exchange is a question and answer site for professionals, academics, and students working within the systems development life cycle. It only takes a minute to sign up.Sign up to join this community
Keeping the documentation (e.g. MSDN) open while using it and extended use (i.e. Practice) tends to force the API the memory in.
For example, I wrote a lot of jQuery daily at the start of the year and could remember a lot of detail from the API. I've not worked with it a lot recently, so I don't remember as much as I did, but if I used it for a few days, it would come back to me.
There is no super-human knack, it's just repetition.
If its not a particularly complex API, you may not have to remember all of it. I often skim reference manuals before programming with a particular API, and as I'm programming I'll remember a particular method name that sounds like it'd do what I want to accomplish. Then I'll look up that method name in the documentation to verify it does what I want.
This isn't the best technique. Hopefully if there is a better way to do something than the API bit you remembered, the documentation will mention it. But not always. As you practice this technique, you become more likely to form optimal solutions from the tidbits you remember.
I don't think there's any easy way to learn a new API of any sorts. Some APIs are clearly named and easy to learn while others are complex or just plainly badly written.
I usually hunt the documentation for a given functionality that might help me solve an issue. When I'm done reading, I reflect on the newfound knowledge and eventually write a test if I'm unsure of what side-effects a call might have, while letting me try out the API.
Hoogle to search the API docs! (very specific to Haskell)
Now, suppose I'm doing a map on a list, but I don't want everything to map to something. I can say, the type of a function that does this would be
[a] -> (a -> Maybe b) -> [b]
I type this in to Hoogle to get:
mapMaybe :: (a -> Maybe b) -> [a] -> [b]
Okay, so I reversed the arguments. But I found the function based on typing it, which is often more useful than searching the entire index for a function that looks like it would do what I want.
I can then click on the link to get to the documentation to make sure it does what I need:
The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it just Just b, then b is included in the result list.
Of course, searching docs by index and by module is another good way to figure out the API without memorization.
The Topmost / Leftmost / Most easy to reach bookmark on you web browser should be to the Java API docs, e.g. like this They are very thorough and, in most cases, well written. Between this and your IDE you can do most everything.
I am now learning node.js and Mongo, and have similar links to the node and mongoDB documentation, which isn't as nice but is still way better than nothing.