, first off: Good luck with your project. Secondly, in case you have never worked on an extensive project before, some tips which have helped me in the past (you may or may not consider them useful):
- Split the problem into sub-problems, and those into smaller problems, for example (very rough) data input, data processing, data output or (finer for data input) get data from database, parse data into appropriate formats for processing.
- For every larger problem group, generate an own module. This will split your code into readable portions. A larger problem group would for example be the output to an HTML table, possibly as submodule in a module that outputs the whole report. Test every module thoroughly after you have finished it.
- Every module can be split into functions as sketched above. For each function, you should note in a comment -- before you write the function body -- what input the function expects, what it does, and how the output is formatted. After you finished a single function, always test it with sample data. You should have small functions that do part of the dirty work of the larger functions to make your code more readable.
- Nesting is good (see above)
- Good luck again
This method provides you with a LEGO way of solving your problem: First, buld up parttial solutions from the bricks, group them into larger partial solutions and finally into the real
The partial documenting "on the go" is a bit more work, but it'll pay offonce you wonder what arguments should be passed to that what-was-it-called function.
And the last thing: Whenever you have problems with a piece of code that you think should work, but doesn't, post it and you'll see (if it is a sensible small problem - splitting ;-) that we try to help with code as much as with theory.
Hope this helped.
About the HTML part: Although you probably don't, if you should
know German, have a look at Stefan Münz's Selfhtml
tutorial; it is simply the best HTML tutorial I know.
Entropy is the tendency of everything going to hell.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||