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.

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.

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:

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

On Jan 3, 2008 2:39 PM, William M. [email protected]
wrote:

don’t have a clue. Any help or suggestions would be greatly appreciated.

Thanks.

Posted via http://www.ruby-forum.com/.


http://www.jeremymcanally.com/

My books:
Ruby in Practice

My free Ruby e-book

My blogs:

http://www.rubyinpractice.com/

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:

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:
O'Reilly Media - Technology and Business Training

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

On Jan 3, 2008 2:39 PM, William M. [email protected]
wrote:

don’t have a clue. Any help or suggestions would be greatly appreciated.

Thanks.

Posted via http://www.ruby-forum.com/.


http://www.jeremymcanally.com/

My books:
Ruby in Practice
Ruby in Practice

My free Ruby e-book
http://www.humblelittlerubybook.com/

My blogs:
http://www.mrneighborly.com/
http://www.rubyinpractice.com/

Hi Philip:

Thanks a lot for your reply. I am interested in learning how to prog in
Rails and would like to what I need to do to make it happen. Can you
tell me what the commands would be to make it happen.

Thanks.

Philip H. 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.

On Thu, 03 Jan 2008 20:39:52 +0100, William M. 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,

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

On Thu, 03 Jan 2008 21:06:42 +0100, William M. wrote:

Thanks a lot for your reply. I am interested in learning how to prog in
Rails and would like to what I need to do to make it happen. Can you
tell me what the commands would be to make it happen.

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.