
Ask HN: Minimum size for a library - haikuginger
The size of libraries range all the way from single tiny functions like left-pad to massive frameworks like Django and Rails. How large do you think a library ought to be in order to be publishable?
======
crosbyar
I like to follow a rule of thumb I learned at a SciPy Conference a few years
ago: whenever possible pull out functionality into separate modules. I think
the GNU program mantra of do one thing and do it well applies. From a
philosophical standpoint, I like the simplicity of the standalone left-pad
library.

It is not always possible though, like in the case of Django: part of the
appeal is the single batteries included framework for getting something up and
the subsequent relative standardization of code bases that implement it.
However, I tend to use 'flask' for its flexibility/modularity and simplicity
especially in the context of simple data oriented services.

Scipy itself is a good example of a monolithic library that I think makes
sense as a single module, since people using some of the functionality are
much more likely to need other bits of scipy in the same code, and there are a
lot (or at least some) of inter-dependencies within the scipy routines that
make it largely more efficient for developers to keep it all together.

In the case of matplotlib, which lacks a native Geographic projection
functionality. Multiple plugin modules have been developed to support that
functionality, both with different approaches and features. If this had been
an included feature to begin with, we wouldn't have the innovation and choice
in different solutions that exists now.

