-
Notifications
You must be signed in to change notification settings - Fork 1
Formatting
Alex Aubé edited this page Apr 22, 2015
·
3 revisions
- If the code is a mess, it usually leads to other problems. Ex: Security...
- Quality is found in the attention to details
- It is a must
- Choose a bundle of rules to properly format and always use them
Make your code breath
- Complete idea => grouped lines represent a complete idea
- Density => Reduce the effort needed to comprehend the code
- Distance between entities =>
- Local variables => As near as possible to their use
- Member variables => Grouped at top of the class
- Methods with dependencies => Natural calling order, unless there is conceptual affinity...
Be uniform above all
- Spaces in the right areas
- Spaces are for separation, distinction
- Alignment
- Indentation