It's almost an automatic given that whenever you post a question about some code you've puzzled over for days, someone will point out that module X or project Y already does that, and say "Don't re-invent the wheel!". That's fine. You should know that there exists code out there that has already solved the problems you're facing. And you should normally use that code if time or reliability is critical.
However, if you've got the time, "re-inventing the wheel" can be a very strong teaching tool. What better way to learn real programming than to actually do real programming, knowing you have a working example to refer to if you are stalemated by a problem? And when it's done, you can compare your works to see where you could have done it better. This often sheds light on things beyond simply "getting it to work", like writing more maintainable, re-usable, secure and efficient code, in a concrete way that books often have a hard time conveying. You begin to really understand things like, "why I need to implement file-locking 'this way' to prevent race-conditions" or "why I should not shell out to do this with backticks".
And once you've become enlightened, you won't be so quick to tell the next guy, "Don't re-invent the wheel!".

-- O thievish Night, Why should'st thou, but for some felonious end, In thy dark lantern thus close up the stars? --Milton

In reply to Re-inventing the wheel is a 'Good Thing' by Felonious

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.