suggestions for new module name

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've got a module with the working title Text::Effort.  It calculates
roughly how much physical effort is required to type a given text.  I
wasn't able to find any modules on CPAN that did this, but most of the
text statistics modules seem to be under the Text namespace.  Does
anyone have a suggestion for a name better than Text::Effort?

The current documentation for the module is below.

Thanks for any input,


    Text::Effort - calculate the effort required to type a given text

      use Text::Effort qw/effort/;

      my $effort = effort("The quick brown fox jumps over the lazy

    $effort will be a hashref something like this

      $effort = {
          characters => 43,     # the number of characters in the text
          presses    => 44,     # key presses need to type the text
          distance   => 950,    # millimeters the fingers moved while
          energy     => 2.2..., # the energy (Joules) used while typing

    Text::Effort is used to calculate how much physical effort was
    to type a given text. Several metrics of effort are used. These
    are described in detail in the "METRICS" section.

    This module is useful for determining which keyboard layout is more
    efficient, for making API/language design decisions, or to show
    boss how hard you're working.

  effort $TEXT | $TEXT
    The parameter should be a scalar or a reference to a scalar which
    contains the text to be analyzed. Leading whitespace on each line
    $TEXT is ignored since a decent text editor handles that for the
    Only characters found on a standard US-104 keyboard are tallied in
    metrics. That means that accented characters, unicode, etc. are not
    included. If a character is unrecognized, it will be silently

  effort %PARAMETERS
    effort() may also be called with a list of named parameters. This
    more flexibility in how the metrics are calculated. Below is a list
    acceptable (or required) parameters.

        One of these two options must be specified. If neither is
        effort() will "die". The value of text should be a scalar or
        reference to a scalar containing the text to analyze. The value
        file should be a filehandle which is open for reading or a file

        Default: qwerty

        This parameter specifies the keyboard layout to use when
        metrics. The value of layout should be either 'qwerty' or
        If a value different from those is specified, the default value
        'qwerty' is used.

    Calling effort like: "effort($text)" is identical to calling it

        text   => $text,
        layout => 'qwerty',

    The number of recognized characters in the text. This is similar in
    spirit to the Unix command "wc -c". Only those characters which are
    encoded in the internal keyboard layout will be counted. That
    accented characters, Unicode characters and control characters but
    includes newlines.

    The number of keys pressed when typing the text. The value of this
    metric is the value of the characters metric plus the number of
    the Shift key was pressed.

    The distance, in millimeters, that the fingers travelled while
    the text. This distance includes movement required for the Shift
    Enter keys, but does not include the vertical movement the finger
    as the key descends during a press. Perhaps a better name for this
    metric would be horizontal_distance, but that's too long ;-)

    The model for determining this metric is very simplistic. It
    that a finger moves from its home position to the destination key
    then returns to the home position before moving on to the next key.
    course, this is not how people actually type, but the model should
    result in an upper-bound for the amount of finger movement.

    The number of Joules of energy required to type the text. This
metric is
    the most inclusive in that it tries to accomodate the values of
both the
    presses and the distance metrics into a single metric. However,
    metric is also the least accurate at modeling the real world. The
    calculations are roughly based upon the *The Compendium of Physical
    Activities* (or rather hearsay about it's contents since I don't
have a

    The physical charactersistics of the keyboard are assumed to be
    in line with ISO 9241-4:1998, which specifies standards for such

    Tactus Keyboard article on the mechanics and standards of keyboard
    design - <


    * Add an 'accumulator' option which allows effort() to add it's
      to those from a previous call to effort().

    * Count the unrecognized characters

    * Allow keyboard layouts other than QWERTY and Dvorak

    * Allow keyboards other than US-104

    * Add options for specifying the characteristics of the keyboard
such as
      key displacement and the force required to depress the keys.

    Copyright (C) 2005 by Michael Hendricks

    This library is free software; you can redistribute it and/or
modify it
    under the same terms as Perl itself, either Perl version 5.8.4 or,
    your option, any later version of Perl 5 you may have available.

Re: suggestions for new module name

Michael Hendricks wrote:
Quoted text here. Click to load it

Any chance you could create a 'text effort' module for a keyboard that
transposes dfjk with the letters etni, which are almost five times more

Aset keyboard
It has been said that the most common letters were taken off the home
row of the first typewriter keyboard to slow down the typist and
prevent jamming.
On a Dvorak keyboard almost sixty percent of average text is typed from
the home keys.  Transposing the letters 'etni' with 'dfjk'  would put
more than 55% of text on the home keys, up from only 26% on the qwerty
layout.  Thats more than twice the text typed without lifting a finger.

The change is quite pleasant and easy to learn.  I hope you will pass
this on.

To put e, t, n and i back where they belong, there is a keyboard
remapping program that is free, downloads quickly and is very easy to
use.  I am typing this post on a keyboard remapped to the 'etni'
transposition layout.  The program is called 'Keytweak 2.11' and can be
googled up by that name.  It is available from several sites, including
PC magazine.

1)  After you have loaded the program click start.
2)  Click the "KeyTweak" icon and a graphic of a keyboard will appear.
3)  Click the "Full Teach Mode" at the bottom of the screen.
4)  A box will appear.  Click "Begin Teach Mode".
5)  Press the key you want to reassign, then the key you want it
reassigned to, in this case D to E.
6)  Click "Remap Key#1 to Key#2"
7)  The box will disappear and the scancodes of the keys will appear in
the "Pending Changes" window at the bottom right.
8)  Follow the same procedure (from 3) for E to D, and the remaining
six remaps.
9)  Click "Apply" and you will be asked if you want to turn off the
computer to apply the changes.
     At the top there is also a clickable "Restore Defaults" to give
you back your qwerty layout.
     I was able to remap in under three minutes and restore qwerty in
thirty seconds, not including the restart.

You can try out the sample lines of text below to discover that your
fingers already know where etni should go.

nineteen lean little saints settle in a nest
jkjdfddj ldaj lkffld sakjfs sdffld kj a jdsf

an alien eats an ant antenna in atlanta
aj alkdj dafs aj ajf ajfdjja kj aflajfa

elite sense entails a siesta in a satin seat
dlkfd sdjsd djfakls a skdsfa kj a safkj sdaf

a stain is seen at a linen sale
a sfakj ks sddj af a lkjdj sald

a latent latin talent tast tests in seattle
a lafdjf lafkj faldjf fasf fdsfs kj sdaffld

insane santa sails in sea salt
kjsajd sajfa sakls kj sda salf
Many thanks

Re: suggestions for new module name

The internal design of Text::Effort can easily accomodate the keyboard
layout you've mentioned.  I've added the 'aset' keyboard to my to-do
list and will implement it after I've made the first upload to CPAN.


Re: suggestions for new module name

Michael Hendricks wrote:
Quoted text here. Click to load it

    How difficult would it be to come up with a program that tracks
learning speed and error rates?

Re: suggestions for new module name wrote:
Quoted text here. Click to load it

I've implemented the ASET keyboard in version 0.20 of the Text::TypingEffort
module.  It's available on CPAN now.



Re: suggestions for new module name

On Wed, 22 Jun 2005 12:13:11 +1000, Michael Hendricks wrote:

Hi Michael

Quoted text here. Click to load it

Looks good. I would call it Text::TypingEffort just in case someone comes up=
with some other sort of error metric.

Site Timeline