my first programming encounter was with QBasic. Until I found out about perl, I had no programming skill or style at all, and while discovering the new ways to program, it was pretty interesting.
As soon as I knew about a function I tried to use it whenever possible, and a while ago it hit me; I had hacked quite an amount of form to email scripts for the company I work for, and while looking at one, I saw a terrible line of code:
my $address = $query->param('address') ? $query->param('address') : 'N +o address specified';
And that's only one param, imagine what the script looks like. It seems that I got too excited with the CONDITION ? VALUE_IF_TRUE : VALUE_IF_FALSE form that I started using it everywhere without looking at how simple it can be to use ||
Is anyone interested in sharing similar dumb mistakes? I'd like to know that I'm not the only one, maybe I'll feel better ;)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dumb Mistakes
by demerphq (Chancellor) on Oct 03, 2001 at 15:53 UTC | |
by mirod (Canon) on Oct 03, 2001 at 16:06 UTC | |
by demerphq (Chancellor) on Oct 03, 2001 at 16:27 UTC | |
Re: Dumb Mistakes
by MZSanford (Curate) on Oct 03, 2001 at 14:51 UTC | |
Re: Dumb Mistakes
by premchai21 (Curate) on Oct 04, 2001 at 04:31 UTC |