Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is why one guy can now compete with say Google or Microsoft, because that guy uses code written and managed by more engineers then both Google and Microsoft have combined. Instead of paying hundreds of dollars to said companies, you can just NPM install "what you need".


Libraries/modules should help to solve complex problems where writing your own version is not optimal. Single line functions as modules, on the other hand, won't help you compete with Google or Microsoft and result in more problems than they solve. If a simple padding or "is this int positive?" is a complex problem, well, there are different professions than programmer's..


The less code you write, the less code you have to maintain. Even if it's just one less thing, it's a win.

The comonJS module pattern also helps tremendously, as your requires are block/function scoped. It makes it trivial to refactor (remove/rewrite) code.


In a perfect world yes, but in the real world, with unreliable dependencies and their imperfect management, it doesn't come for free.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: