I have posted enough code to this site, feel free to grab
some and criticize.
When I have examined my code in the past I find that my
average function is about 10 lines. At a guess about
1/3 of those functions are public for whatever package
they are in. Public functions get a comment. Function
names are descriptive. Most variables are private to a
If I cannot find a descriptive name for a 10 line function
that gives you some idea why that function exists, that
indicates a problem in how I am breaking the problem up.
As with any personal style, it takes getting used to. And
no, I don't always do a particulalry good job of it.
But I don't think that modularizing less and commenting
more would be an improvement.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
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:
Outside of code tags, you may need to use entities for some characters:
- 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.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||