SlideShare a Scribd company logo
1 of 51
Download to read offline
Super
charging
project
health
check
go beyond the usual
practices
David
Horvath
Lead iOS Developer
@egyes
Swifters meetup
2021 March
digital
agency
┘ Lot of different projects throughout the years


┘ Project handovers


┘ Code audits
issues
┘ Tons of things to check


┘ Lot of different approaches


┘ Require a lot of time (it’s never enough)


┘ Huge projects - Potentially overlooked problems
goals
┘ Find the most crucial issues in the shortest time


┘ Be more efficient in gaining insights


┘ Efficiently identify the changes to the code which provide the most value
useful
when
┘ You have to do a project audit


┘ You join a new project


┘ You just want to get new insights into your current project


┘ You want to refactor or rewrite


∷ You can show these findings to your client/boss/lead
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats(SourceForge)
git reports
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats


┘ Checking project size
cloc
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats


┘ Checking project size


∷ Cloc


┘ Open the project and build it


∷ High-level overview
high-
level
overview
┘ File structure


┘ Naming conventions


┘ Modularization


┘ Dependencies (spm, pod, carthage)


┘ UI (code / xib / storyboards)


┘ Architecture


┘ Compile time


┘ Xcode memory graph
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats


┘ Checking project size


∷ Cloc


┘ Open the project and build it


∷ Highlevel overview


┘ Visualize class dependencies
dependency visualizer
dependency visualizer
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats


┘ Checking project size


∷ Cloc


┘ Open the project and build it


∷ Highlevel overview


┘ Visualize class dependencies


∷ objc-dependency-visualizer


┘ Static code analysis


∷ Cyclomatic complexity


∷ Code duplication
lizard
lizard
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats


┘ Checking project size


∷ Cloc


┘ Visualize class dependencies


∷ objc-dependency-visualizer


┘ Checking cyclomatic complexity


∷ Lizard


┘ Static code analysis


∷ Cyclomatic complexity


∷ Code duplication


∷ Lizard / CPD


┘ Checking dead code
periphery
process
┘ Checking git reports


∷ Interesting details about the project


∷ Gitlab / Github - GitStats


┘ Checking project size


∷ Cloc


┘ Visualize class dependencies


∷ objc-dependency-visualizer


┘ Checking cyclomatic complexity


∷ Lizard


┘ Static code analysis


∷ Cyclomatic complexity


∷ Code duplication


∷ Lizard / CPD


┘ Checking dead code


∷ Periphery
quick
process
summary
┘ We have a lot of information about the project already


∷ High-level overview


∷ Data about the project size and age


∷ List of complexities


∷ List of duplication


∷ Duplication rate


∷ List of unused codes


∷ Nice visualization of the class dependencies


┘ It only took a few hours
so
what’s
new?
problems
┘ We spend so much time looking at the current state of the code
that we forget its history


┘ Its hard to understand large-scale complex systems by looking
at a snapshot of the code


┘ We miss a lot of information
where can
we find
more info?
version
control
systems
┘ We use it to keep track of the project history


┘ Rarely think about the insights we can get by mining data from it


┘ We can learn about the environment


┘ We can learn about how we work


┘ Predict which parts of the code have the most defects


┘ Find the code that matters most for maintenance


┘ Information is real power
git log
code
maat
┘ Command line tool


┘ To mine and analyze data from version control systems


┘ It supports different version control systems


∷ git, svn, perforce, tfs, mercurial


┘ We can use it to detect hotspots


┘ We can use it to detect architectural problems


┘ And so much more
generate maat readable log
summary
Hotspots
┘ Hotspots are your guide to improvements and
refactorings


┘ Research has shown that frequent changes to complex
code generally indicate declining quality


┘ Over time our development focus shifts so the hotspots
will also shift


┘ Hotspots can predict defects very well


┘ We can find them at the intersection of complexity and
effort
revisions (changes)
cloc --by-file
cloc --by-file
merge them for hotspots
Coupling
┘ We can detect which files are changing together most
of the time


┘ Detect architectural / design issues


┘ Explicit coupling


∷ What tend to change together (screen + vm)


┘ Temporal coupling


∷ This is what we are looking for


∷ Can be false positives (service + test)


∷ Can be serious design problem


∷ Can be copy-paste
sum of coupling
coupling by files
false positives
true problems
path transformation
transformed coupling info
transformed coupling info
other
features
┘ Complexity trends


∷ Evaluate growth patterns


∷ Analyze complexity trends


┘ Discover organizational metrics


∷ Social problems


∷ Evaluate communication costs


∷ Build knowledge map


∷ Visualize knowledge loss


┘ Code chur


∷ Predict defects


∷ Discover process loss from code
process
summary
┘ High-level overview of the codebase


┘ List of complexities


┘ List of duplications


┘ List of unused codes


┘ List of hotspots


┘ List of problematic dependencies
goals
┘ ✅ Find the most crucial issues in the shortest time


┘ ✅ Be more efficient in gaining insights


┘ ✅ Efficiently identify the changes to the code which provide the most
value
suggesti
ons
┘ Run these analyses every few months


┘ Can be part of CI/CD release process


┘ Talk the findings through with your team


┘ Read Adam Tornhill’s book to learn more:


Your Code as a Crime Scene
sum up
┘ With the right tools you can quickly and efficiently spot
problems


┘ You can use your version control systems to have more
information about your project


┘ By mining data from it, you can get a deeper
understanding of your design / architectural problems


┘ With the right data you can back your refactoring/
rewrite proposals


┘ Focusing on the right things early you can save a lot of
maintenance cost
thank
you
for your
attention
David
Horvath
Lead iOS Developer
@egyes
tools
┘ GitStats


∷ http://gitstats.sourceforge.net


┘ Cloc


∷ https://github.com/AlDanial/cloc


┘ Lizard


∷ https://github.com/terryyin/lizard


┘ Periphery


∷ https://github.com/peripheryapp/periphery


┘ Objc-dependency-visualizer


∷ https://github.com/PaulTaykalo/objc-dependency-visualizer


┘ Swift-dependency-visualizer


∷ https://github.com/PrzemyslawCholewaDev/swift-dependency-
visualizer


┘ Code maat


∷ https://github.com/adamtornhill/code-maat

More Related Content

What's hot

IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...
IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...
IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...Bartosz Chrabski
 
GlobalLink NEXT 2017 US - TransPort (Chicago)
GlobalLink NEXT 2017 US - TransPort (Chicago)GlobalLink NEXT 2017 US - TransPort (Chicago)
GlobalLink NEXT 2017 US - TransPort (Chicago)jwcampbe
 
Reproducibility with Checkpoint & RRO
Reproducibility with Checkpoint & RROReproducibility with Checkpoint & RRO
Reproducibility with Checkpoint & RROWork-Bench
 
[2020 git lab commit] continuous infrastructure
[2020 git lab commit] continuous infrastructure[2020 git lab commit] continuous infrastructure
[2020 git lab commit] continuous infrastructureRodrigo Stefani Domingues
 
Docs or it didn’t happen
Docs or it didn’t happenDocs or it didn’t happen
Docs or it didn’t happenAll Things Open
 
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...Work-Bench
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOpsAhmad Iqbal Ali
 
Analyzing Packages in Docker images hosted On DockerHub
Analyzing Packages in Docker images hosted On DockerHubAnalyzing Packages in Docker images hosted On DockerHub
Analyzing Packages in Docker images hosted On DockerHubAhmed Zerouali
 
Preventing Supply Chain Attacks on Open Source Software
Preventing Supply Chain Attacks on Open Source SoftwarePreventing Supply Chain Attacks on Open Source Software
Preventing Supply Chain Attacks on Open Source SoftwareAll Things Open
 
Where refactoring meets big $$$
Where refactoring meets big $$$Where refactoring meets big $$$
Where refactoring meets big $$$Michał Gruca
 
2017 Q1 Open Source Support Briefing
2017 Q1 Open Source Support Briefing2017 Q1 Open Source Support Briefing
2017 Q1 Open Source Support BriefingBenito Gonzalez
 
[India Merge World Tour] Coverity
[India Merge World Tour] Coverity[India Merge World Tour] Coverity
[India Merge World Tour] CoverityPerforce
 

What's hot (14)

IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...
IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...
IBM Agile Engineering Summit 18: How to Integrate IBM Rational® Team Concert ...
 
GlobalLink NEXT 2017 US - TransPort (Chicago)
GlobalLink NEXT 2017 US - TransPort (Chicago)GlobalLink NEXT 2017 US - TransPort (Chicago)
GlobalLink NEXT 2017 US - TransPort (Chicago)
 
Reproducibility with Checkpoint & RRO
Reproducibility with Checkpoint & RROReproducibility with Checkpoint & RRO
Reproducibility with Checkpoint & RRO
 
Roslyn on GitHub
Roslyn on GitHubRoslyn on GitHub
Roslyn on GitHub
 
[2020 git lab commit] continuous infrastructure
[2020 git lab commit] continuous infrastructure[2020 git lab commit] continuous infrastructure
[2020 git lab commit] continuous infrastructure
 
Docs or it didn’t happen
Docs or it didn’t happenDocs or it didn’t happen
Docs or it didn’t happen
 
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
Nobody Knows What It’s Like To Be the Bad Man: The Development Process for th...
 
Magento, beginning to end
Magento, beginning to endMagento, beginning to end
Magento, beginning to end
 
Git strategies for DevOps
Git strategies for DevOpsGit strategies for DevOps
Git strategies for DevOps
 
Analyzing Packages in Docker images hosted On DockerHub
Analyzing Packages in Docker images hosted On DockerHubAnalyzing Packages in Docker images hosted On DockerHub
Analyzing Packages in Docker images hosted On DockerHub
 
Preventing Supply Chain Attacks on Open Source Software
Preventing Supply Chain Attacks on Open Source SoftwarePreventing Supply Chain Attacks on Open Source Software
Preventing Supply Chain Attacks on Open Source Software
 
Where refactoring meets big $$$
Where refactoring meets big $$$Where refactoring meets big $$$
Where refactoring meets big $$$
 
2017 Q1 Open Source Support Briefing
2017 Q1 Open Source Support Briefing2017 Q1 Open Source Support Briefing
2017 Q1 Open Source Support Briefing
 
[India Merge World Tour] Coverity
[India Merge World Tour] Coverity[India Merge World Tour] Coverity
[India Merge World Tour] Coverity
 

Similar to Supercharging project health check

Git for Data Analyst - Speaker Presentation.pdf
Git for Data Analyst  - Speaker Presentation.pdfGit for Data Analyst  - Speaker Presentation.pdf
Git for Data Analyst - Speaker Presentation.pdfRicardoCalleja
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeLuca Milanesio
 
Building a custom cms with django
Building a custom cms with djangoBuilding a custom cms with django
Building a custom cms with djangoYann Malet
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
Lambda Architectures in Practice
Lambda Architectures in PracticeLambda Architectures in Practice
Lambda Architectures in PracticeC4Media
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptnRob Jahn
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl UniMatthew Landauer
 
Data Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsData Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsAnant Corporation
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to GoSimon Hewitt
 
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays
 
Fifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynoteFifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynoteGeoff Halprin
 
Code Management Workshop
Code Management WorkshopCode Management Workshop
Code Management WorkshopSameh El-Ashry
 
Continuous Delivery: The New Normal. London Event.
Continuous Delivery: The New Normal. London Event. Continuous Delivery: The New Normal. London Event.
Continuous Delivery: The New Normal. London Event. Perforce
 
Continuous Delivery Pipelines: Metrics, Myths, and Milestones
Continuous Delivery Pipelines:  Metrics, Myths, and MilestonesContinuous Delivery Pipelines:  Metrics, Myths, and Milestones
Continuous Delivery Pipelines: Metrics, Myths, and MilestonesDevOps.com
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developersDmitry Guyvoronsky
 
Code Refactoring or Rewrite: How to Properly Dispose of Legacy Code
Code Refactoring or Rewrite: How to Properly Dispose of Legacy CodeCode Refactoring or Rewrite: How to Properly Dispose of Legacy Code
Code Refactoring or Rewrite: How to Properly Dispose of Legacy CodeRoman Labunsky
 
Big feature - small sprint
Big feature - small sprint Big feature - small sprint
Big feature - small sprint Igor Goldshmidt
 
How to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot EnvironmentsHow to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot EnvironmentsDevOps.com
 
Source code version control and git
Source code version control and git Source code version control and git
Source code version control and git Naseer Khan Noor
 

Similar to Supercharging project health check (20)

Git for Data Analyst - Speaker Presentation.pdf
Git for Data Analyst  - Speaker Presentation.pdfGit for Data Analyst  - Speaker Presentation.pdf
Git for Data Analyst - Speaker Presentation.pdf
 
Gerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source codeGerrit Analytics applied to Android source code
Gerrit Analytics applied to Android source code
 
Building a custom cms with django
Building a custom cms with djangoBuilding a custom cms with django
Building a custom cms with django
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
Lambda Architectures in Practice
Lambda Architectures in PracticeLambda Architectures in Practice
Lambda Architectures in Practice
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl Uni
 
Data Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps FundamentalsData Engineer's Lunch #68: DevOps Fundamentals
Data Engineer's Lunch #68: DevOps Fundamentals
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
 
Fifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynoteFifteen Years of DevOps -- LISA 2012 keynote
Fifteen Years of DevOps -- LISA 2012 keynote
 
Code Management Workshop
Code Management WorkshopCode Management Workshop
Code Management Workshop
 
Continuous Delivery: The New Normal. London Event.
Continuous Delivery: The New Normal. London Event. Continuous Delivery: The New Normal. London Event.
Continuous Delivery: The New Normal. London Event.
 
Continuous Delivery Pipelines: Metrics, Myths, and Milestones
Continuous Delivery Pipelines:  Metrics, Myths, and MilestonesContinuous Delivery Pipelines:  Metrics, Myths, and Milestones
Continuous Delivery Pipelines: Metrics, Myths, and Milestones
 
Introduction to Git for developers
Introduction to Git for developersIntroduction to Git for developers
Introduction to Git for developers
 
Code Refactoring or Rewrite: How to Properly Dispose of Legacy Code
Code Refactoring or Rewrite: How to Properly Dispose of Legacy CodeCode Refactoring or Rewrite: How to Properly Dispose of Legacy Code
Code Refactoring or Rewrite: How to Properly Dispose of Legacy Code
 
Api gitlab: configurazione dei progetti as a service
Api gitlab: configurazione dei progetti as a serviceApi gitlab: configurazione dei progetti as a service
Api gitlab: configurazione dei progetti as a service
 
Big feature - small sprint
Big feature - small sprint Big feature - small sprint
Big feature - small sprint
 
How to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot EnvironmentsHow to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot Environments
 
Source code version control and git
Source code version control and git Source code version control and git
Source code version control and git
 

Recently uploaded

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

Recently uploaded (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

Supercharging project health check

  • 1. Super charging project health check go beyond the usual practices David Horvath Lead iOS Developer @egyes Swifters meetup 2021 March
  • 2. digital agency ┘ Lot of different projects throughout the years ┘ Project handovers ┘ Code audits
  • 3. issues ┘ Tons of things to check ┘ Lot of different approaches ┘ Require a lot of time (it’s never enough) ┘ Huge projects - Potentially overlooked problems
  • 4. goals ┘ Find the most crucial issues in the shortest time ┘ Be more efficient in gaining insights ┘ Efficiently identify the changes to the code which provide the most value
  • 5. useful when ┘ You have to do a project audit ┘ You join a new project ┘ You just want to get new insights into your current project ┘ You want to refactor or rewrite ∷ You can show these findings to your client/boss/lead
  • 6. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats(SourceForge)
  • 8. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats ┘ Checking project size
  • 10. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats ┘ Checking project size ∷ Cloc ┘ Open the project and build it ∷ High-level overview
  • 11. high- level overview ┘ File structure ┘ Naming conventions ┘ Modularization ┘ Dependencies (spm, pod, carthage) ┘ UI (code / xib / storyboards) ┘ Architecture ┘ Compile time ┘ Xcode memory graph
  • 12. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats ┘ Checking project size ∷ Cloc ┘ Open the project and build it ∷ Highlevel overview ┘ Visualize class dependencies
  • 15. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats ┘ Checking project size ∷ Cloc ┘ Open the project and build it ∷ Highlevel overview ┘ Visualize class dependencies ∷ objc-dependency-visualizer ┘ Static code analysis ∷ Cyclomatic complexity ∷ Code duplication
  • 18. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats ┘ Checking project size ∷ Cloc ┘ Visualize class dependencies ∷ objc-dependency-visualizer ┘ Checking cyclomatic complexity ∷ Lizard ┘ Static code analysis ∷ Cyclomatic complexity ∷ Code duplication ∷ Lizard / CPD ┘ Checking dead code
  • 20. process ┘ Checking git reports ∷ Interesting details about the project ∷ Gitlab / Github - GitStats ┘ Checking project size ∷ Cloc ┘ Visualize class dependencies ∷ objc-dependency-visualizer ┘ Checking cyclomatic complexity ∷ Lizard ┘ Static code analysis ∷ Cyclomatic complexity ∷ Code duplication ∷ Lizard / CPD ┘ Checking dead code ∷ Periphery
  • 21. quick process summary ┘ We have a lot of information about the project already ∷ High-level overview ∷ Data about the project size and age ∷ List of complexities ∷ List of duplication ∷ Duplication rate ∷ List of unused codes ∷ Nice visualization of the class dependencies ┘ It only took a few hours
  • 23. problems ┘ We spend so much time looking at the current state of the code that we forget its history ┘ Its hard to understand large-scale complex systems by looking at a snapshot of the code ┘ We miss a lot of information
  • 25. version control systems ┘ We use it to keep track of the project history ┘ Rarely think about the insights we can get by mining data from it ┘ We can learn about the environment ┘ We can learn about how we work ┘ Predict which parts of the code have the most defects ┘ Find the code that matters most for maintenance ┘ Information is real power
  • 27. code maat ┘ Command line tool ┘ To mine and analyze data from version control systems ┘ It supports different version control systems ∷ git, svn, perforce, tfs, mercurial ┘ We can use it to detect hotspots ┘ We can use it to detect architectural problems ┘ And so much more
  • 30. Hotspots ┘ Hotspots are your guide to improvements and refactorings ┘ Research has shown that frequent changes to complex code generally indicate declining quality ┘ Over time our development focus shifts so the hotspots will also shift ┘ Hotspots can predict defects very well ┘ We can find them at the intersection of complexity and effort
  • 34. merge them for hotspots
  • 35.
  • 36.
  • 37. Coupling ┘ We can detect which files are changing together most of the time ┘ Detect architectural / design issues ┘ Explicit coupling ∷ What tend to change together (screen + vm) ┘ Temporal coupling ∷ This is what we are looking for ∷ Can be false positives (service + test) ∷ Can be serious design problem ∷ Can be copy-paste
  • 45. other features ┘ Complexity trends ∷ Evaluate growth patterns ∷ Analyze complexity trends ┘ Discover organizational metrics ∷ Social problems ∷ Evaluate communication costs ∷ Build knowledge map ∷ Visualize knowledge loss ┘ Code chur ∷ Predict defects ∷ Discover process loss from code
  • 46. process summary ┘ High-level overview of the codebase ┘ List of complexities ┘ List of duplications ┘ List of unused codes ┘ List of hotspots ┘ List of problematic dependencies
  • 47. goals ┘ ✅ Find the most crucial issues in the shortest time ┘ ✅ Be more efficient in gaining insights ┘ ✅ Efficiently identify the changes to the code which provide the most value
  • 48. suggesti ons ┘ Run these analyses every few months ┘ Can be part of CI/CD release process ┘ Talk the findings through with your team ┘ Read Adam Tornhill’s book to learn more: Your Code as a Crime Scene
  • 49. sum up ┘ With the right tools you can quickly and efficiently spot problems ┘ You can use your version control systems to have more information about your project ┘ By mining data from it, you can get a deeper understanding of your design / architectural problems ┘ With the right data you can back your refactoring/ rewrite proposals ┘ Focusing on the right things early you can save a lot of maintenance cost
  • 51. tools ┘ GitStats ∷ http://gitstats.sourceforge.net ┘ Cloc ∷ https://github.com/AlDanial/cloc ┘ Lizard ∷ https://github.com/terryyin/lizard ┘ Periphery ∷ https://github.com/peripheryapp/periphery ┘ Objc-dependency-visualizer ∷ https://github.com/PaulTaykalo/objc-dependency-visualizer ┘ Swift-dependency-visualizer ∷ https://github.com/PrzemyslawCholewaDev/swift-dependency- visualizer ┘ Code maat ∷ https://github.com/adamtornhill/code-maat