clean up your mess!
DESCRIPTION
This slides show some concepts of how clean your code messTRANSCRIPT
![Page 1: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/1.jpg)
Clean Up Your Mess!
By: Omnia Gamaltwitter: @Omnia_GwebSite: omnia.ninja
![Page 2: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/2.jpg)
Code Organization
![Page 3: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/3.jpg)
Piles on the Floor
Please, give me the white T-shirt ?
WHAT???
![Page 4: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/4.jpg)
The file pattern: a file for each type of object
![Page 5: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/5.jpg)
The Sock Drawer
Please, give me the blue T-shirt, the blue jeans and blue shoes.
![Page 6: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/6.jpg)
The folders pattern: a directory for each type of object
![Page 7: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/7.jpg)
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
![Page 8: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/8.jpg)
Writing Maintainable Code
![Page 9: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/9.jpg)
● Is readable● Is consistent● Is predictable● Looks as if it was written by the same person● Is documented
what that mean?
![Page 10: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/10.jpg)
Minimizing Globals
![Page 11: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/11.jpg)
Patterns
![Page 12: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/12.jpg)
● Not reinvent the wheel.● Abstraction● Communication between developers
Why?
![Page 13: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/13.jpg)
Writing Clear GIT Commit Message
![Page 14: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/14.jpg)
![Page 15: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/15.jpg)
![Page 16: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/16.jpg)
Told me, Which would you rather read?
![Page 17: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/17.jpg)
A diff will tell you what changed, but only the commit message can properly tell you why.
![Page 18: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/18.jpg)
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
![Page 19: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/19.jpg)
Writing API DOC
![Page 20: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/20.jpg)
ScalaDoc
javadoc
doxx
Docco
JSDoc
![Page 21: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/21.jpg)
KEEPCLAM
AND
CLEAN UPYour MESS
![Page 22: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/22.jpg)
Any Question?
![Page 23: Clean up your mess!](https://reader031.vdocument.in/reader031/viewer/2022020206/547e7c3bb4af9faa158b568a/html5/thumbnails/23.jpg)
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