in reply to Too Many Ways To Do It

I agree that TMTOWTDI can be problematic for newbies, but the issue you're talking about here is language-independent. You would have these kinds of questions if you were programming in C++ or Python or Java as well. In general, I think it's this "am I doing it right?" feeling that causes developers to use commercial tools like ASP so often: they tell you how to do it, and you just fill in the blanks! But the direction you're going is better, because ultimately your experience will lead to knowledge about what works and confidence in your methods to a degree that people using black box software like ASP can't hope for.

Replies are listed 'Best First'.
Re: Re: Too Many Ways To Do It
by George_Sherston (Vicar) on Sep 19, 2001 at 19:44 UTC
    My experience of programming with other languages could be written on the back of a postage stamp and still leave room for a shopping list... so I guess this IS a general problem. It's a GOOD problem, of course. I mean, if you have a passport you have the PROBLEM of deciding what other countries to visit. I'd be very interested to know how monks solve this problem. My method is to burrow deeper and deeper into all the different ways of doing it and then jump up from my desk, run down to the kitchen and put on a jug of espresso, come back to my desk and go ahead with whatever was the last solution I came up with. I feel this might be open to optimsation...

    FWIW I'd think perl might even be a bit tricksier than other languages in this way, because not only do you have all the different core Ways To Do It, but you've also got CPAN. I mean, how 'nhell do you ever make a rational choice of templating module?

    § George Sherston
      1. Find a problem you want to solve
      2. Implement solution A
      3. Walk away, as the problem is solved
      4. 6 months later, run into problem again, but in a different context
      5. Implement solution B, cause you're 6 months better at Perl and wince whenever you remember solution A
      6. Repeat 4 or 5 times, wincing less and less cause solution E is only marginally better than solution D
      7. Log onto PM and realize that others have solution M.
      8. Cry for a while because it's so elegant and simple
      9. Rewrite 3 years of code to use solution M
      10. Realize you didn't understand solution M at all
      11. Cry for a longer while cause you just introduced 10 new bugs and hadn't backed up your code
      12. Rewrite again, using solution F, which takes what little you understand of solution M and grafts it onto solution E
      13. Read PM again in 6 months and realize you not only do understand solution M, but found a better way!
      14. Dance around your cube for an even longer while (gotta make up for all that crying!)
      15. Post solution N and get 100 XP for being cool
      16. Delete 3.5 years of code cause it's all worthless crap that a module you just wrote with solution N does it all, and more
      17. Go on with your life.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      I mean, how 'nhell do you ever make a rational choice of templating module?

      Well, you could start by reading my guide.