4 ms·
Sure, nothing is, but where you draw the line? And why would you implement something again when you are unlikely to do it better, or even have time for it? And
by kreetx 1y ago
Sure, nothing is, but where you draw the line? And why would you implement something again when you are unlikely to do it better, or even have time for it?
And of course, if you're doing just recreational coding to learn something, or if what you need differs from what is available, or the available thing seems sketchy somehow, then you'd write it yourself (if it's feasible). But for most things where what you need is clear and unambiguous, I don't see why you'd invent it yourself. For an established library it's unlikely that you'd do any better anyway.
(And again, if it's recreational what you are doing, you want to learn and have a hobby, of course, do it yourself. But in that case, you aren't actually looking for dependencies anyway - your goal is elsewhere.)
- whstl 1y agoOne should draw a different line depending on the situation. That's where the engineering comes in. There is no silver bullet. We should still be suspicious and judicious about every single dependency.
- kreetx 1y agoSo with infinite resources it would be best to write everything from scratch?
- whstl 1y agoThis is not a black-or-white situation. There's no need to only go to one extreme or the other.
- kreetx 1y agoYou have made your normative assessment very clear, but I haven't heard of where and how do you draw the line. EDIT: Can't post any deeper, but the child can see that no such "statements" have been made.
- the__alchemist 1y agoPlease re-read his or her replies. I will (re) state it explicitly if you don't see it, but I believe you will find it.
- the__alchemist 1y agoThe explicit re-statement: There is no general line to draw of whether to use a dependency, or write code internally using a language's primitives (Or already-used libs); it varies based on the situation, and there is a high degree of subjectivity in each of these choices.
- kreetx 1y agoSo what do you subjectively consider when making this choice?
- the__alchemist 1y agoSome examples: - How much work would it take to implement and maintain this if done without a library? - What other libraries are available? - Does this library meet our needs superficially, or will it be a robust solution long-term? - When our requirements change slightly, or we need to add or change features, will this library still work? - How much code architecture needs to change to integrate this? Does it require changing other parts of the program that it seems should not be required to change for the reason we are bringing this in? - What impact does including this have on binary size and compile time? - What is the risk of security vulnerabilities? - Does this library have its own deep dependency tree? - Will this require continuous maintenance to keep it in sync with other dependencies? - Does this library require certain system dependencies to be installed that will make the build more fragile / less portable? - Will using this dependency impact performance over implementing manually? (Or over another dependency)
- kreetx 1y agoA good dependency solves a well defined problem with a direct API towards it, so yes, if the dependencies you talk about aren't high quality then yes, don't use those.
- the__alchemist 1y agoReply to the child > So with infinite resources it would be best to write everything from scratch? Re-read the parent and the other replies: A critical point you are missing is your interlocutor's practical mindset in contrast to your idealistic one. This is about making engineering-mindset tradeoffs; they vary depending on the specific scenario. The answer to your Reductio ad absurdum is yes, but I believe that side tracks rather than elucidates.