Hacker News new | past | comments | ask | show | jobs | submit login

I think NPM ecosystem contracts your thesis. People find it too unpleasant to buckle down and type out that combination of string functions to left pad. It is less cognitive work to down load some library. When I was younger the learning was easier but even then learning is etching new groves in your brain. If it doesn’t feel like you are changing your biology you aren’t getting real deep learning. Not that learning isn’t sprinkled with moments of happy enlightenment. There comes a moment when to truly understand something you have to totally push against it. I am presently learning AWS, AWS api and terraform. It is exhilarating and also very hard. First month or two I collapsed asleep at the end of each day and dreamt of HCL and so on. Now, six months later, I can help my coworkers get around obscure gotchas in AWS and terraform.





> People find it too unpleasant to buckle down and type out that combination of string functions to left pad. It is less cognitive work to down load some library.

That's not the case though - why would I reinvent the wheel when I have finite time to get something done? I love to suss out solutions to all sorts of things on my own time, but if I have to left pad a field, I've already got lodash, I'm using that.

In addition, when someone goes back to read the code "_.padStart" just makes sense to read.

I'm not saying that understanding doesn't lead in repetition and effort, but I think you're wrong on why people use libraries. It's not because people don't want to know, they gotta get whatever it is they are working on done.


Another reason to use a library is once you write that left pad function yourself, you have to go copy it around from project to project whenever you need it, then fix or improve it and copy the changes all over again. Second time you do that, might as well pull it into a library. And now you have a library that you lug around, might as well host it somewhere. In a few short decades you roll your own package management infrastructure and fill it with all kinds of useful things like string concatenation subroutines and macros for flow control primitives built on jmp instructions and stuff like that.

Might as well shortcut all that and see if there is something in standard library or in an existing package...




Applications are open for YC Summer 2020

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

Search: