The command word_size sets the size in characters of the required words. When practicing at a challenging speed it is much easier to interpret shorter words correctly. Longer words may be introduced as comfort with the speed grows.
# fixed_length_words.rb require 'cw' cw do comment "5 words having 4 letters (12 WPM)" shuffle wpm 12 word_length 5 word_count 4 test_letters end
If you prefer you can use the command word_length to set word length (word size). Here we set word length to six characters, and require 4 words.
# fixed_length_words_2.rb require 'cw' cw do comment "4 words having 6 letters (15 WPM)" shuffle wpm 15 word_length 6 number_of_words 4 # you can use number_of_words! end
The command having_size_of also has the same effect. Just use the version which you remember the easiest!
Here we set word length to 3, and require 12 words:
# fixed_length_words_3.rb require 'cw' cw do comment "12 common words having 3 letters (15 WPM)" shuffle wpm 15 having_size_of 3 number_of_words 12 end
Most common words
As familiarity with receiving CW grows it can be useful to concentrate on the very common words in order to become familiar with the sound of the word itself, as opposed to the individual letters. To this end a dictionary of the one-hundred most common words is available for our use. Most of the most common words are short words. Here we select three letter words from this dictionary.
# fixed_length_words_3.rb require 'cw' cw do comment "15 most common words having 3 letters (15 WPM)" load_most_common_words shuffle wpm 15 word_size 3 number_of_words 15 end
Notice in the previous example we called number_of_words after calling word_size. Had we called number_of_words first, our fifteen words would probably contain several words having a size different from three letters. Thus by the time we had filtered out our three letter words, our fifteen original words would have reduced to a smaller number of test words. Swap number_of_words and word_size and re-run a couple of times to test this out.