4 ms·
I work arch in a modern TS Angular Client for a larger education org and I'm shocked by the number of amateur devs and external contractors who think the soluti
by agloe_dreams 3y ago
I work arch in a modern TS Angular Client for a larger education org and I'm shocked by the number of amateur devs and external contractors who think the solution for everything is 'just add a package'. Need to filter arrays in a pipe in one spot? Package. Paginate an array into a set of defined length arrays so you can do faux pagination in the ui? Package. Need a button of the design in our design system? Material UI and a hell of a lot of CSS, here we come!
I basically act as a middleman whose job is 'THIS IS A ONE LINE PIPE!'
- thefounder 3y agoPerhaps that's also due the lack of a proper standard library like every other language on this planet has.
- ljm 3y agoAnd back in the day it was necessary because there weren't polyfills and there weren't build tools. Nowadays your JS is being run through Typescript or some other JS bundler and it's converting your code into something every browser can support. If you're still using Lodash or Ramda or whatever it's because the standard library isn't quite as expressive as they are sometimes.
- paulddraper 3y agoNo mainstream language has a built-in GUI utilities. (Except Java....maybe.)
- throwawaymobule 3y agoI think tkinter is included with Python, but other frameworks are more popular. I struggle to think of any others.
- jasmer 3y ago[dead]
- thephyber 3y agoI frequently push back on these complaints. Does the library you pulled in to manipulate an array polyfill newer array prototype functions? If so it likely fixes issues in older browsers. Does the library get tested by a much larger QA / QE user base than your ad hoc code? Importing a library might benefit you from not having to reinvent the wheel. Does the library have unit tests and documentation? That is likely less work for your team to deal with bugs and maintenance. In practical terms, I doubt I have ever written a line of code that nobody else in the world has written. In that sense, I know that my value to my company is to judiciously choose when to write code in-house and when to import. And the heuristic is way different than what you describe.
- quickthrower2 3y agoThe nuance is: how much do you trust the package owners and their transitive dependencies to be: Secure Performant Non breaking etc. I would hesitate to import a package for a one liner (a left pad for example) but happier to import a decent bunch of battle tested utils (date-fns, underscore, etc.) Since each dep is a political org you need to trust, so I wanna get a decent amount of problems solved with that dep not just save a line of code.
- agloe_dreams 3y agounderscore is actually our latest casualty in the new tool. It is now generally recommended to do array functions using standard JS if your product system reqs mesh.
- thephyber 3y agoAgree that every dependency is a new org to trust. I’m very interested in ways to identify high quality+security libraries and orgs. Simply saying “I am willing to rewrite everything from scratch” doesn’t work. Finding the best way to work with the existing ecosystem is more or less a requirement for most companies/projects.
- agloe_dreams 3y agoI definitely think my comment lacked a bit of nuance that may have come off as a blanket statement, sorry about that. My focus was on the types of poorly thought out package choices without the very care you are explaining. We would never reinvent rxjs, most tailwind plugins, or a key example of what you are explaining: Angulartics2. But on the other hand, my example here is closer to some packages that have zero user base or are, in themselves, a reimplementation. The angular Material example is that we already have a design system with buttons that is heavily documented and tested, it would have been less work than dealing with the package to just read the documentation or ask questions.