DEV Community

Changelog: Reading Time Now Displayed

Ben Halpern on January 14, 2019

The approximate reading time for a post on DEV is now displayed on feed pages as well as at the top of the post. Feed Post P...
Collapse
 
itsasine profile image
ItsASine (Kayla)

Doing a quick regex on my Reading List (670+ right now), 40 were caught with a quick [0-24-9] min read while 500 were caught with 3 min read. This is fallible for multidigit things like 13 min read, but apparently I don't tend to save long form posts for later. 😅

Thanks for the extra data points!

Collapse
 
ben profile image
Ben Halpern

We actually still have some older posts which have not yet been indexed and are defaulting to 3 mins. This should be rectified soon. It’s a known issue but I figured people wouldn’t notice this before it was ironed out. Leave it to devs to quickly uncover the problems.

Collapse
 
itsasine profile image
ItsASine (Kayla)

Leave it to devs to quickly uncover the problems.

QA is my day job ;)

Collapse
 
garfbradaz profile image
Gareth Bradley

I love that someone (Kayla) bothered to investigate this. Awesome.

Collapse
 
itsasine profile image
ItsASine (Kayla)

I actually typed up a comment originally like "Uhhhh this feels buggy" but given how much I've read on this site, having a ton of stuff in the 3-minute range wasn't that unheard of. Occasional long-form posts, sure, and occasional discussion questions without context, but for the most part, people tend to succulently say their piece.

Collapse
 
nektro profile image
Meghan (she/her)

Cool! How is it calculated?

Collapse
 
ben profile image
Ben Halpern
  def calculate_reading_time
    word_count = @content.split(/\W+/).count
    (word_count / 275.0).ceil
  end

Contributions welcome 😄

Collapse
 
viniciuskneves profile image
Vinicius Kiatkoski Neves

Ben, just wondering, why 275 WPM?

This question came up to my mind and I decided to read a bit about it and found the following reference which recomends 200 WPM: marketingland.com/estimated-readin...

There is also this from Wikipedia where there is a nice graph with several different studies correlating WPM / age.

As I mentioned I'm just curious about the magic number (where you've found it).

Thread Thread
 
itsasine profile image
ItsASine (Kayla)

From your Wikipedia link, this caught my eye:

reading for memorization (fewer than 100 words per minute [wpm]); reading for learning (100–200 wpm); reading for comprehension (200–400 wpm); and skimming (400–700 wpm)

I'd think most here are reading for learning, to an extent. 200 WPM sounds like it'd be a good middle between learning and comprehending, though I could just be slow since I tend to read at work while I'm watching tests run.

Thread Thread
 
ben profile image
Ben Halpern

Hmm all good food for thought. We settled on this a while back and I sort of forget the exact reasoning.

We’ll make this smarter over time.

Thread Thread
 
viniciuskneves profile image
Vinicius Kiatkoski Neves

Just a tip (don’t wanna bother you with that) but usually when I get those magic numbers on my code I try to add comments linking to it. It might help future contributors to understand and think twice before updating it to another magic number hehehe
As I mentioned I was just curious about it!
Nevertheless I think it is a great feature and it might help engagement ✌️

Collapse
 
m1guelpf profile image
Miguel Piedrafita

Haven't worked with Ruby a lot, but would you be open to a PR that takes images into account?

Collapse
 
link2twenty profile image
Andrew Bone

Great feature!

Collapse
 
avalander profile image
Avalander

Althoug this is a great metric, I personally would find more useful to see the word count directly. Would you consider something like this?

8 min read (~2.4k words)
Collapse
 
mariocd10 profile image
Mario DeLaPaz • Edited

Great Feature ! Love the progress so far of dev.to

Collapse
 
antonrich profile image
Anton

When I saw that feature I didn't like it because:
1) it's clogging space. (less is more kinda thing).
2) what if the article is technical? I'm sure to read it more thoroughly so the time is so relative that the purpose of the feature is counter productive. It doesn't tell me any REAL information.

Collapse
 
antonrich profile image
Anton

But, as with everything, there will be two camps. The one that liked it and the one that didn't.

Collapse
 
shindakun profile image
Steve Layton

Ohh fancy!

Collapse
 
jdmedlock profile image
Jim Medlock

This is a very useful feature. Thanks for adding it!

Collapse
 
terrancecorley profile image
Terrance Corley

Was just wishing we had this feature the other day, nice!

Collapse
 
kyleboe profile image
Kyle Boe

Collapsable comments and this were two of my most anticipated features! You guys are awesome! Big ups to the whole Dev crew 👍

Collapse
 
kwabenberko profile image
Kwabena Bio Berko

Neat!

Collapse
 
cmmata profile image
Carles Mata

¡Great addition! It will be super useful for extra busy days.