write a simple implementation, then you will understand the basics. then go and look for a module and read the code. if it behaves well and does the things you want use it, if not. use what you have until it fails.
On Mon, Apr 14, 2014 at 3:51 PM, Aria Stewart <[email protected]> wrote: > > On Apr 14, 02014, at 16:31, Warren Lindsey <[email protected]> > wrote: > > Agreed, if I could find a tiny stable module amongst the many that are out > there. When I originally looked into this I found a thread on > stackoverflow which made multiple mentions of these modules having > significant memory leaks. I opted to write something simple and blame > myself if it broke in the future... > > > http://stackoverflow.com/questions/6156501/read-a-file-one-line-at-a-time-in-node-js > > Changing the topic: how do people pick the best module for the job, when > presented with multiple options? Obviously checking the popularity on > npmjs.org is a good start, but if it just happens to have snagged a good > name and provide a poor implementation, well, that doesn't help. Up until > now I've picked modules that provide features meeting my use case, but this > file reading bits made me question it... > > > > I read. I read everything. My theory is that everything I depend on, I’m > responsible for. If it works as is, I use it as is. If not, I fix it and > contribute or fork it and fix it. > > I usually find that after a glance at the implementation, I can see one of > four possibilities: > > - This is terrible, and I shouldn’t use it. > - This is wonderful, why wouldn’t I use it?! > - I don’t understand the problem. > - Why does this include the kitchen sink and ability to read email? > > The third is the most annoying, and I think it’s what people are trying to > analyze by proxy when they go looking for ‘best practices’ or ‘the most > popular module to use’. I think it bears more examination when that comes > up. > > I fix the fourth with a razor blade and a fork, if I can’t find a small > tool that does what I want. > > Aria > -- Humankind cannot gain anything without first giving something in return. To obtain, something of equal value must be lost. That is alchemy’s first Law of Equivalent Exchange. ~ Alphonse Elric, Full Metal Alchemist -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
