Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Seeing Perl in a new light

by gwadej (Chaplain)
on Apr 12, 2009 at 16:42 UTC ( #757109=note: print w/replies, xml ) Need Help??


in reply to Seeing Perl in a new light

Congratulations on the next step in your understanding of programming.

Possibly the biggest problem you will have at this point is in the sheer number of approaches you now have available. As ELISHEVA points out, you would be wise to change a small portion of your site using your intended method at first.

Based on past experience, I can say that whatever you come up with first won't be right. This is not meant to discourage you, but to make you think. When you get your first version built, you will have a better understanding of what you can do (and will have learned more). You may then want to change your approach.

Also as ELISHEVA advised, version control becomes very handy at this point. It helps you save the various attempts you've made and allows you to make wild changes freely, knowing that you can always go back to something from before.

One thing to consider on the file naming approach is an old maxim of programming:

All problems in computer science can be solved by another level of indirection.

Imagine that you had a file that listed the filenames and appropriate titles. Now, if your titling function used a the title fro the file if it exists, or a constructed title like you describe, you can add files easily and fixup names as needed. This may be a bit more complicated than you had considered, but having a real programming language opens up new ways of thinking about your problems.

Congratulations again and welcome to the journey.

G. Wade

Replies are listed 'Best First'.
Re^2: Seeing Perl in a new light
by Lady_Aleena (Deacon) on Apr 13, 2009 at 05:45 UTC

    gwadej...thank you for your support. Now, I have to find the ways and means to get to my goal. I wish that this lent itself to baby steps, but it really doesn't. This is to be the shell script for all of the pages of my site. I am not sure if it is possible to do it just for one small section. I have asked ELISHEVA to clarify what version control entails, though you are always welcome to chime in to that too. As for file names, well, I am a Wikipedian, so I will come up with something. :)

    Have a nice day!
    Lady Aleena

      One way to do the baby steps thing is to set up a single directory where you will try this approach. Think of it as a test site or sub-site. Then, go wild in that directory.

      One of the realities of programming is that you will have bugs. Fixing these are much easier if you are not stressed about getting your whole site back on line.

      As you get an idea fleshed out and (relatively) stable, you can apply that idea (and possibly code) to your main site.

      I know it seems like unnecessary, extra work, but we are suggesting this based on years (in my case around 20) of development in multiple languages on and off the web. The first time you really mess up, you'll thank us. (And if you don't really mess up, you're not trying hard enough.<grin/>)

      Stay curious and have fun.

      G. Wade
Re^2: Seeing Perl in a new light
by tilly (Archbishop) on Apr 16, 2009 at 05:34 UTC
    That maxim is from David Wheeler. However Kevlin Henney's corollary has much truth as well: "...except for the problem of too many layers of indirection."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://757109]
help
Chatterbox?
[ambrus]: Hopefull the object isn't kept alive, the events are processed immediately, but you'd have to read a lot of source code to be sure about that.
[Corion]: ambrus: I think both of AnyEvent and Prima are pretty tight in their memory management because they both are cooperative multitasking and (I think) both use the Perl memory management for managing things
[Corion]: ambrus: And for Windows, I don't think that Prima knows if there still are messages queued for an object (in the Windows message loop). Finding that out would take lots of effort for little gain
[ambrus]: And even if this works, I'm still not sure you can't get double timeouts from a Timer.
[ambrus]: Corion: well Prima::Object says something like that the cleanup method will send an onDestory message and that you can't get more messages after cleanup, or something.
[Corion]: ambrus: Yeah - I don't think the deep source dive will be necessary if things are implemented as simple as they could be :)) And hopefully I won't need (more) timely object destruction. I can update the screen at 60Hz and hopefully even do HTTP ...
[Corion]: ... transfers in the background. Now that I think about it, this maybe even means that I can run the OpenGL filters on Youtube input :)
[ambrus]: Corion: I mentioned that the unix event loop of Prima always wakes up at least once every 0.2 seconds. Have you found out whether the win32 event loop of Prima does that too?
[Corion]: ambrus: Hmm - I would assume that the onDestroy message is sent from the destructor and doesn't go through the messageloop, but maybe it is sent when a window gets destroyed but all components are still alive...
[ambrus]: Corion: partly deep source dive, partly just conservative coding even if it adds an overhead.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2016-12-09 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (150 votes). Check out past polls.