views:

60

answers:

3

I am recently working on the open source library openmetaverse which is designed as an open source substitution of second life viewer. I think the problem is that it is not well documented. Sometimes, I just misunderstand the API when I really used it in real program which is very annoying because sometimes you need to write many code. But how to make sure the API just acts the way you expected? So what is your way to learn new API without good documentation?

+1  A: 

If it's an open-source library, you may want to try examining the source code for various functions in the API and seeing if you can figure out how it works from that. There may even be comments in the code that explain things the sparse documentation does not. Failing that, you could look around on the web and try to find examples of the library in use, and figure out what the various functions of the API do that way.

JAB
+2  A: 

Unit testing the open source library API should be the best way to learn it.

number5
+1 Speaking from experience this is the best way.
ponzao
+1  A: 

I would encourage you to use sample programs which would demonstrate the ideal/practical use of the API. Also, examine the work flow of your applications and the needs it has and may potentially have - knowing what awaits you is critical in allowing you to find relevant information.

If you have the source code to the library, I would also attempt to generate the UML diagrams (or any relevant visualization) to see how the library works among itself.

Learning a library with limited documentation is not an easy task, but if you have your goals written out, some demos of the library, and a descent understanding of how the library works on the inside you should be able to find clues much faster and more efficiently.

Kaa