Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Are you afraid of dependencies?

Are you afraid of dependencies?

Glen Mailer

July 20, 2017
Tweet

More Decks by Glen Mailer

Other Decks in Technology

Transcript

  1. Rando on HN https://news.ycombinator.com/item?id=10571452 “This is why developers should try

    to avoid introducing dependencies. Not at all costs, of course, but typical project in JavaScript, Go, Ruby, or Python has way, way too many dependencies, while little of them have any significant benefit.”
  2. Prominent Clojure community member “The ideal number of dependencies for

    a library release (not counting Clojure itself) is zero. Obviously, use common sense. If your library relies on critical functionality in another library, then make the dependency. But if you can get by without the dependency (even if that means copying some of those "utility" functions into your own code and making them private) then you will make life easier for consumers of your library.”
  3. Manifest of things to depend on A version for each

    thing Download from some central location Will pull in dependencies-of-dependencies aka transitive dependencies Arrange artifacts suitably for runtime module loading
  4. Global v Local Test v Dev v Real Package/Import symmetry

    Vendoring Snapshots Ranges Lockfiles Do Applications need versions? X Replaces Y (props to PHP's composer)
  5. Pick a version of D for you 1. Your app

    might work 2. copy-paste from C 3. upgrade B to work with D@2 4. don’t use C, write your own thing
  6. Tell you it can’t resolve 1. Tell it you know

    best 2. copy-paste from C 3. upgrade B to work with D@2 4. don’t use C, write your own thing :pedantic? :abort
  7. Allow both to co-exist 1. Your app might work 2.

    copy-paste from C 3. upgrade B to work with D@2 4. don’t use C, write your own thing
  8. Less time spent keeping up Lowered cost of creating dependencies

    Smaller dependencies Less reasons
 to change Less changes