[Abcde-users] Patch to tidy the main routine, and avert loosing variable declarations by not using subshells
Roger
rogerx.oss at gmail.com
Mon Mar 23 16:05:55 GMT 2015
I also noticed while rereading the main routine last night the following:
1) Most of the main routine contains only if/then statements as it should, but
there seems to be a significant amount of if/then statements creating the usual
significant difficulty of interpreting the main routine. I do not know, as of
yet, if I can section off into functions of shorten and increasing readability,
as I'm still mystified as to what "exactly" each section is piping to the next
section.
2) The main routine is seemingly well commented, with my next task likely to
correct some grammar usage so that readers do not waste time on interpreting
the simple grammar errors, etc.
3) There is a CD check embedded within the main routine, for which involves a
unique check for BSD platform, and this could likely be placed into a separate
function. But in doing so, I don't think it's going to reducing any scripting
and just would be essentially decluttering the main routine. (Unknown if
anybody would agree with moving this into a separate function.)
4) There is a common return check (ie. Line #4262 [ "$?" != 0" ] within the
main routine for which I always place this within a function within my own
scripts as it's usually common to repetitively check return values. Further
checking now, I'm seeing four or five occurrences as expected.
5) Line #4227, containing echo Creating playlist... >&2 has no quotes.
6) Anybody object if I reword some of the comments, replacing such wording as
"shutup" with something more understandable as "silence debugging", etc?
Although humorous, and I don't mind seeing one or two of these odd ball
comments as it provides the Author with some character. However, constantly
reading or repetitively trying to interpret these key comments makes the reader
spend more time trying to interpret what the writer was stating within a
comment, when it should just be properly written in plain simple English
grammar, etc. (A good example, somebody not familiar with English might be
interpreting the "shutup" and other comments as if the coder were telling
him/her to shutup, etc...)
--
Roger
http://rogerx.freeshell.org/
More information about the Abcde-users
mailing list