User Tools

Site Tools


en:devmon:guidelines:20bestpractices

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:devmon:guidelines:20bestpractices [2021/08/19 07:22] adminw1k1en:devmon:guidelines:20bestpractices [2021/08/19 07:29] (current) adminw1k1
Line 1: Line 1:
-====== 20 most important Perl Best Practices ======  +====== 20 Best Practices ======  
-  - Correctness, simplicity and clarity come first. +  - **Correctness****simplicity** and **clarity** come first. 
-  - Avoid unnecessary cleverness. If you must rely on cleverness, encapsulate and comment it.+  - Avoid unnecessary **cleverness**. If you must rely on cleverness, encapsulate and comment it.
   - Avoid duplication ([[http://en.wikipedia.org/wiki/Don't_repeat_yourself|DRY]]).   - Avoid duplication ([[http://en.wikipedia.org/wiki/Don't_repeat_yourself|DRY]]).
   - Coupling and Cohesion. Systems should be designed as a set of cohesive modules as loosely coupled as is reasonably feasible.   - Coupling and Cohesion. Systems should be designed as a set of cohesive modules as loosely coupled as is reasonably feasible.
Line 15: Line 15:
   - Don't optimize prematurely. Benchmark before you optimize. Comment why you are optimizing.   - Don't optimize prematurely. Benchmark before you optimize. Comment why you are optimizing.
   - Agree upon a coherent layout style and automate it. [[en:devmon:guidelines:tidy|(see tidy)]]   - Agree upon a coherent layout style and automate it. [[en:devmon:guidelines:tidy|(see tidy)]]
-  - Adopt a policy of zero tolerance for warnings and errors. Tools such as Perl::Tidy and Perl::Critic can help here.+  - Adopt a policy of zero tolerance for warnings and errors. Tools such as Perl::Tidy and Perl::Critic can help here.[[en:devmon:guidelines:tidy|(see tidy)]]
   - Commenting: prefer to make the code obvious; don't belabor the obvious; comments describe what and why not how.   - Commenting: prefer to make the code obvious; don't belabor the obvious; comments describe what and why not how.
   - Separate user vs maintainer documentation.   - Separate user vs maintainer documentation.
-  - Use a revision control system and single-step automated build/test. +  - Use a revision control system [[https://github.com/bonomani/devmon]] and single-step automated build/test. 
-  - "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live" (Damian Conway) +  - **"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live"** (Damian Conway) 
en/devmon/guidelines/20bestpractices.1629350534.txt.gz · Last modified: 2021/08/19 07:22 by adminw1k1