RE: RE: RE: Get those parameters without CGI.pm
by merlyn (Sage) on Jun 22, 2000 at 16:06 UTC
|
I didn't write great code right away. Sometimes, I don't
even write good code now, and I'm always looking for
feedback about what I could have done different or better.
The point is that a beginner does not rewrite an expert's
code (CGI.pm here) and say "I have a better way".
This is not hubris. This is arrogance.
Only when you understand why CGI.pm is the size
that it is, can you build upon the art as an improvement.
There are a lot of things that have to be done right to
handle security; and a lot of others that also have to be
done to handle portability. There's a cost to that, and
you gotta pay the piper at some point; not cheat and pretend
you can get away without it.
-- Randal L. Schwartz, Perl hacker | [reply] |
|
| [reply] |
|
I, for one, feel this defensiveness is unjustified. merlyn
wasn't insulting you, he was warning you not to do work or
reinvent the wheel when it wasn't necessary. He was pointing
out that there are some amazing modules available and that you
probably shouldn't rewrite them, just to say you did.
This isn't cool.
J. J. Horner
Linux, Perl, Apache, Stronghold, Unix
jhorner@knoxlug.org http://www.knoxlug.org/
| [reply] |
|
|
I am a basic newbie, but I agree with Randal. It is, however, sometimes quite necessary to "reinvent the wheel" for yourself to really understand why things are done the way they are. You learn anatomy by sticking your hands into a cadaver not by simply reading a book. The true path to knowledge is sometimes read and gui. Blind acceptance does not build knowledge. But open minded exploration does.
| [reply] |
|
And when you do that, you keep it to yourself, or you show people only within a frame of "I'm attempting to recreate a masterpiece... how am I doing?", not "Here's my new improved masterpiece" - that would be the arrogance I referenced earlier.
| [reply] |
RE: RE: RE: Get those parameters without CGI.pm
by davorg (Chancellor) on Jun 22, 2000 at 11:53 UTC
|
Which is, of course, why using modules is such a good idea. That way beginners don't need to write own (potentially flawed) code. They can reuse code written by experts and debugged by usage on thousands of servers over many years.
--
<http://www.dave.org.uk>
European Perl Conference - Sept 22/24 2000
<http://www.yapc.org/Europe/>
| [reply] |
RE: RE: RE: Get those parameters without CGI.pm
by KM (Priest) on Jun 22, 2000 at 03:41 UTC
|
He implied how to improve it, delete it and use CGI.pm. One way to become a better programmer is to not reinvent wheels which already roll.
Cheers,
KM | [reply] |
|
And what if I need to do something similar, but can't use CGI.pm to do it? There's obviously some way it could be better. But apparently, no one knows how. Thanks for the help.
| [reply] |
|
| [reply] |
|
Don't give a 'what if'. Tell us what you need to do that is similar. You need to parse QUERY_STRING in a 'similar' way? Maybe you want to URI decode the string, CGI.pm does that (and other modules, too). Use CPAN, grasshopper.
Cheers,
KM
| [reply] |
|
A reply falls below the community's threshold of quality. You may see it by logging in.
|