Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

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

What was the worst Perl code you ever wrote? You know, that code that was one of your first Perl projects and you just had to put online somewhere. You hadn't learned about strict back then and did not know why symbolic references are evil. Or even that they are called symbolic references.

It is using lots of globals, maybe even shared throughout multiple modules. Because you didn't realise the importance of style, not everything is indented correctly and the style is inconsistent at best. No external database is used, everything is serialized and stored as strings. If there was a database at all, then it used a table per record because you didn't bother to learn about databases.

If there was any documentation at all, it would not be enough for future maintenance. But there probably was no documentation at all. Comments were absent, just like error checking and sanity checks. The Perl 5 code could probably be run in Perl 4 without too many modifications.

Many Perl Monks have made bad stuff like what I described above. Of course, this is a somewhat dramatic view, but I'd like to ask you to be honest.

What code did you create years ago that you are ashamed of now? Why is it that bad, what would you do differently now?

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

P.S. I will of course post my own Worst Perl Project too, but before that I need to deal with the worst security issues :)


In reply to 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 lurking in the Monastery: (5)
As of 2024-04-20 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found