top | item 14051769

(no title)

d0vs | 9 years ago

It baffles me that all those JS physics library never provide proper docs or even an API reference and always link to the C++ Box2D manual as if it was an acceptable alternative. Always have to guess what the JS equivalent is but even then you're in for a surprise: https://github.com/shakiba/planck.js/blob/master/CHANGES.md

discuss

order

munchbunny|9 years ago

I'm guessing it comes down to "writing docs takes lots of time, and when you're a lean operation priority goes to making stuff work."

I'm sure once the project matures it'll get a documentation pass, but the project is quite young.

franciscop|9 years ago

As a dev of an unrelated lib who cares about making good documentation this is a really valuable comment; I'm guilty of doing this partially for example in https://github.com/franciscop/drive-db where I link to MongoDB platform for the more advanced selectors.

In my experience good documentation takes around 3x-5x of the time of writing the code (excluding tests and tutorials), so while I hate seeing libraries without a decent documentation I totally understand it.

Edit: also it is in alpha, where writing documentation many times backfires you and you have to remove large pieces of it wasting your time.

moron4hire|9 years ago

I've found writing documentation and trying to explain to others why the API is the way it is frequently makes me completely reconsider and redesign the API to be better. So no, you really should start on documentation right away, because what you're calling "waste" right now is a feature.

shakiba|9 years ago

Those are changes to internals, there are only few API differences which are explained on readme page. Anyway, I agree with you, a new API doc would be very helpful.

RodgerTheGreat|9 years ago

On one hand, I agree with you that linking to the documentation of another library, in another language, isn't very helpful. On the other hand, it's an open-source project. It has to start somewhere, and referencing the original docs is better than nothing. If you've looked at a variety of libraries along these lines and found them lacking, perhaps you're an ideal person to contribute better docs to this project.

abetusk|9 years ago

For me, an example is worth 10 pages of documentation. The documentation is good for reference but only after you understand the ideas behind it.

One of the biggest criteria I have for using a library is whether they have a rich set of examples to draw from.

fdsfsafasfdas|9 years ago

Conversely, after the initial struggle getting the ideas behind it, examples are worthless and documentation is king.

franciscop|9 years ago

Good documentation has tons of examples! For me the gold documentation is jQuery. When I didn't know enough JS the beginning was cryptical but the examples below made it, when I was experienced I could just read the beginning for the footprint.