4 ms·
Estimate reading time from words per minute. Here's an NPM package that'll do it for you! https://www.npmjs.com/package/reading-time https://www.npmjs.com/packa
by madeofpalk 4y ago
Estimate reading time from words per minute. Here's an NPM package that'll do it for you! https://www.npmjs.com/package/reading-time https://www.npmjs.com/package/reading-time
- iso1631 4y agoIs that estimate really accurate to 2% that using 58 minutes rather than "about an hour" implies?
- madeofpalk 4y agoI guess it is easier, dev wise, to round a WPM-calculation than do fuzzy duration logic. I wouldn't stress too much about it
- iso1631 4y agoif (mins < 4) return "a couple of minutes" if (mins < 8) return "five minutes" if (mins < 12) return "ten minutes" if (mins < 18) return "quarter of an hour" if (mins < 25) return "20 minutes" if (mins < 40) return "half an hour" if (mins < 50) return "45 minutes" if (mins < 70) return "about an hour" if (mins < 100) return "hour and a half" if (mins < 250) return "a couple of hours"
- Karellen 4y agoWouldn't it be more useful to overestimate, rather than underestimate? Also, is the "couple of hours" estimate being off by more than a factor of 2 a typo, or are you just trolling at that point?
- madeofpalk 4y agoor just use the minutes value.
- johannes1234321 4y agoBut I don't have one hour! I wonder if that is a purposely value, trying to use the same psychology as Supermarkt prices, where they say "0.99" rather than ""1.00"? In my opinion the right approach however is to have a clean layout, where my scrollbars gives me a good estimate on the length, so I can make my estimate based on my reading speed and experience. But yeah, ads and other stuff make that of course impossible.
- tgv 4y agoThat's pointless. Then just publish the number of words or (A4) pages.
- thrdbndndn 4y agoI don't find it's pointless. Sure, in this particular case (a very long time for something meant to be very long) is probably, but a "3-min read" note have made me read lots of articles I typically won't. And it's definitely better than "number of words" or "A4 pages", since I have no idea how fast average person reads.
- crispyambulance 4y agoI don't get why reading time is even a thing. One can simply look at the right-hand-side of their browser window and see the scrollbar height to gauge "accurately enough" whether it's long or short. More to the point, I would expect anything purporting to be an "ultimate" guide to ffmpeg to be a massive time sink that simply can't (and shouldn't) be ingested in one sitting. It's either going to be incredibly dense or it's going to leave out innumerable details, leaving many things implicit. Don't get me wrong, there is nothing wrong with those approaches, but it means that "how long" it takes to read will depend on the reader and what they actually end up reading.