Upload
omnia-helmi
View
334
Download
1
Embed Size (px)
DESCRIPTION
This slides show some concepts of how clean your code mess
Citation preview
Clean Up Your Mess!
By: Omnia Gamaltwitter: @Omnia_GwebSite: omnia.ninja
Code Organization
Piles on the Floor
Please, give me the white T-shirt ?
WHAT???
The file pattern: a file for each type of object
The Sock Drawer
Please, give me the blue T-shirt, the blue jeans and blue shoes.
The folders pattern: a directory for each type of object
Modularity
Now any random developer can open the top-level folder and immediately gain insight into what the application does.
The module pattern: a module for each feature
Writing Maintainable Code
● Is readable● Is consistent● Is predictable● Looks as if it was written by the same person● Is documented
what that mean?
Minimizing Globals
Patterns
● Not reinvent the wheel.● Abstraction● Communication between developers
Why?
Writing Clear GIT Commit Message
Told me, Which would you rather read?
A diff will tell you what changed, but only the commit message can properly tell you why.
The rules of a great git commit message
1. Separate subject from body with a blank line2. Limit the subject line to 50 characters3. Capitalize the subject line4. Do not end the subject line with a period5. Use present tense.6. Don’t use “I”, “Me”, ...7. Use the body to explain what and why vs. how
Writing API DOC
ScalaDoc
javadoc
doxx
Docco
JSDoc
KEEPCLAM
AND
CLEAN UPYour MESS
Any Question?
ref:● Scalable code organization in AngularJS ● Code Organization in Large AngularJS and JavaScript Applications ● How to Write a Git Commit Message● Essentials - Chapter 2 / O’REILLY - JavaScript Patterns by Stoyan
Stefanov