Premature optimisation: The Root of All Evil
-
Upload
fabio-akita -
Category
Software
-
view
719 -
download
1
Transcript of Premature optimisation: The Root of All Evil
SPA e-commerce http://www.loja.com.br/#!/produtos/item-001
http://www.loja.com.br/?_escaped_fragment_=/produtos/item-001
• Minimum IT Cost:
• USD 1000 - Cloud Services
• USD 3000 - 1 Developer
• USD 4000 - 1 “Responsible” (Manager, Marketing, etc)
• Minimum IT Cost:
• USD 1000 - Cloud Services
• USD 3000 - 1 Developer
• USD 4000 - 1 “Responsible” (Manager, Marketing, etc)
• Total: USD 8.000/month (USD 96.000/year)
• Minimum IT Cost:
• USD 1000 - Cloud Services
• USD 3000 - 1 Developer
• USD 4000 - 1 “Responsible” (Manager, Marketing, etc)
• Total: USD 8.000/month (USD 96.000/year)
• Minimum Business Requirement:
• Minimum IT Cost:
• USD 1000 - Cloud Services
• USD 3000 - 1 Developer
• USD 4000 - 1 “Responsible” (Manager, Marketing, etc)
• Total: USD 8.000/month (USD 96.000/year)
• Minimum Business Requirement:
• Revenue: > USD 2 MI / year
• Minimum IT Cost:
• USD 1000 - Cloud Services
• USD 3000 - 1 Developer
• USD 4000 - 1 “Responsible” (Manager, Marketing, etc)
• Total: USD 8.000/month (USD 96.000/year)
• Minimum Business Requirement:
• Revenue: > USD 2 MI / year
• IT Cost / Revenue ratio: < 5%
• /do/you/have/friendly/urls?
• sitemap.xml?
• Proper HTTP 301 Redirections?
• Social Network buttons?
• /do/you/have/friendly/urls?
• sitemap.xml?
• Proper HTTP 301 Redirections?
• Social Network buttons?
• Periodic ORIGINAL CONTENT publishing?
• /do/you/have/friendly/urls?
• sitemap.xml?
• Proper HTTP 301 Redirections?
• Social Network buttons?
• Periodic ORIGINAL CONTENT publishing?
• No duplication duplication of content content?
• /do/you/have/friendly/urls?
• sitemap.xml?
• Proper HTTP 301 Redirections?
• Social Network buttons?
• Periodic ORIGINAL CONTENT publishing?
• No duplication duplication of content content?
• THEN OK!
I.
II.
III.
IV.
V.
VI.
VII.
VIII.
IX.
X.
XI.
XII.
Codebase One codebase tracked in revision control, many deploys
Dependencies Explicitly declare and isolate dependencies
Config Store config in the environment
Backing services Treat backing services as attached resources
Build, release, run Strictly separate build and run stages
Processes Execute the app as one or more stateless processes
Port binding Export services via port binding
Concurrency Scale out via the process model
Disposability Maximize robustness with fast startup and graceful shutdown
Dev/prod parity Keep development, staging, and production as similar as possible
Logs Treat logs as event streams
Admin processes Run admin/management tasks as one-off processes
• NO Test Suite with below 70% coverage
• NO CodeClimate below 3.0 rating
• NO source code file with hundreds of LOC
• NO Test Suite with below 70% coverage
• NO CodeClimate below 3.0 rating
• NO source code file with hundreds of LOC
• NO COPY AND PASTE EVERYWHERE!!!
• NO Test Suite with below 70% coverage
• NO CodeClimate below 3.0 rating
• NO source code file with hundreds of LOC
• NO COPY AND PASTE EVERYWHERE!!!
• NO functions with more than 1 page down
• NO Test Suite with below 70% coverage
• NO CodeClimate below 3.0 rating
• NO source code file with hundreds of LOC
• NO COPY AND PASTE EVERYWHERE!!!
• NO functions with more than 1 page down
• NO table with dozens of fields
• NO Test Suite with below 70% coverage
• NO CodeClimate below 3.0 rating
• NO source code file with hundreds of LOC
• NO COPY AND PASTE EVERYWHERE!!!
• NO functions with more than 1 page down
• NO table with dozens of fields
• NO hours to clone, setup and deploy!!
• SQL N+1 Queries
• Too much SQL
• Too much SQL LIKE instead of Elastic
• Lack of proper SQL indexes
• SQL N+1 Queries
• Too much SQL
• Too much SQL LIKE instead of Elastic
• Lack of proper SQL indexes
• Too much unused code that was not removed
• SQL N+1 Queries
• Too much SQL
• Too much SQL LIKE instead of Elastic
• Lack of proper SQL indexes
• Too much unused code that was not removed
• No CDN or proper HTTP Cache invalidation headers
• SQL N+1 Queries
• Too much SQL
• Too much SQL LIKE instead of Elastic
• Lack of proper SQL indexes
• Too much unused code that was not removed
• No CDN or proper HTTP Cache invalidation headers
• Too much synchronous work that should be async jobs
• Increase Revenue > Lower Costs
• “Best of Breed” Open Source
• SaaS > PaaS > IaaS > On-Premise
• SEO & SEM =~ Astrology
• Increase Revenue > Lower Costs
• “Best of Breed” Open Source
• SaaS > PaaS > IaaS > On-Premise
• SEO & SEM =~ Astrology
• Maintainability > Performance
• Increase Revenue > Lower Costs
• “Best of Breed” Open Source
• SaaS > PaaS > IaaS > On-Premise
• SEO & SEM =~ Astrology
• Maintainability > Performance
• PRIORITIES!!
• Increase Revenue > Lower Costs
• “Best of Breed” Open Source
• SaaS > PaaS > IaaS > On-Premise
• SEO & SEM =~ Astrology
• Maintainability > Performance
• PRIORITIES!!
• No Metrics, No Optimization
• Increase Revenue > Lower Costs
• “Best of Breed” Open Source
• SaaS > PaaS > IaaS > On-Premise
• SEO & SEM =~ Astrology
• Maintainability > Performance
• PRIORITIES!!
• No Metrics, No Optimization
• You != Unicorn