[rescue] Help w/ computer time??
Greg A. Woods
woods at weird.com
Wed Apr 24 14:47:31 CDT 2002
[ On Wednesday, April 24, 2002 at 14:31:54 (-0500), Bill Bradford wrote: ]
> Subject: Re: [rescue] Help w/ computer time??
>
> On Wed, Apr 24, 2002 at 03:28:55PM -0400, Greg A. Woods wrote:
> > > for i in `cat filename` ; do
> > > echo -n $i ' '
> > > echo $i | gawk '{print strftime("%a %b %d %H:%M:%S %Z %Y", $1)}'
> > > done
> > I really hate to do this, but you're _really_ asking for it these days:
> > That's such horrible inefficient and poorly designed code it almost made
> > me puke no my keyboard! (well not literally, but it's sure making me
> > spew my thoughts through my keyboard and into this message! :-)
>
> *SO*? *IT WORKS*. Who *cares* if it isnt efficient or beautiful or
> doesent meet the Greg Woods Coding Standard? Its a FOUR LINE SCRIPT.
Actually, depending on the data set, it won't work -- it'll bomb rather
badly.
Also, depending on how often it is needed, it'll be slower than molasses
at the South Pole (in any month! ;-). (maybe not slower than doing the
same thing with a perl invocation per value, though :-)
> Greg, get a GRIP. If you have to worry about a four-line quickie
> script
Such so-called "four-line quickies" have been the bane of my working
life as a programmer primarily maintaining other people's code....
People who authoritatively profer such ill thought out examples without
having even the slightest clue about the un-stated requirements and
without apparently even thinking about the inherent limitations of their
creations, and especially when they do so on a public mailing list where
they may be innocently picked up and used by other naive and perhaps
"unintended" recipients, really do need to be corrected. The sooner I
can get a better implementation on record in the same forum the less
likely it'll be that I'll have to fix it in some lame code I encounter
some day in the future. This very same kind of nonsense has happened
far to often in my real life to just call it deja vu or bad juju....
It's not like this is a complex problem either -- Jon broke almost every
rule of thumb for writing good shell scripts with that one!
> you SERIOUSLY need a vacation.
That's be nice, but I don't think it's that serious.... :-)
--
Greg A. Woods
+1 416 218-0098; <gwoods at acm.org>; <g.a.woods at ieee.org>; <woods at robohack.ca>
Planix, Inc. <woods at planix.com>; VE3TCP; Secrets of the Weird <woods at weird.com>
More information about the rescue
mailing list