Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I think the worst things I've ever done was in attempting to write my own content management about 3 years ago. I rolled my own CGI replacement by taking bits of cgi-lib.pl and changing them to suit my needs. My pages would send out a ton of cookies (at least 4, although maximum on one page was 17, I believe). Probably the worst part of it all was that I'd put sql statements in cookies (yes, I know...I'll even give you the bat with which you may beat me in the head). I relied HEAVILY on javascript to do a lot of things such as input checking. I never checked any values coming in because javascript is such a good input checking tool (ah darn, javascript disabled? oops...). There were a few places where I blindly used incoming parameters to execute external scripts. My user authentication scheme worked...sometimes. A lot of times, the system would just let anyone look at what were supposed to be heavily guarded parts of the site. I had a ton of scripts and not a single module in the entire system. I would just call do "file". Each time I reached a critical next step (i.e. the profiles are finally working, yay!) I would print the entire thing out on dead trees. I wouldn't bother keeping old versions because, well, seriously...who wants to go back to the older versions? Half of my variables in any of the scripts were $tempX. The other half would just be $X. I had a couple of variables with somewhat descriptive names, although some contained explicit language because I had problems with the fact that they weren't working correctly at some point. I had a script called util.pl which contained, among other amusing things, a quicksort subroutine, a date subroutine that would call out to the shell, a directory listing subroutine that also called out to the shell, and a subroutine that did almost what grep does. You name an embarassing coding blunder, I probably did it.

But alas, a programmer buddy from Sweden pointed out many of the errors in my ways when I showed him the source. He laughed at me. I was ashamed of my efforts -- all tha time I pissed away doing stupid crap. I buried my print outs in my backyard (along with my sister's tae bo tapes...*shudder*) and decided to learn how to do things the right way. I spent weeks looking at random nodes as well as reading merlyn's articles on his site. This is why I think so highly of him. I've grown to love CPAN and can even quote perldoc with little effort.

...at least that's how I made my way out of the darkness and into the light.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1


In reply to Re: Worst thing you ever made with Perl by antirice
in thread Worst thing you ever made with Perl by Juerd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-29 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found