Announcing the first JCWren programming challenge! (an idea shamelessly stolen from amelinda)
Write some code, win a perlmonks.org T-shirt, become famous1.
The idea:
To have a monthly contest for programming projects demonstrating some degree of skill, but within the ability of an average monk. Projects should take at least a few hours to complete, but shouldn't require skipping work for 3 days. Prizes are fiananced out of my pocket, and are (currently) in no way related to EDC, other than using them as a source for merchandise (and they ARE the only ones with PerlMonks T-Shirts).
The challenge:
Implement a Perl program that will read the file http://headlinenews.cnn.com/QUICKNEWS/virtual/swf.headline.txt and generate a web page with a 3 column table, the left column with the state name, the middle column with a date/time stamp, and the right column with the headline. The script should be able to be run from the cron (*nix) or at (Windows) scheduler. As new headlines for each state are encountered, they should be timestamped and added to a database (flat file, using the CPAN module of your choice. Not mySQL, postGRES, or any other potentially non-portable database). The webpage should be generated when the script is run, and as such is considered static. The page should contain a META tag to attempt an auto-refresh. Above the table should be a list of all states that headlines have been encountered for, and a HREF tag to that table entry (states with no headlines should not have an active link). Required command line options are:
- A parameter specifies the refresh interval for the META tag (default is 10 minutes).
- A parameter to specify the output path and filename (default is index.html in the current directory).
- A parameter to specify (in minutes) the time before an entry is aged out of the database (default is 24 hours).
- An option to clear any existing database.
Sample output:
Georgia | 2000/11/28 17:22 | Major earthquake occurs on little known fault line between Atlanta and Macon. Trailer parks considered responsible. |
Georgia | 2000/11/28 19:44 | Lake Sidney Lanier, a major recreational lake, is at a record low. Many boats now high and dry. |
Michigan | 2000/11/28 17:22 | Tim Vroom, local hero and humanitarian, takes www.perlmonks.org commercial, makes millions. |
Note that some state names contain spaces, and should not break. The date/time stamp should also not break on a space. Extra points2 for a command line switch that allows font name specification for the text, and uses them correctly for all text on the page.
The rules:
I have done my best to create what I think are a fair set of rules, and within the capabilities of the average monk. If you have a point that needs clarifying, it needs to be before Friday morning (2000/12/01).
A copy of this page is available at www.tinymicros.com/contest
In reply to JCWren Programming Challenge - Win a Perlmonks T-Shirt! by jcwren
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |