I’ve been planning to write a blog post about this for a long. Building small, focused modules/package means reusability and makes it possible to build larger, more advanced apps.
As stated by Douglas McIlroy, Unix programs have always been expected to follow the concept of DOTADIW
.
Do one thing and do it well.
Some people are obsessed about the LOC (Lines of Code)
. You shouldn’t care about it. It’s not the key to modular development. All you need to know is how to use the Lego blocks to build a castle. But even Modularity is a powerful concept, but like anything else, it’s not a magic stick.
One programmer broke the internet
There was a situation in 2016. A man named Azer Koçulu broke the internet by removing just a micro-package named left-pad
. Because many projects use it as a dependency. The impact of these was large as it was being used in numerous very popular projects like Babel, Atom, React, etc.