4 ms·
I often find myself feeling the same way about using gems in ruby. It's amazing how quickly I can get something extremely functional built out by adding a handf
by Eclyps 11y ago
I often find myself feeling the same way about using gems in ruby. It's amazing how quickly I can get something extremely functional built out by adding a handful of gems, but after a few months I look back and realize how much extra (invisible) code I've added when I really just needed a tiny sliver of the functionality provided.
- jerf 11y agoWithout comment on its rightness or wrongness (because I'm still ambivalent myself since I've never personally been really bitten), it's been amusing watching some people in the Go community who have come from Ruby or Node who get really behind the idea of not importing little libraries for one or two functions. There's a lot of people who, if they see a little function that, say, computes a standard deviation in the middle of sixty other statistics functions they don't care about, would rather copy & paste the function into their own code than add an external dependency. (Hopefully they attribute it properly and watch the license.) Perhaps some of them take it too far, but it's at least an interesting perspective, in light of stuff like the post and your experiences in Ruby. I do agree in general that you have to be sure to consider the external dependency as a cost, and the benefit you get for it better outweigh the costs. Exactly how you determine that varies from language to language quite substantially, and probably varies by personal taste and experience level too. For instance, you might be less inclined to take an external dependency for something you find quite easy to write yourself, whereas someone not as skilled may find it preferable to take the external dependency if it means they don't have to learn the nuances of whatever it is enough to write it themselves.