This Newbie Wants To Know

Hi All:

I'm a Reading Instructor who just discovered Ruby on Rails. I would like
to know if it is possible to design a prog in Ruby on Rails that would
be able to count the number of words contained in a text document,
determine how long it takes for a student to read the entire document
and then give the student her/his WPM (Word Per Minute Rate)?

If this is possible -- where should I start. I am just learning so I
don't have a clue. Any help or suggestions would be greatly appreciated.

Thanks.

Howdy William,
Are you talking about a plain text document (i.e., not Micrsoft Word
but one that's posted to a website in plain text)?

You could easily do something like this. You could do the word count
using the information here:
http://safari.oreilly.com/9781593271480/Inumber_symble_12_counting_words_in_a_file_word_co

You could then use JavaScript to see how long it takes a student to
read the document and press a button.

To start I'd suggest getting a book on Rails. My site has a
bibliography of books on it (http://blog.mrneighborly.com/) that
should get you started. :slight_smile:

--Jeremy

Hi Jeremy:

Thank you so much for your input and sharing your resources. I will get
started with using them.

BTW can you tell me how the command line would look to make this happen?

Thanks again.

Jeremy McAnally wrote:

I'm a Reading Instructor who just discovered Ruby on Rails. I would like
to know if it is possible to design a prog in Ruby on Rails that would
be able to count the number of words contained in a text document,
determine how long it takes for a student to read the entire document
and then give the student her/his WPM (Word Per Minute Rate)?

If this is possible -- where should I start. I am just learning so I
don't have a clue. Any help or suggestions would be greatly appreciated.

If the student was willing to click a "I've started reading" button and a "I've finished reading" button then you could use javascript to figure out the time it took.

Rails can certainly count the words in the document, but so could every other language out there. That is to say, you don't *need* rails to do this, but yeah, you could do it.

thufir@arrakis ~/foo $
thufir@arrakis ~/foo $ cat foo
I'm a Reading Instructor who just discovered Ruby on Rails. I would like
to know if it is possible to design a prog in Ruby on Rails that would
be able to count the number of words contained in a text document,
thufir@arrakis ~/foo $
thufir@arrakis ~/foo $
thufir@arrakis ~/foo $ wc foo
  3 42 211 foo
thufir@arrakis ~/foo $

wc (word count) is built into linux and will do that :slight_smile:

newlines: 3
words: 42
bytes: 211

-Thufir

I think that once you get a rails app which up and running, which has
files to click on for the student, that adding the clock, word count and
other features will be child's play.

There will be a steep learning curve to get to that point, though.
However, go for it!

There are multiple threads here discussing the various merits of this or
that book, but keep in mind that this is a great list for support. Also,
there's an IRC list which is quite helpful.

-Thufir

You really don't need Rails for this task although its true you could
make it in Rails if you want. As some other people said, you can do this
using HTML and Javascript alone unless I am missing a requirement.

You could either learn Rails (or just Javascript) on your own or you
could just find someone technically savvy to do it for you. Based on
your description making this would only take me about a couple of hours
and I am sure it would be the same for any other novice-intermediate
programmer.

If you are going to go the simple HTML + Javascript route, start by
learning HTML since it is so easy even for a total novice. Once you have
laid out the page in HTML (setting up how you want it to look visually),
learning the javascript to have word counts and timing reading (with a
start/finished button) shouldn't be too hard.

It almost seems like this would be overkill for using Rails unless you
need to store results or collect some sort of data / graph / visualize
data in which it might make more sense.

Either way, good luck.