Conrad's ALFS comments

Bill Maltby LFS Related lfsbill at wlmcs.com
Tue Aug 27 05:14:26 PDT 2002


On Tue, 27 Aug 2002, Heinz Kirchmann wrote:

> 
> > Yes. Although dated now, when C and UNIX popularity began to spread, they
> > advocated brevity for a number of reasons. Some related to the equipment
> > of the time and some related to most of us programmer types couldn't
> > really type all that fast (or well :P ). Since they were Bell Labs people,
> > they didn't have (m)any concerns for long-term maintenance issues, so
> > short names were the order or the day.
> Yes, but today there is emacs and its resourceful completion function 
> (M-/). So in my eyes there is no argument left to use short cryptic 
> variable names (however mnemonic they may be for the writer of the 
> script).

Oh, there are plenty of good reasons! :)
 1) Who has time to learn emacs when vim will do?
 2) Who has time to learn vim when ed will do?
 3) Laziness, if you are not getting paid to make a good professional and
    maintainable system.
 4) For interpretive languages, like shells, the script at the end of this
    post demonstrates my (small) point. As you get faster and faster
    equipment, this point becomes moot for single-user systems (usually).
    Thank goodness I still have this old dinosaur - otherwise my point
    might be moot *now*! BTW, RH 6.0 2.2 kernel, GNU sh 1.14.7.

Results on an AMD Am5x86-WB (really like a 100MHz 486), 66.56  bogomips,
36MB ram, were:

23.65user 28.58system 0:52.91elapsed 98%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (89186major+71028minor)pagefaults 0swaps
-----------------------------------------
30.91user 30.10system 1:01.02elapsed 99%CPU (0avgtext+0avgdata
0maxresident)k
0inputs+0outputs (89198major+71543minor)pagefaults 0swaps


It may not be as slow as a DEC PDP 11/70, but close?

> Heinz

Bill Maltby
billm at wlmcs.com
=============================================================
bs()
{
    C=0
    while [ $C -lt 1000 ] ; do
        echo "A${C}a=a$C"
        C=`expr $C + 1`
    done
    C=0
cat <<"EOD"
hash expr
C=0
while [ $C -lt 1000 ] ; do
    eval b=\$A${C}a
    # echo $b
    C=`expr $C + 1`
done
EOD
}

bl()
{
    C=0
    while [ $C -lt 1000 ] ; do
        echo "ABDEFGHIJKLMNOPQRSTUVWXYZ${C}abcdefghijklmnopqrstuvwkyz=a$C"
        C=`expr $C + 1`
    done
    C=0
cat <<"EOD"
hash expr
C=0
while [ $C -lt 1000 ] ; do
    eval b=\$ABDEFGHIJKLMNOPQRSTUVWXYZ${C}abcdefghijklmnopqrstuvwkyz
    # echo $b
    C=`expr $C + 1`
done
EOD
}

bs >/tmp/short$$
time sh /tmp/short$$

echo '-----------------------------------------'

bl >/tmp/long$$
time sh /tmp/long$$

=============================================================

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list