SlideShare a Scribd company logo
1 of 49
2018 Spryker Systems GmbH
Commerce Operating System
2018 Spryker Systems GmbH
Who am I
Denis Turkov
- Lead Architect at Spryker on 2019
- Manage 3 different architecture teams
- Application Architecture
- Solution Architecture
- Technical Leadership
- E-commerce specialist in areas of B2C, B2B and
Enterprise Marketplaces
- Fall in love with high quality software
Twitter: PhilinTv
Overview on Spryker
2018 Spryker Systems GmbH
Development at Spryker
- up to 15 releases a day
- 368.245 lines (Tomas Votruba) on autumn 2017 (with 1.20% duplications)
- 620.838 lines on April 2018 (with 0.98% duplications)
- 1.097.818 lines on September 2019 (with ~0.92% duplications)
- doubled the number of modules last year
- up to 60 engineers changing code simultaneously
- Scrutinizer rate went from 9.5x to 9.8
2018 Spryker Systems GmbH
High Code Quality
5
It is not enough for code to work
Robert C. Martin (uncle Bob)
2018 Spryker Systems GmbH
High Code Quality - Our Mantras
6
2018 Spryker Systems GmbH
Cart Checkout Product OMS
CMS Stock Product Option Payment
Discount URL Product Set Sales
Module
Module
Module
Module Module Module Module Module
Modular Approach
Business benefits
How does a business benefit of a
quality code?
2018 Spryker Systems GmbH
Eric Schmidt ex-CEO Google (2016)
2018 Spryker Systems GmbH
2018 Spryker Systems GmbH
Where are business benefits?
− Shorten feature to market cycle
− Shorten dev onboarding
− Knowledge sharing
− Long life time
− Cheaper maintenance
− Vendor income channel
2018 Spryker Systems GmbH
High code quality/velocity over time
What’s the code quality
2018 Spryker Systems GmbH
Legacy code
− Code written more than 2 weeks ago
− Code written by someone else
2018 Spryker Systems GmbH
High quality code
− Satisfies users’ requirements
− Extendible
− Clear/Clean/Transparent
− Documented
− Bug-free
− Everybody loves it
2018 Spryker Systems GmbH
Over-engineering
− Any code less decomoposed than mine is a mess
− Any code more decomposed than mine is overengineered
2018 Spryker Systems GmbH
Define your rules
− Codestyle
− Decomposition level
− Conventions
− Team rules
− Pull request approval
− Done-Done state
Measure code quality
2018 Spryker Systems GmbH
Measure code quality
You don’t care about the quality,
when you are bootstrapping or riding a turtle
2018 Spryker Systems GmbH
Measure code quality
In a long run, a codebase w/o quality KPIs is like driving a car w/o a dashboard.
2018 Spryker Systems GmbH
Measure code quality
What you can measure
● Cyclomatic complexity
● Code duplication
● Bugs per line of code
● Test coverage
● Cohesion
● Coupling
● Instruction path length
● ...
2018 Spryker Systems GmbH
Measure code quality - Aggregators
● Codebeat
● Scrutinizer
● Codacy
● Code climate
● Travis/CircleCI/Any other CI
with your custom checks
2018 Spryker Systems GmbH
Measure code quality - Dashboard
Spryker/Core
Spryker/b2b-demo-shop
functional debt 13 tickets
technical debt 10 tickets
42 module cleanups
phpstan 5 level avg
int bugreports 8/month
ext bugreports 3/month
functional
user stories
76/month
Process
Growing professionals
2018 Spryker Systems GmbH
Learn basics
- Clean code principles: KISS, DRY, YAGNI, etc
- SOLID
- Design patterns
- Package principles: REP, CRP, CCP, ADP, SDP, SAP
- Extreme programming
2018 Spryker Systems GmbH
Upgrade to a professional
- Onboarding plan
- Collecting Requirements
- Training sessions
- Code reviews
- RFCs instead of opinions
2018 Spryker Systems GmbH
Upgrade to a professional: Training
- Peer review
- Peer programming
- Workshops
- Hackathons
- Presentations & Webinars
2018 Spryker Systems GmbH
Upgrade to a professional: CR
- Unified standards
- Code deep dive (no github screening)
- Review seniors’ code
- Peer review
- Multiple reviewers
2018 Spryker Systems GmbH
Upgrade to a professional: RFC
- define an issue and a status quo
- suggest a solution with a text, diagrams, a code example
- vote for a solution with consensus
- update conventions, code-style guide and documentation
Code entropy
2018 Spryker Systems GmbH
Code entropy
1. A computer program that is used will be modified
2. When a program is modified, its complexity will increase
Lehman, M. M.; Belady, L.A. (1985), Program evolution: processes of software change
2018 Spryker Systems GmbH
Code entropy
Broken windows theory:
Think twice when you break the first window
2018 Spryker Systems GmbH
Code entropy
Some other causes of entropy:
− no internal agreement
− difficult access to agreements/missing track on agreements updates
− poor code transparency
− indirect DRY violation
− ...
2018 Spryker Systems GmbH
Code entropy
Always leave the campground cleaner
than you found it
The Boy Scout Rule
Examples
2018 Spryker Systems GmbH
Poor code transparency
First week: initial commit
2018 Spryker Systems GmbH
...next week.
Poor code transparency
2018 Spryker Systems GmbH
Poor code transparency
2018 Spryker Systems GmbH
Give proper names, help your teammates
Poor code transparency
2018 Spryker Systems GmbH
Indirect DRY violation
2018 Spryker Systems GmbH
Indirect DRY violation
Tooling
2018 Spryker Systems GmbH
Tooling
− architecture sniffers
− based on phpmd (https://github.com/spryker/architecture-sniffer)
− based on phpstan
− code sniffer
− based on phpcs/phpcbf
− git-hooks
− release automation
− CI/CD
− tech-debt gateway
2018 Spryker Systems GmbH
- Define rules
- Measure quality
- Grow professionals
- Don’t do twice - use tooling
Takeaways
2018 Spryker Systems GmbH
Q&A
You cannot solve 21st century e-commerce
problems with 20th century technology
Twitter: PhilinTv

More Related Content

Similar to Code quality as an engine of your business @ TOWA 2019

Similar to Code quality as an engine of your business @ TOWA 2019 (20)

Automated DevOps Dynamic Testing for CI and CD
Automated DevOps Dynamic Testing for CI and CDAutomated DevOps Dynamic Testing for CI and CD
Automated DevOps Dynamic Testing for CI and CD
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & Validation
 
From zero to one - How we evolved our test automation processes and mindset i...
From zero to one - How we evolved our test automation processes and mindset i...From zero to one - How we evolved our test automation processes and mindset i...
From zero to one - How we evolved our test automation processes and mindset i...
 
Clobbi cable&wire Cable.Designer solution
Clobbi cable&wire Cable.Designer solutionClobbi cable&wire Cable.Designer solution
Clobbi cable&wire Cable.Designer solution
 
Clobbi cable&wire Cable Designer solution
Clobbi cable&wire Cable Designer solutionClobbi cable&wire Cable Designer solution
Clobbi cable&wire Cable Designer solution
 
Automated Requirements-Based Testing for Medical Device Software
Automated Requirements-Based Testing for Medical Device SoftwareAutomated Requirements-Based Testing for Medical Device Software
Automated Requirements-Based Testing for Medical Device Software
 
UniqueSoft Overview
UniqueSoft OverviewUniqueSoft Overview
UniqueSoft Overview
 
4th Qatar BIM User Day, BIM Solutions and Strategies
4th Qatar BIM User Day, BIM Solutions and Strategies4th Qatar BIM User Day, BIM Solutions and Strategies
4th Qatar BIM User Day, BIM Solutions and Strategies
 
Case Study: Automating Code Reviews for Custom SAP ABAP Applications with Vir...
Case Study: Automating Code Reviews for Custom SAP ABAP Applications with Vir...Case Study: Automating Code Reviews for Custom SAP ABAP Applications with Vir...
Case Study: Automating Code Reviews for Custom SAP ABAP Applications with Vir...
 
Open Source AI - News and examples
Open Source AI - News and examplesOpen Source AI - News and examples
Open Source AI - News and examples
 
How to implement a truly modular ecommerce platform on the example of Spryker...
How to implement a truly modular ecommerce platform on the example of Spryker...How to implement a truly modular ecommerce platform on the example of Spryker...
How to implement a truly modular ecommerce platform on the example of Spryker...
 
Tata ideation
Tata ideationTata ideation
Tata ideation
 
Cloud Task Execution at Scale with example from quant finance
Cloud Task Execution at Scale with example from quant financeCloud Task Execution at Scale with example from quant finance
Cloud Task Execution at Scale with example from quant finance
 
25 Jul 2018 - What is New in codeBeamer 9.2
25 Jul 2018 - What is New in codeBeamer 9.2 25 Jul 2018 - What is New in codeBeamer 9.2
25 Jul 2018 - What is New in codeBeamer 9.2
 
Jakob Freund: Camunda for IT Executives - Camunda Days
Jakob Freund: Camunda for IT Executives - Camunda DaysJakob Freund: Camunda for IT Executives - Camunda Days
Jakob Freund: Camunda for IT Executives - Camunda Days
 
sodalia framework
sodalia frameworksodalia framework
sodalia framework
 
AI for Software Engineering
AI for Software EngineeringAI for Software Engineering
AI for Software Engineering
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
 
Computing Without Computers - Oct08
Computing Without Computers - Oct08Computing Without Computers - Oct08
Computing Without Computers - Oct08
 
Inteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for CodeInteligencia artificial, open source e IBM Call for Code
Inteligencia artificial, open source e IBM Call for Code
 

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Recently uploaded (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

Code quality as an engine of your business @ TOWA 2019

  • 1. 2018 Spryker Systems GmbH Commerce Operating System
  • 2. 2018 Spryker Systems GmbH Who am I Denis Turkov - Lead Architect at Spryker on 2019 - Manage 3 different architecture teams - Application Architecture - Solution Architecture - Technical Leadership - E-commerce specialist in areas of B2C, B2B and Enterprise Marketplaces - Fall in love with high quality software Twitter: PhilinTv
  • 4. 2018 Spryker Systems GmbH Development at Spryker - up to 15 releases a day - 368.245 lines (Tomas Votruba) on autumn 2017 (with 1.20% duplications) - 620.838 lines on April 2018 (with 0.98% duplications) - 1.097.818 lines on September 2019 (with ~0.92% duplications) - doubled the number of modules last year - up to 60 engineers changing code simultaneously - Scrutinizer rate went from 9.5x to 9.8
  • 5. 2018 Spryker Systems GmbH High Code Quality 5 It is not enough for code to work Robert C. Martin (uncle Bob)
  • 6. 2018 Spryker Systems GmbH High Code Quality - Our Mantras 6
  • 7. 2018 Spryker Systems GmbH Cart Checkout Product OMS CMS Stock Product Option Payment Discount URL Product Set Sales Module Module Module Module Module Module Module Module Modular Approach
  • 9. How does a business benefit of a quality code?
  • 10. 2018 Spryker Systems GmbH Eric Schmidt ex-CEO Google (2016)
  • 12. 2018 Spryker Systems GmbH Where are business benefits? − Shorten feature to market cycle − Shorten dev onboarding − Knowledge sharing − Long life time − Cheaper maintenance − Vendor income channel
  • 13. 2018 Spryker Systems GmbH High code quality/velocity over time
  • 14. What’s the code quality
  • 15. 2018 Spryker Systems GmbH Legacy code − Code written more than 2 weeks ago − Code written by someone else
  • 16. 2018 Spryker Systems GmbH High quality code − Satisfies users’ requirements − Extendible − Clear/Clean/Transparent − Documented − Bug-free − Everybody loves it
  • 17. 2018 Spryker Systems GmbH Over-engineering − Any code less decomoposed than mine is a mess − Any code more decomposed than mine is overengineered
  • 18. 2018 Spryker Systems GmbH Define your rules − Codestyle − Decomposition level − Conventions − Team rules − Pull request approval − Done-Done state
  • 20. 2018 Spryker Systems GmbH Measure code quality You don’t care about the quality, when you are bootstrapping or riding a turtle
  • 21. 2018 Spryker Systems GmbH Measure code quality In a long run, a codebase w/o quality KPIs is like driving a car w/o a dashboard.
  • 22. 2018 Spryker Systems GmbH Measure code quality What you can measure ● Cyclomatic complexity ● Code duplication ● Bugs per line of code ● Test coverage ● Cohesion ● Coupling ● Instruction path length ● ...
  • 23. 2018 Spryker Systems GmbH Measure code quality - Aggregators ● Codebeat ● Scrutinizer ● Codacy ● Code climate ● Travis/CircleCI/Any other CI with your custom checks
  • 24. 2018 Spryker Systems GmbH Measure code quality - Dashboard Spryker/Core Spryker/b2b-demo-shop functional debt 13 tickets technical debt 10 tickets 42 module cleanups phpstan 5 level avg int bugreports 8/month ext bugreports 3/month functional user stories 76/month
  • 27. 2018 Spryker Systems GmbH Learn basics - Clean code principles: KISS, DRY, YAGNI, etc - SOLID - Design patterns - Package principles: REP, CRP, CCP, ADP, SDP, SAP - Extreme programming
  • 28. 2018 Spryker Systems GmbH Upgrade to a professional - Onboarding plan - Collecting Requirements - Training sessions - Code reviews - RFCs instead of opinions
  • 29. 2018 Spryker Systems GmbH Upgrade to a professional: Training - Peer review - Peer programming - Workshops - Hackathons - Presentations & Webinars
  • 30. 2018 Spryker Systems GmbH Upgrade to a professional: CR - Unified standards - Code deep dive (no github screening) - Review seniors’ code - Peer review - Multiple reviewers
  • 31. 2018 Spryker Systems GmbH Upgrade to a professional: RFC - define an issue and a status quo - suggest a solution with a text, diagrams, a code example - vote for a solution with consensus - update conventions, code-style guide and documentation
  • 33. 2018 Spryker Systems GmbH Code entropy 1. A computer program that is used will be modified 2. When a program is modified, its complexity will increase Lehman, M. M.; Belady, L.A. (1985), Program evolution: processes of software change
  • 34. 2018 Spryker Systems GmbH Code entropy Broken windows theory: Think twice when you break the first window
  • 35. 2018 Spryker Systems GmbH Code entropy Some other causes of entropy: − no internal agreement − difficult access to agreements/missing track on agreements updates − poor code transparency − indirect DRY violation − ...
  • 36. 2018 Spryker Systems GmbH Code entropy Always leave the campground cleaner than you found it The Boy Scout Rule
  • 38. 2018 Spryker Systems GmbH Poor code transparency First week: initial commit
  • 39. 2018 Spryker Systems GmbH ...next week. Poor code transparency
  • 40. 2018 Spryker Systems GmbH Poor code transparency
  • 41. 2018 Spryker Systems GmbH Give proper names, help your teammates Poor code transparency
  • 42. 2018 Spryker Systems GmbH Indirect DRY violation
  • 43. 2018 Spryker Systems GmbH Indirect DRY violation
  • 45. 2018 Spryker Systems GmbH Tooling − architecture sniffers − based on phpmd (https://github.com/spryker/architecture-sniffer) − based on phpstan − code sniffer − based on phpcs/phpcbf − git-hooks − release automation − CI/CD − tech-debt gateway
  • 46. 2018 Spryker Systems GmbH - Define rules - Measure quality - Grow professionals - Don’t do twice - use tooling Takeaways
  • 48. Q&A
  • 49. You cannot solve 21st century e-commerce problems with 20th century technology Twitter: PhilinTv