Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

A good Beginner's project

by MCauth (Novice)
on Nov 01, 2000 at 19:14 UTC ( [id://39420]=monkdiscuss: print w/replies, xml ) Need Help??

Hello all. A couple of weeks ago someone posted a question looking for a good project to work on as a beginner. I am new to Perl myself, and have found a good one: Setup a personal address book, using CGI, DBI/DBD, and a database to drive the thing. I've come across MANY usefull issues with this small and useful project.

1) Apache setup / config
2) MySQL setup / config / usage
3) Learning basic features of CGI.pm and DBI modules
4) Code efficiency and performance issues
5) Maintaining state between pages.
6) Writing code I can come back to and understand later.
7) Overall design.

I've gotten the thing up and working pretty easily, but almost daily I think of some way to tighten up my code, add a feature, or make it just plain cooler. Hope this is useful for someone out there. Write me if you are interested in specifics.
Matt

Replies are listed 'Best First'.
RE: A good Beginner's project
by Anonymous Monk on Nov 02, 2000 at 18:44 UTC
    j2ulian: like the above post, you can approach your learning in an almost infinite amount of ways. Here was my thinking, and a start on how I did it: I wanted a project that would tie together many technolgies that I'm interested in, and something relatively easy to get going. This one was fun because you get lots of gratification from it, and you can add tons features on to it as you learn. Here's what I did...

    -- Been running Linux for a while now. Everyone these days ships with Apache server. Read the documentation for apache and some of the how-tos to get the basics down. It's very very easy to serve up basic pages from you computer this way. It's very likely all you have to do is put your scripts in the cgi-bin, chmod them, and you're ready to call to localhost (your computer).

    -- Get MySQL. Note: don't use the RH7 RPM of MySQL. Horrible. They may have the bug fixed now, though. The program has an EXCELLENT basic tutorial in the online docs.

    -- Learned enough Perl (my true objective here!) to grab some modules from CPAN: you'll need to download DBI.pm and a driver for whatever database you use (acronym: DBD). Load up the module (by the way, any relatively new version of perl ships with the awesome CGI module).

    -- I actually am a book junkie (got a couple of Merlyn's :)). I bought the Cheetah book (Programming the Perl DBI, published by O'reilly) to learn the DBI module, but the basics are pretty straight forward if you know how to call objects and methods. Look for a Perl Object tutorial on the web for the basics. May even be one here. Don't know, I'm too new :)

    the next steps run like this: * Learn enough MySQL (or other dB) to setup a basic databse for all of your contacts.
    * Learn the CGI module well enough (lots of tutorials out there on this extremely popular module) to do some very basic page generation with forms.
    * Learn the DBI module well enough to do a fetch from your database.
    * MAKE SURE you "use strict" for your scripts.
    * THEN GO FOR IT! You'll learn many many things by making errors (tip: I like to "use diagnostics" for debugging. Good for beginners like us!).

    After you try some of this and begin to understand it, you'll see why Perl is often referred to as a 'glue' language, and a great one at that! I've had a blast with this one...Good luck.
    --Matt
RE: A good Beginner's project
by j2ulian (Initiate) on Nov 02, 2000 at 00:07 UTC
    Hi I too am a beginner and would like a project to further my understanding of the language. Please write me back with details on how you got started. Thank you very much in advance.
      How you get started is really a personal preference. When I learn a language I like to have a list of functions with small examples. I then start by picking a big project I need to do, and start writing code. Other people I know like to start with smaller projects, or go through tutorials. The best advice I can give you is to try one way, if that way is uncomfortable for you, choose another way and try again. If you need ideas for a project, look through programs other monks have posted, and then try to write a program that does the same thing. After you write your program, look at how the original program was written. You will notice many differences, and it might show you a new technique or two.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-20 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found