A lot of things on the internet broke this week when npm (node package manager) unpublished the
Look carefully at your dependencies
Since reading Patrick’s post about Libraries last year I’ve become (ever more) obsessed (than usual) with minimalism in code, trimming things down to just what I need, killing my dependencies and simplifying things as much as I can.
The left-pad modules feels like a good example of swinging a bit too far in the hyper-modularisation, lots of tiny single-purpose things, direction. It’s 11 lines of code that pad a string on the left. That seems like the kind of thing that should be part of the utilities blob of an application, not an external dependency. David Haney has a good write-up of this, asking “Have We Forgotten How To Program?”.
I try to make robust things that are simple to work on