Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Suggestions for writing a Perl application

by bm (Hermit)
on Aug 29, 2003 at 13:17 UTC ( #287639=note: print w/ replies, xml ) Need Help??


in reply to Suggestions for writing a Perl application

Hmm. What I would suggest depends on your experience in other programming languages.

I find a nice way to learn a language is to start of with something simple, and then more and more featues until it is quite involved.
So how about writing a quiz, and adding additional, increasingly complicated, features over time?

  • Write a quiz that loads the questions and answers from a data file. The program asks the user each question and checks the answer for correctness. At the end of the questions the program displays the results "You scored 5/10"
  • Modify your program so that the questions and answers are stored in XML. Use a module to parse the XML. With the XML, allow multiple choice questions. Some multi choice questions may have more than one answer, so cater for that in your program and XML. (module XML::Simple)
  • add a timer, so that the quiz must be completed in at most X seconds, or each question must be answered in at most Y seconds
  • Prompt the user for their username, then add a feature that saves the quiz results into a database. Develop reports, so the user can find out their average score, number of tests taken, standard deviation, etc (module: DBI).
  • Add graphing, showing a say user's results or a average time taken to complete the quiz, over time (module: GD).
  • Provide a CGI interface for your script, so you can put it onto the world wide web (module: CGI)
  • Write a GUI for your quiz (module: Tk)
  • Turn your progam into a client/server app, where the server sends the question, the client sends the answer (module: IO::Socket)
  • Make your questions dynamic or random by querying the world wide web for the question/answer combinations, say from www.quiz.com or www.dictionary.com (module: LWP)

    If you manage to implement these features (or even some), you will be amazed at the power of knowledge you have gained.
    I hope this helps
    --
    bm


  • Comment on Re: Suggestions for writing a Perl application

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://287639]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (8)
    As of 2014-09-16 08:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite cookbook is:










      Results (157 votes), past polls