http://tstzmgqansvqfzr3qrkehszmlhjqbpqp7pwncrzr72ohyygrnbuu26qd.onion/articles/choosing-dependencies
The second question is probably the most important, could skip it for throwaway scripts but well… temporary sometimes spans for a very long time. Note: I tend to consider not just libraries but also utilities, buildsystems, language implementations as part of the dependencies.