Using Super search with words 'style' 'good coding' 'good programming' should you provide you tons of useful nodes and advices (too many too mention).
Here are few :
- Keep it simple stupid
- Use strict (when writing them)
- Use explicit name (for the sub and the var)
- Document your code
- Make your code readable (it's even better than just documenting)
- Don't document your code TOO much (tilly convinced me on this one...)
- Be efficient (choose the best algo/structures)
- Test your code.
- Make your code upgradable (let you a chance to change any part of the design)
- Make your API clear (a lot of subtle error come from a misunderstood API)
- Subroutines should fit on a screen (old programming practice, but usually good. If it doesn't it should be possible to break into several smaller subs...)
All in one if I should give you only one advice, I would say :
Just take what you find clever/elegant/useful in other people way of coding and include it to your style.
(and I guess you'll find a lot to learn from the coders hanging in the monastery)
Any way if you are proud of it, and dare to show it to others,
It should mean that it's ok...
;-)
"
Only
Bad
Coders
Badly
Code
In
Perl" (OBC2IP)
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:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.