For the uninformed. It still somehow both boggles my mind and makes 100% sense that people didn’t just write this function when they needed something to pad strings.
Something something Unix Philosophy. Write small programs that do one thing and do it well and then re-use that well tested code as often as you can rather than poorly re-implementing it over and over?
https://en.wikipedia.org/wiki/Npm_left-pad_incident
For the uninformed. It still somehow both boggles my mind and makes 100% sense that people didn’t just write this function when they needed something to pad strings.
Probably got put into a popular example and then everyone uses it because “that’s how.”
Huh… You know what that makes more sense than anything else I’ve come up with. I always just assumed it was lazy devs.
Something something Unix Philosophy. Write small programs that do one thing and do it well and then re-use that well tested code as often as you can rather than poorly re-implementing it over and over?