3 ms·
Too many devs don't understand that dependencies add fragility to a system. The larger and more complex a system you design, the more likely it is that you end
by cogman10 7y ago
Too many devs don't understand that dependencies add fragility to a system.
The larger and more complex a system you design, the more likely it is that you end up with something breaking because two dependencies are incompatible or even your code and a dependant break due to updating the dependant.
Further, security is rarely considered. The more code you have, the more likely you are to have a security vulnerability. You have to worry not only about code you maintain, but also the code of your dependencies.
If you can write the functionality you crave rapidly, do it. You'll save yourself (and others) headaches in the future.
- jonnycomputer 7y agoOr worse, the developer gets bored and stops supporting the project, and it stagnates until it breaks everything else. VisionEgg I'm looking at you.
- caymanjim 7y agoExcept that happens far more often when you roll your own code internally. For anything of even moderate complexity, only the author will know how it works.
- clarry 7y ago> For anything of even moderate complexity, only the author will know how it works. I think that's as much true of external dependencies as it is of ones that you wrote for yourself. With the exception that your own solution is probably smaller, much smaller, because it only ever needed to solve your immediate needs and not everything else a third party had to deal with. So it's quite possible that the internal solution is more approachable when the time comes to debug it.
- deleted 7y ago[deleted]
- hinkley 7y agoIf this person is bad at knowledge transfer, they end up being the only expert and thereby gaining status for having done so, when objectively this should cost them status instead.
- hinkley 7y agoInternal people do this too, but often don’t have the stones to admit they got bored. Instead they victim blame and try to prop up their status as the smartest person in the room. Personally I’d rather be mad at someone I’ll never meet. It makes meetings a lot more pleasant.
- speedgoose 7y agoI am sure some developers are very good at their job but the average developer like me write more bugs and security issues than a popular and maintained dependency can have. Moreover, it's getting quite easy to maintain dependencies today. I can think about packages lock files, Docker containers, semantic versionning, or even Github sending me alerts and pull requests when a security vulnerability happens. I prefer to add a good dependency and having to deal with it rather than writing broken code and fixing it later. Of course I'm not talking about a 5 lines dependency, but real features.
- tasogare 7y agoDependencies are not always visible, especially transitive ones. Illustrative anecdote: this Friday I copy-pasted a little snippet of HTML/CSS code from an existing (and shelved) project. I've noticed for some time an icon in it wasn't displaying anymore, but this time I really needed to fix it. Turned out that the glyph icon where from a font used by Bootstrap, which was not available freely anymore. Bootstrap (my direct dependency) had itself that third party dependency that I thought was part of it. When they pulled the plug, my code broke. I'm more careful about dependencies than I was a few years before. Often, if a peripheral thing can be done in an "ugly" way but allows me to avoid an external dependency, I'll wrote code myself.
- hinkley 7y agoAdding anything to a system increases the fragility of the system. “My point today is that, if we wish to count lines of code, we should not regard them as 'lines produced' but as 'lines spent': the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger." - Djikstra In an age of public bug databases and Stack Overflow, it’s pure ego trip to think that your handwritten solution is going to be better than an OSS solution or stay that way. If you reached for hand-written once, you’ll probably reach for it again and again and the older bits you wrote will be eclipsed by progress on those libraries. I’ve seen it many times before, I’m living it right now. It’s vendor lock-in with you as the beneficiary. A sports coach would call you a Ball Hog. Let other people play. You can run a perfectly respectable project with about 10% “special sauce”. That includes the bits that simply nobody has, and the exceptions to my advice above. You can sustain a small number of hand written replacements on par with existing libraries. And the team can absorb the Bus Number effects of that much code. And “about” means “about”. If you are less, a competitor might steal your lunch. If you’re higher, you should be reflecting on why and asking if you really do still need all this stuff. Maybe that library you looked at before finally got the feature you needed.
- zimpenfish 7y ago> If you can write the functionality you crave rapidly, do it. Let's take the example of someone who wrote their own Perl ORM and Object Model then. > You'll save yourself (and others) headaches in the future. Or it'll hamper development on the system when you leave because nothing works how people expect, it's too complex for people to pick up and modify, and trying to do anything with it causes the entire structure to creak because it's EVERYWHERE.