4 ms·
I always get an uneasy feeling when this is not (practically) possible. Whenever I add a dependency to a project I will at least skim through the source to get
by tobr 9y ago
I always get an uneasy feeling when this is not (practically) possible. Whenever I add a dependency to a project I will at least skim through the source to get an idea of what it is I’m adding, and it pleases me a lot when a library is well written and self contained enough that this does not mostly leave me confused or overwhelmed.
There’s a similar reason why I have such mixed feelings about some build tools and compilers, especially in the JS world - the output is often hideous and so unlike what a human might write. I know you can say that what the output looks like doesn’t really matter, as long as it works as it should. But it just makes it so much harder to feel confident that it actually does.
- icebraining 9y agoThe output of gcc and clang probably don't look much like hand-written machine code either, though. Or, for that matter, the output of V8 and SpiderMonkey. You can't avoid the compilers :)
- tobr 9y agoOf course! I’m not saying it’s rational. If I had experience hand-writing machine code maybe I would feel the same about that...
- khedoros1 9y agoI've done bits of assembly, but I've also studied compilers. They felt less magical to me when I learned some of how they work. Then again, I'm primarily a C++ developer, so I'm used to the output of my build tools being non-trivial to understand.
- deleted 9y ago[deleted]
- akvadrako 9y agoThat's one reason rollup is better than webpack; the output looks almost hand rolled.
- andrewaylett 9y agoWhat frustrates me about the JS world is that all too often, what you get from NPM is the output, not the input. Maven might not be universally loved, but you do at least get to navigate through the original Java source and stand _some_ chance of finding what you're looking for.
- thiht 9y agoI don't follow, the code in node_modules is readable and allows to navigate through the original sources. Is it not always the case?
- bsimpson 9y agoI think they're saying that code on NPM may be written with a bunch of experimental Babel features or in some niche language like Elm, and then translated to vanilla JS. In those cases, you might find code that's been machine translated or minified in node_modules, not the original source.
- andrewaylett 9y agoExactly :).
- hinkley 9y ago> as long as it works as it should. Maybe confirmation bias, but I can’t think of a single library where this stayed true for the entire life of a project. Software is written by humans. “To err is human. To really fuck up requires the aid of a computer.”