Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Not knowing any better?
Sometimes you just don't know any better, so you code spaghetti. And then some time later (maybe a couple of hours later, sometimes years later) you find a piece of code that does the same thing your sloppy code does, but in a more clever/clean/readable/efficient... way, and you go "whoa! Why I didn't do it like this?" Because you didn't knew any better at the time. I know I don't write "good" code at this time, but I certainly write better code today than I did yesterday (using strict, passing arguments to subs in hashes, bind()ing variables when working with DBI...), just because my wonderings in the Monastery, practice and reading have shown me better ways of doing things. And when I find a better way of doing something, I try (if I have a little time) to go back, one script at a time, and change the sloppy way to the clean way, hoping to really learn the technique. So I guess everyone still writes "bad Perl code" if they compare their code written today with the code they could write tomorrow.

just a random thought,


In reply to Re: Confessional: why I wrote bad Perl code. by CukiMnstr
in thread Confessional: why I wrote bad Perl code. by vladb

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 musing on the Monastery: (3)
As of 2024-03-28 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found