-2

Suppose I have a problem to solve, which necessarily involves using a library (but not a specific one). How can one ask for help with such a problem w/o it being closed as being off-topic? If it can't be on SO, where can one go for help with such a problem?

(To make this concrete: I'm looking to accomplish something in Javascript which can be done in Python, and probably other languages, with the right library.)

5
  • 9
    Ask "how to do X, with Y, under Z constraints", not "what library can I use to do X".
    – yivi
    Commented Mar 17, 2020 at 14:34
  • 2
    If it can be done without a library, wouldn't you want to know? ECMAScript has come a long way... Commented Mar 17, 2020 at 14:37
  • 5
    In (browser-side) Javascript, every library necessarily can do exactly the same as pure Javascript can. So, this is answerable without a library; a library just might make it substantially easier.
    – deceze Mod
    Commented Mar 17, 2020 at 15:20
  • While there might be a duplicate for this question, the currently selected duplicate is not a duplicate of this question. That dup-target question is about the specific issue of resource requests which are looking for official sources.
    – Makyen Mod
    Commented Mar 17, 2020 at 22:14
  • Reopen reviewers: check the answer, too. It provides some context.
    – S.S. Anne
    Commented Mar 17, 2020 at 22:37

1 Answer 1

3

Requests for help with code or how to solve a problem with code that has specific dependencies are on-topic; only requests for library recommendations are off-topic. Thus, if you have a question about how to do something with Bootstrap or with jQuery, for example, that's... a perfectly fine question to ask, so long as you include a Minimal, Reproducible Example.

If you want to know how to do something with a library, but aren't already using a library, then simply asking for answers that only use libraries doesn't pass the smell test for me, personally. You need to have a very good reason why the answer has to use a library if you aren't already using it. Typically this would be a scenario where you're asking a homework question, and your teacher has set out requirements for you. As mentioned above in the comments, in such cases you need to explicitly detail all the constraints around your expected task. Additionally, for homework, you need to show some kind of attempt at the effort already.

And if you are in a job where your boss demands that you "use a library. Any library!" and they are just one of those bosses that doesn't understand how libraries (or programming) work, you can just use the Vanilla.js library (which is an empty library), and implement your code in plain JavaScript. By definition, of course, a library can only do things that the language itself can do. It just adds a layer of abstraction in an attempt to make certain things easier.

2
  • "By definition, of course, a library can only do things that the language itself can do" this is true only for standalone source-code based libraries (which is the case for most browser JavaScript libraries)… There are plenty of cases where language specific part of "library" is just an interface to code that is implemented in some other language. I can imagine it can be the case for JavaScript too with web assembly for example. Commented Mar 17, 2020 at 20:10
  • @AlexeiLevenkov I would probably hesitate to call it a <language> library if it does things in another language besides <language>. Maybe a bridge utility or wrapper or possibly even a shim, but not a library.
    – TylerH
    Commented Mar 17, 2020 at 20:49

Not the answer you're looking for? Browse other questions tagged .