I’ve encountered this many times where I simply don’t understand the context and use of an API based of the API documentation unless I can find an example that already utilizes it in a working project. The first thing that comes to mind is Py Torch. I’ve tried to figure out how some API features work, or what they are doing in model loader code related to checkpoint caching but failed to contextualize. What harebrain details are obviously missing from someone who asks such a silly question?

  • andioop@programming.dev
    link
    fedilink
    English
    arrow-up
    8
    ·
    4 months ago

    How do I get better at understanding API docs without a tutorial to walk me through the basics of how the library works in the first place? Once I have an idea of some of what the library does and how a few commonly-used functions work I can somewhat handle the rest, but getting to that point in the first place is pretty hard for me if no getting started or tutorial section exists. And so I’m very intimidated by a lot of libraries…

    • grandma@sh.itjust.works
      link
      fedilink
      arrow-up
      4
      ·
      4 months ago

      If there’s no getting started section I usually go on GitHub to see how other projects use the library or API.

      Reading the API docs with no prior knowledge or context is hard unless they’re very well written.