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,
-
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.
|