Top Banner
How To Write Good Code ? Sunny ions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mo
23
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: How to write good code ?

How To Write Good Code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Page 2: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Commenting & Documentation

Page 3: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Consistent Indentation

Page 4: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Avoid Obvious Comments

Page 5: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Code Grouping

Page 6: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Consistent Naming Scheme

Page 7: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

DRY Principle

DRY stands for Don't Repeat Yourself. Also known as DIE: Duplication is Evil.

Page 8: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Avoid Deep Nesting

Page 9: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Limit Line Length

Page 10: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

File and Folder Organization

Page 11: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Consistent Temporary Names

Page 12: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Capitalize SQL Special Words

Page 13: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Separation of Code and Data

Page 14: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Object Oriented vs. Procedural

Page 15: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Read Open Source Code

Page 16: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Naming conventions

Page 17: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Whitespace

Page 18: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Don’t optimize code too soon

Page 19: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Never hack a framework

Page 20: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Refactor every so often

Page 21: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Use revision control for your code

Page 22: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Allow time for learning

Page 23: How to write good code ?

Safil SunnySolutions Architect | Lead Developer | Certified ScrumMaster® (CSM) in Mobility

Thank you !!