SlideShare a Scribd company logo
1 of 31
Download to read offline
Exploring Elixir Codebases
with Archeometer
Augustín Ramos
@MachinesAreUs
Agenda
• What is Archeometer?
• Motivation
• Architecture
• Analyzers
• Usage
• Report Overview
• Future
What is Archeometer?
A toolkit for the analysis of Elixir codebases, from the point of view of
Architecture, Design and Quality.
An equipped laboratory to conduct your own code explorations.
Motivation
In 20+ years as a software developer…
• I have worked with
• C, C++, Java, Python, Ruby, Groovy, .Net, PHP, Javascript, Elixir…
• Have met with huge amounts of legacy code
• With the mission of
• Making sense of it 🫠
• Fixing it !!! 🫠 🫠 🫠 🫠 🫠
10 Years of Elixir !!!
• 10 years of Elixir for me!!! (
fi
rst commit on May 24th, 2013)
• It’s enough time for people to write systems that…
• Are huge
• Are very complex
• Have insu
ffi
cient tests / documentation
• Are abandoned by the original authors
• Are LEGACY
Who you gonna call?
Tooling
• For some platforms (notably Java and .Net) there are very good tools for
managing complexity since long time ago.
• Not so for languages like Python, Ruby or Elixir.
• Solution?
• Lots of custom scripting to retrieve architectural information.
• Lots of “read de code”.
• It’s very time consuming. Not e
ffi
cient at all.
Architecture
Analysis
Components
Data
Collection
Reports
Code Query
Language
Mix Tasks
Analyzers
Data Model
Code Query Language
Code Query Language (CQL)
• Pretty much inspired on Ecto:
• Schemas, Query DSL, Repo
• Nested properties traversal.
• No explicit joins needed!
CQL Examples 1/2
What are the modules most
used within certain app?
CQL Examples 2/2
What behaviors are being
using in your application
and how much?
Analyzers
• XRef is all about
fi
nding and diagraming relationships between modules or
applications.
• Supports both enumeration and component name patterns.
• Supported output formats: dot, svg, png, mermaid.
• It’s not a replacement for “mix xref”, more like a complement.
XRef
XRef
$ mix arch.xref --format svg 
--out kamaji_xref.svg 
Kamaji Kamaji.Node 
Kamaji.Peer Kamaji.Room
Treemap
A treemap is a visual representation of hierarchical data, with the area of each
subcomponent representing proportionally some de
fi
ned metric.
Design Structure Matrix
X X
X
X X X X
X
X X
X X
A B C D E F G
A
B
C
D
E
F
G
DSM Triangularization
X X
X
X X X X
X
X X
X X
A B C D E F G
A
B
C
D
E
F
G
F B D G C A E
F
B
D
G
C
A
E
X
X
X X
X X X X
X X
X X
Usage
Basic Usage
• Data collection
$ mix arch.explore
• Report generation
$ mix arch.report.html
Report Overview
Future
Near Future
• Repository history analysis 🚀 🚀
• Livebook report (maybe) 🚀
• More algorithms for DSM analysis 🚀 🚀 🚀
Sometime in the future…
• Interactive diagram analysis 🚀 🚀 🚀 🚀 🚀
• On DSM
• Dynamically create DSMs for selected modules
• Collapse / expand hierarchies
• On Graphs
• Focus on certain parts of the graph
• Identify patterns or interesting features
Contributors
Caleb
Jocabed
Oswaldo
Edgar
Andrew Lizzie
Q & A
Thank You!
Augustín Ramos
@MachinesAreUs

More Related Content

Similar to Exploring Elixir Codebases with Archeometer

Design patterns and MV
Design patterns and MVDesign patterns and MV
Design patterns and MV
Sway Wang
 

Similar to Exploring Elixir Codebases with Archeometer (20)

AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
 
Dmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesDmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script Technologies
 
Design patterns and MV
Design patterns and MVDesign patterns and MV
Design patterns and MV
 
TypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation GuideTypeScript: Basic Features and Compilation Guide
TypeScript: Basic Features and Compilation Guide
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?Hot to build continuously processing for 24/7 real-time data streaming platform?
Hot to build continuously processing for 24/7 real-time data streaming platform?
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
 
Practices and Tools for Building Better APIs
Practices and Tools for Building Better APIsPractices and Tools for Building Better APIs
Practices and Tools for Building Better APIs
 
Memory models in c#
Memory models in c#Memory models in c#
Memory models in c#
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
Resume
ResumeResume
Resume
 
Srinivas Muddana Resume
Srinivas Muddana ResumeSrinivas Muddana Resume
Srinivas Muddana Resume
 
Srinivas Muddana Resume
Srinivas Muddana ResumeSrinivas Muddana Resume
Srinivas Muddana Resume
 
Srinivas Muddana Resume
Srinivas Muddana ResumeSrinivas Muddana Resume
Srinivas Muddana Resume
 
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft..."Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
"Source Code Abstracts Classification Using CNN", Vadim Markovtsev, Lead Soft...
 
Javascript best practices
Javascript best practicesJavascript best practices
Javascript best practices
 
Design patterns through refactoring
Design patterns through refactoringDesign patterns through refactoring
Design patterns through refactoring
 
Modern C++
Modern C++Modern C++
Modern C++
 

More from Agustin Ramos

BDD - Desarrollo dirigido por comportamiento
BDD - Desarrollo dirigido por comportamientoBDD - Desarrollo dirigido por comportamiento
BDD - Desarrollo dirigido por comportamiento
Agustin Ramos
 

More from Agustin Ramos (15)

From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017
 
Pairwise and property based testing
Pairwise and property based testingPairwise and property based testing
Pairwise and property based testing
 
Sistemas Tolerantes a Fallas
Sistemas Tolerantes a FallasSistemas Tolerantes a Fallas
Sistemas Tolerantes a Fallas
 
¿En qué la estamos regando en pruebas de software?
¿En qué la estamos regando en pruebas de software?¿En qué la estamos regando en pruebas de software?
¿En qué la estamos regando en pruebas de software?
 
Programación funcional con haskell
Programación funcional con haskellProgramación funcional con haskell
Programación funcional con haskell
 
Técnicas basadas en matriz de estructura de diseño
Técnicas basadas en matriz de estructura de diseñoTécnicas basadas en matriz de estructura de diseño
Técnicas basadas en matriz de estructura de diseño
 
Acercándose a la entrega continua
Acercándose a la entrega continuaAcercándose a la entrega continua
Acercándose a la entrega continua
 
Modelos de paralelismo y concurrencia
Modelos de paralelismo y concurrenciaModelos de paralelismo y concurrencia
Modelos de paralelismo y concurrencia
 
Arquitecturas que crecen y arquitecturas que no
Arquitecturas que crecen y arquitecturas que noArquitecturas que crecen y arquitecturas que no
Arquitecturas que crecen y arquitecturas que no
 
Arqueología de software
Arqueología de softwareArqueología de software
Arqueología de software
 
Hola OSGi
Hola OSGiHola OSGi
Hola OSGi
 
Desarrollo Dirigido por Comportamiento (con Cucumber y Groovy)
Desarrollo Dirigido por Comportamiento (con Cucumber y Groovy)Desarrollo Dirigido por Comportamiento (con Cucumber y Groovy)
Desarrollo Dirigido por Comportamiento (con Cucumber y Groovy)
 
BDD - Desarrollo dirigido por comportamiento
BDD - Desarrollo dirigido por comportamientoBDD - Desarrollo dirigido por comportamiento
BDD - Desarrollo dirigido por comportamiento
 
La nueva imagen del gurú - El maestro artesano dentro del ingeniero
La nueva imagen del gurú - El maestro artesano dentro del ingenieroLa nueva imagen del gurú - El maestro artesano dentro del ingeniero
La nueva imagen del gurú - El maestro artesano dentro del ingeniero
 
Modularización efectiva - domando a la hidra
Modularización efectiva - domando a la hidraModularización efectiva - domando a la hidra
Modularización efectiva - domando a la hidra
 

Recently uploaded

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
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
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
Safe Software
 

Recently uploaded (20)

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
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
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
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Exploring Elixir Codebases with Archeometer

  • 1. Exploring Elixir Codebases with Archeometer Augustín Ramos @MachinesAreUs
  • 2. Agenda • What is Archeometer? • Motivation • Architecture • Analyzers • Usage • Report Overview • Future
  • 3. What is Archeometer? A toolkit for the analysis of Elixir codebases, from the point of view of Architecture, Design and Quality. An equipped laboratory to conduct your own code explorations.
  • 5. In 20+ years as a software developer… • I have worked with • C, C++, Java, Python, Ruby, Groovy, .Net, PHP, Javascript, Elixir… • Have met with huge amounts of legacy code • With the mission of • Making sense of it 🫠 • Fixing it !!! 🫠 🫠 🫠 🫠 🫠
  • 6. 10 Years of Elixir !!! • 10 years of Elixir for me!!! ( fi rst commit on May 24th, 2013) • It’s enough time for people to write systems that… • Are huge • Are very complex • Have insu ffi cient tests / documentation • Are abandoned by the original authors • Are LEGACY
  • 8. Tooling • For some platforms (notably Java and .Net) there are very good tools for managing complexity since long time ago. • Not so for languages like Python, Ruby or Elixir. • Solution? • Lots of custom scripting to retrieve architectural information. • Lots of “read de code”. • It’s very time consuming. Not e ffi cient at all.
  • 13. Code Query Language (CQL) • Pretty much inspired on Ecto: • Schemas, Query DSL, Repo • Nested properties traversal. • No explicit joins needed!
  • 14. CQL Examples 1/2 What are the modules most used within certain app?
  • 15. CQL Examples 2/2 What behaviors are being using in your application and how much?
  • 17. • XRef is all about fi nding and diagraming relationships between modules or applications. • Supports both enumeration and component name patterns. • Supported output formats: dot, svg, png, mermaid. • It’s not a replacement for “mix xref”, more like a complement. XRef
  • 18. XRef $ mix arch.xref --format svg --out kamaji_xref.svg Kamaji Kamaji.Node Kamaji.Peer Kamaji.Room
  • 19. Treemap A treemap is a visual representation of hierarchical data, with the area of each subcomponent representing proportionally some de fi ned metric.
  • 20. Design Structure Matrix X X X X X X X X X X X X A B C D E F G A B C D E F G
  • 21. DSM Triangularization X X X X X X X X X X X X A B C D E F G A B C D E F G F B D G C A E F B D G C A E X X X X X X X X X X X X
  • 22. Usage
  • 23.
  • 24. Basic Usage • Data collection $ mix arch.explore • Report generation $ mix arch.report.html
  • 27. Near Future • Repository history analysis 🚀 🚀 • Livebook report (maybe) 🚀 • More algorithms for DSM analysis 🚀 🚀 🚀
  • 28. Sometime in the future… • Interactive diagram analysis 🚀 🚀 🚀 🚀 🚀 • On DSM • Dynamically create DSMs for selected modules • Collapse / expand hierarchies • On Graphs • Focus on certain parts of the graph • Identify patterns or interesting features
  • 30. Q & A