Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Newbie Ramping up on a big project

by Anonymous Monk
on Mar 24, 2003 at 22:50 UTC ( [id://245564]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This is kind of a broad question:

I've got a pretty hefty perl program to evaluate and make work. My perl experience is pretty much zero but I have been doing C/C++ for ten years. I have the "Llama" book. I have been using the program to eval as a vehicle to learn perl. This is proving to be difficult. I'd like to get this thing to work and figure out why after. Not so easy. I have gotten up-to-speed on building libraries and adding modules but it's taking much longer than I hoped to figure out configuration issues (connecting a database, figuring what is missing and where to get it). I think it doesn't help much that the app I got was running on linux and I am trying to make it work on Windows.

Is it unrealistic to take this approach, ie. "start with some thing smaller, you dope")? What resources would you suggest to get the thing going?

perl looks cool, I don't think I'll have any trouble, I'm just under the gun to figure out how to get this puppy running ASAP. (I'd appreciate any advice about how long ASAP might be for someone starting from zero, too).

Thanks for your thoughts

Replies are listed 'Best First'.
Re: Newbie Ramping up on a big project
by lacertus (Monk) on Mar 24, 2003 at 23:09 UTC
    This is so vague it's well nigh impossible to formulate an informative reply. Are you making some kind of Pron grepper for worldsex that is too embarassing to discuss specifically?

    Perl is a tool best understood thru time; since time is obviously a serious issue, you might not be the correct man for the job in this case. Sometimes you just have to own up and say "I am not qualified to do this." Having years of C experience does not make this downgrading; rather it proves you are an honest employee.

    The Llama is an excellent book; if you take a few days and read it thoroughly, and then get it's big brother coding Perl, you might just be able to pull this off, if you sacrifice enough calves to the gods...

    Anyways, best of luck!
    update: sorry anonymous monk, I think the above could be perceived as a flame, which wasn't my intent! I'm available for help (as I'm sure other Monastary friends are) if you care to establish an account and post the intricacies that are causing grief to your notepad.
      then get it's big brother coding Perl

      I guess you mean "Programming Perl".

      All the best.

      --
      Regards,
      Helgi Briem
      helgi AT decode DOT is

Re: Newbie Ramping up on a big project
by dragonchild (Archbishop) on Mar 24, 2003 at 23:06 UTC
    It'll take a little more than that to give any reasonable estimate. (Unreasonable would be "an hour to a year" type of estimates.)

    Perl on Windows ... you tend to have to use a lot of Win32::ODBC and the like. Personally, I shy away from Win32 programming period, let alone in Perl.

    General advice (which you probably already know) - build the Win32 stuff in components. Make sure you can connect to the DB. If you can't, then ask that question. Maybe go through 10 or 20 questions before you get all the components figured out.

    ------
    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.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

Re: Newbie Ramping up on a big project
by hiseldl (Priest) on Mar 24, 2003 at 23:24 UTC

    One thing that would make ASAP sooner rather than later would be to at least run your script through perl -cw myscript.pl and post the errors so we can get a better picture of what you're going through. And, as stated in the previous nodes, post your problem area code to show us where you are getting bogged down.

    A handy tool for you might also be perltidy to clean up the program you inherited and make it more readable.

    Cheers!

    --
    hiseldl
    What time is it? It's Camel Time!

Re: Newbie Ramping up on a big project
by Anonymous Monk on Mar 25, 2003 at 15:12 UTC
    Is it unrealistic to take this approach

    No. It's very realistic. This is my single pet peeve about many programmers - they're extremely arrogant. Many people will leave you to believe programming is extremely hard, and requires many years to master. Bullshit. I've seen people go from complete novices to successfully writing first person shooters in 2 weeks. You just have to have the right attitude. You also have a strong background in C (we won't utter the name of its ungodly, bloated extension in this holy place) which is a lot harder to learn than Perl, so it should be a breeze.

    For learning Perl 5, I'd first recommend picking up Programming Perl, it's a lot more in-depth and it provides an excellent reference. Give that a quick read-through, try out a couple of the main ideas along the way, then start your project. Remember not to treat Perl special, it's not a magic cure to all your programming problems. You still have to have a solid design process and constantly test and refactor your code.

    And now that I've said that, I'd personally recommend you do not learn perl 5. Barring a couple highly targeted bouts of insanity, Perl 6 is going to make it look like TCL. In the meantime, try out Python or Ruby, unless you have a specific reason for learning Perl 5.

    Oh and if you want specific suggestions on your project, you'll have to post more about it.

      And now that I've said that, I'd personally recommend you do not learn perl 5. Barring a couple highly targeted bouts of insanity, Perl 6 is going to make it look like TCL.

      First of all, the project is nothing nerfarious. I kept the first note short to save y'all time.

      I inherited the code from someone else who is not so motivated to help me understand it. So, my main job is to just get it up and running and to understand it is further down the list. This would seem to preclude going to Perl 6. I did notice a .NET extension of perl out there. I have not gotten to the point of looking into that. But, I have other code coming to evaluated which is .NET and so this intrigued me. Any comments on that (if you know what it is).

      The code I got is a web crawler (but only with permisson!). As I mentioned, I am a long time C/C++ programmer and I have seen these kinds of things before. I have just mostly done them on Windows and not Linux or other flavors of unix, so some of the configuration stuff has got me bogged down (although I know unix shell OK). The "documentation" says it's using

      • CGI
      • CGI::Cookie, (for session tracking)
      • URI
      • DBI
      • POSIX (for strftime)

      And that is about the extent of the docs :-). I seem to have gotten all the libs installed. I found inside and started to figure that out. I am putting this all on my Windows XP machine (where I have been using .NET) and IIS. This might be a problem. Aside from the biases you might hold near and dear, perl doesn't seem to like Win32 too much, me thinks. I think i may be better off with Apache, for example.

      I have been having trouble now with some missing modules which seem to be installed but are not found (more on that later). I found DBI on CPAN (MYSQL Drivers) but it wanted ppm to install and I cannot seem to get ppm to work. Ugh. Installs and tests etc. seem to go OK for the most part, although its hard to decide if a "skipped test" is critical. I must admit to having given up rather easily on this problem and decided to go back to the books since I have no clue as to what the monster is I have started to create, which has caused me to seek advice.

      So, that seems to be all the details worth posting. I am now getting "insert user failed ($dbh doesn't appear to be defined)" on one of the apps. which appears to be related to my poor MySQL driver installation if you care to comment. Inside doesn't seem to show it but the CPAN download seems to indicate it's in there. But, I haven't gotten to the point of quite figuring that all out. I am trying to understand the architecture of the whole thing now since it's not going to just work with one pull on the starter cord :-)

      One observation: it seems that there are dozens (lots of, many, more than one) of implementations out there (in CPAN, at least). This seems like a good thing but is rather daunting at first. What other tools do you recommend for manging experimenting with all these things? (other than inside which I already found).

      Thanks much, cheers

        Hello Again,

        Well it certainly sounds as if you have taken on quite a task, but one which I am confident that you'll be able to manage from the sounds of things. Perl, while quite large architecturally, is easier to learn because it is intuitive; much more so than C(++), so you'll quickly be able to comprehend its intricacies.

        OK, after that ego booster, let me say that I would IMO move to a *nix based box for development. Apache/unix are what Perl was originally intended for, and sits quite at home in this platform. If moving to linux is out of the question, you might find it easier (and more secure, etc, etc...) to get the win32 version of Apache, to replace crusty IIS.

        If MYSQL is bogging you down (I'm so impressed with MYSQL, but it is quite bloated and generally best suited for applications where numerous simulatenous queries are performed), you might consider reimplementing the built in functionality of Berkely DBASE access in Perl (not sure how this works on a win32 box, if at all). If you have the Llama, Berkely DBASE is covered in one of the last chapters, and in only a few pages can get you on your feet using this aspect. I use Berkely almost exclusively, because my databases are generally large, but not accessed simultaneously. Also, I don't really need all the inherent permission capabilities, etc, that MYSQL has.

        I think everyone has difficulties now and again installing modules from CPAN; with such a disparate number of extension Perl can take on, it's easy to find yourself in dependency hell. I would recommend <plug> installing Slackware Linux </plug> and building Perl from source. Maybe even create to parallel installs, one for mucking about with new/untested modules, and a stable/quasi-vanilla one that you can use for important/main development. That's what I do at least.

        That's long and my thoughts are rambling, but I hope it gets you on track.

        ------------------------------------
        "There is more in heaven and earth
        than is dreamt of in your philosophy"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://245564]
Approved by ChemBoy
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-19 19:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found