http://qs1969.pair.com?node_id=494028


in reply to Keeping sharp and fresh

Sometimes I "reinvent the wheel" - write something that already exists. The idea isn't to make a better wheel, but simply to learn how to make one - and in so doing, learn some new tools.

Replies are listed 'Best First'.
Re^2: Keeping sharp and fresh
by liverpole (Monsignor) on Sep 22, 2005 at 12:35 UTC
    Good answer!  I completely agree that a lot can be said for "reinventing the wheel"!

    In addition to "learning how to make one" and "learning some new tools":

    1. Often, you need a special wheel that best fits your particular needs.
    2. There's the possibility that you'll stumble onto a better/faster way to make "one"
    3. You'll learn the tradeoffs involved in making "one"
    4. There may be common mistakes associated with the particular "wheel" you're (re)inventing, so overcoming these mistakes will make you a better programmer
    5. If you've reinvented it several times (or several dozen times), it may take you only a moment to create it in a future program.
    6. You get just as much experience writing something that already exists as you do writing something new.
    7. After you write it yourself, you can go evaluate the one that already exists (probably at cpan), and see how you did!
    Think what the consequences would have been back in 1987 if Larry Wall hadn't "reinvented the wheel" when he wanted something more powerful than sed, awk and sh to program in!
      I haven't thought of focussing on this - when I have tried, I inevitably end up realising why the module author took so many lines of code to do it when I thought it was simple! In that way it can also teach respect :)