Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: I can't get no...

by laughingboy (Monk)
on Sep 17, 2002 at 16:40 UTC ( #198545=note: print w/replies, xml ) Need Help??

in reply to I can't get no...

"Have I got it right?". All the while I'm coding I'm asking myself this question, and I'm not getting the answer I want to hear. My programs work, sometimes even for more than a few seconds (grin). But I'm constantly wondering, "How can I make it better?". Should I have used an array instead of a hash? Was storing my variables in a separate namespace better than creating an object to manage them? On and on and on.

To some degree, these types of design issues are independent of the programming language. Maybe reading some general OOP or data structures texts would be helpful. (Regarding data structures: Mastering Algorithms with Perl has lots of good info about using data stuctures in Perl effectively.)

But in Perl, there are so many ways to do it and they all change depending on so many different aspects of your program, the data structures you choose, the user interface you are using, the storage methods available. I don't get a feeling of satisfaction when I've finished a program. I sit in front of my screen, turning bits of the code around in my mind, because I'm not sure I've done it the best way. Even when it's finished, it's still not done.

Learning the Perl idioms and the tradeoffs among the WTDI should help resolve some of those nagging doubts. I would highly recommend The Perl Cookbook and Effective Perl Programming. A careful study of these books (not just cut-n-pasting :-) will give you a great feel for what good advanced perl looks like and why.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://198545]
[stevieb]: it is exceptionally difficult I'm finding to debug a dist that is x-platform, where on each platform you're wrapping a different binary. Trying to co-ordinate a successful test run where tests are extensive is a nightmare, especially when the dist...
[stevieb]:'re testing is a test system itself. 10+ documented issues fixed, another half dozen found while fixing the original ones. I'm getting there...
[stevieb]: Then throw in changes to Windows that throws everything you trusted right out the window.
[shmem]: that's why it is called "Windows"
[stevieb]: shmem thanks for the 'insight' :P
[shmem]: good thing that Sun already took "OpenWindows", otherwise I'd not stop to shudder imagining an "OpenWindows" from MS
[shmem]: more garbage in, more garbage out that would be

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2017-03-28 21:59 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (342 votes). Check out past polls.