Submit Search
Upload
ABC Size - An Easy Code Complexity Metric
•
0 likes
•
4 views
David Doolin
Follow
A very short presentation for demonstrating ABC Size, a software code complexity measure.
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 22
Download now
Download to read offline
Recommended
0580_w19_qp_42 (1).pdf
0580_w19_qp_42 (1).pdf
NoliKAgathiaAmbarita
BSOP 330 Entire Course NEW
BSOP 330 Entire Course NEW
shyamuopuop
1 f7 on cross-multiplication
1 f7 on cross-multiplication
math123a
Teoria y problemas de numeros racionales qa49 ccesa007
Teoria y problemas de numeros racionales qa49 ccesa007
Demetrio Ccesa Rayme
Teoria y problemas de numeros racionales QA113 ccesa007
Teoria y problemas de numeros racionales QA113 ccesa007
Demetrio Ccesa Rayme
Teoria y problemas de numeros racionales qa39 ccesa007
Teoria y problemas de numeros racionales qa39 ccesa007
Demetrio Ccesa Rayme
Speeding Up Distributed Machine Learning Using Codes
Speeding Up Distributed Machine Learning Using Codes
NAVER Engineering
Guia subneteo-de-redes-hbcnlf
Guia subneteo-de-redes-hbcnlf
PIERINELLI
Recommended
0580_w19_qp_42 (1).pdf
0580_w19_qp_42 (1).pdf
NoliKAgathiaAmbarita
BSOP 330 Entire Course NEW
BSOP 330 Entire Course NEW
shyamuopuop
1 f7 on cross-multiplication
1 f7 on cross-multiplication
math123a
Teoria y problemas de numeros racionales qa49 ccesa007
Teoria y problemas de numeros racionales qa49 ccesa007
Demetrio Ccesa Rayme
Teoria y problemas de numeros racionales QA113 ccesa007
Teoria y problemas de numeros racionales QA113 ccesa007
Demetrio Ccesa Rayme
Teoria y problemas de numeros racionales qa39 ccesa007
Teoria y problemas de numeros racionales qa39 ccesa007
Demetrio Ccesa Rayme
Speeding Up Distributed Machine Learning Using Codes
Speeding Up Distributed Machine Learning Using Codes
NAVER Engineering
Guia subneteo-de-redes-hbcnlf
Guia subneteo-de-redes-hbcnlf
PIERINELLI
Introduction to MATLAB Programming and Numerical Methods for Engineers 1st Ed...
Introduction to MATLAB Programming and Numerical Methods for Engineers 1st Ed...
AmeryWalters
Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014
Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014
Mauro George
Run Your Business 6X Faster at Lower Costs!
Run Your Business 6X Faster at Lower Costs!
Scott Hayes
Data Mining: Concepts and Techniques (3rd ed.)— Chapter 5
Data Mining: Concepts and Techniques (3rd ed.)— Chapter 5
Salah Amean
05 practice paper_3_h_set_a
05 practice paper_3_h_set_a
claire meadows-smith
Scilabisnotnaive
Scilabisnotnaive
zan
Scilab is not naive
Scilab is not naive
Scilab
Teoria y problemas de numeros racionales qa412 ccesa007
Teoria y problemas de numeros racionales qa412 ccesa007
Demetrio Ccesa Rayme
0580_w14_qp_22
0580_w14_qp_22
King Ali
igcse_edexcel_math-_gold_qp1_-igcse_9-1_.pdf
igcse_edexcel_math-_gold_qp1_-igcse_9-1_.pdf
TeenaSheikh
0580 s17 qp_42 exam - copy
0580 s17 qp_42 exam - copy
mend Oyunchimeg
Assembly Codes in C Programmes - A Short Notes by Arun Umrao
Assembly Codes in C Programmes - A Short Notes by Arun Umrao
ssuserd6b1fd
Tdd for BT E2E test community
Tdd for BT E2E test community
Kerry Buckley
CYB 130 Education Specialist |tutorialrank.com
CYB 130 Education Specialist |tutorialrank.com
ladworkspaces
Teoria y problemas de numeros racionales qa312 ccesa007
Teoria y problemas de numeros racionales qa312 ccesa007
Demetrio Ccesa Rayme
0580 s15 qp_11 (1)
0580 s15 qp_11 (1)
María Soledad Di Paolo
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0
PMILebanonChapter
Microsoft interview walkthrough
Microsoft interview walkthrough
Aayush Bahuguna
PA 1c. Decision VariablesabcdCalculated values0.21110.531110.09760.docx
PA 1c. Decision VariablesabcdCalculated values0.21110.531110.09760.docx
gerardkortney
Unsupervised learning
Unsupervised learning
AlexAman1
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
Asutosh Ranjan
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
120cr0395
More Related Content
Similar to ABC Size - An Easy Code Complexity Metric
Introduction to MATLAB Programming and Numerical Methods for Engineers 1st Ed...
Introduction to MATLAB Programming and Numerical Methods for Engineers 1st Ed...
AmeryWalters
Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014
Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014
Mauro George
Run Your Business 6X Faster at Lower Costs!
Run Your Business 6X Faster at Lower Costs!
Scott Hayes
Data Mining: Concepts and Techniques (3rd ed.)— Chapter 5
Data Mining: Concepts and Techniques (3rd ed.)— Chapter 5
Salah Amean
05 practice paper_3_h_set_a
05 practice paper_3_h_set_a
claire meadows-smith
Scilabisnotnaive
Scilabisnotnaive
zan
Scilab is not naive
Scilab is not naive
Scilab
Teoria y problemas de numeros racionales qa412 ccesa007
Teoria y problemas de numeros racionales qa412 ccesa007
Demetrio Ccesa Rayme
0580_w14_qp_22
0580_w14_qp_22
King Ali
igcse_edexcel_math-_gold_qp1_-igcse_9-1_.pdf
igcse_edexcel_math-_gold_qp1_-igcse_9-1_.pdf
TeenaSheikh
0580 s17 qp_42 exam - copy
0580 s17 qp_42 exam - copy
mend Oyunchimeg
Assembly Codes in C Programmes - A Short Notes by Arun Umrao
Assembly Codes in C Programmes - A Short Notes by Arun Umrao
ssuserd6b1fd
Tdd for BT E2E test community
Tdd for BT E2E test community
Kerry Buckley
CYB 130 Education Specialist |tutorialrank.com
CYB 130 Education Specialist |tutorialrank.com
ladworkspaces
Teoria y problemas de numeros racionales qa312 ccesa007
Teoria y problemas de numeros racionales qa312 ccesa007
Demetrio Ccesa Rayme
0580 s15 qp_11 (1)
0580 s15 qp_11 (1)
María Soledad Di Paolo
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0
PMILebanonChapter
Microsoft interview walkthrough
Microsoft interview walkthrough
Aayush Bahuguna
PA 1c. Decision VariablesabcdCalculated values0.21110.531110.09760.docx
PA 1c. Decision VariablesabcdCalculated values0.21110.531110.09760.docx
gerardkortney
Unsupervised learning
Unsupervised learning
AlexAman1
Similar to ABC Size - An Easy Code Complexity Metric
(20)
Introduction to MATLAB Programming and Numerical Methods for Engineers 1st Ed...
Introduction to MATLAB Programming and Numerical Methods for Engineers 1st Ed...
Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014
Testes automatizados o time e o cliente saem ganhando! @ Agile Vale 2014
Run Your Business 6X Faster at Lower Costs!
Run Your Business 6X Faster at Lower Costs!
Data Mining: Concepts and Techniques (3rd ed.)— Chapter 5
Data Mining: Concepts and Techniques (3rd ed.)— Chapter 5
05 practice paper_3_h_set_a
05 practice paper_3_h_set_a
Scilabisnotnaive
Scilabisnotnaive
Scilab is not naive
Scilab is not naive
Teoria y problemas de numeros racionales qa412 ccesa007
Teoria y problemas de numeros racionales qa412 ccesa007
0580_w14_qp_22
0580_w14_qp_22
igcse_edexcel_math-_gold_qp1_-igcse_9-1_.pdf
igcse_edexcel_math-_gold_qp1_-igcse_9-1_.pdf
0580 s17 qp_42 exam - copy
0580 s17 qp_42 exam - copy
Assembly Codes in C Programmes - A Short Notes by Arun Umrao
Assembly Codes in C Programmes - A Short Notes by Arun Umrao
Tdd for BT E2E test community
Tdd for BT E2E test community
CYB 130 Education Specialist |tutorialrank.com
CYB 130 Education Specialist |tutorialrank.com
Teoria y problemas de numeros racionales qa312 ccesa007
Teoria y problemas de numeros racionales qa312 ccesa007
0580 s15 qp_11 (1)
0580 s15 qp_11 (1)
Monte Carlo Simulation for project estimates v1.0
Monte Carlo Simulation for project estimates v1.0
Microsoft interview walkthrough
Microsoft interview walkthrough
PA 1c. Decision VariablesabcdCalculated values0.21110.531110.09760.docx
PA 1c. Decision VariablesabcdCalculated values0.21110.531110.09760.docx
Unsupervised learning
Unsupervised learning
Recently uploaded
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
Asutosh Ranjan
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
120cr0395
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
ssuser5c9d4b1
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Tsuyoshi Horigome
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur High Profile
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
M Maged Hegazy, LLM, MBA, CCP, P3O
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Dr.Costas Sachpazis
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
ranjana rawat
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
pranjaldaimarysona
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
RajkumarAkumalla
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
ranjana rawat
result management system report for college project
result management system report for college project
Tonystark477637
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls in Nagpur High Profile
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
KurinjimalarL3
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
Asst.prof M.Gokilavani
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
SIVASHANKAR N
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur High Profile
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur High Profile
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
rknatarajan
Recently uploaded
(20)
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
Extrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
result management system report for college project
result management system report for college project
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
ABC Size - An Easy Code Complexity Metric
1.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ABC Size Dave Doolin A
code complexity metric, easy as 1-2-3. April 21, 2024 ABC Sise
2.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ABC Size Assignment, Branch,
Condition Definition of ABC Size: √ A2 +B2 +C2 A: Assignment B: Branch (method calls) C: Conditional ABC Sise
3.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rubocop ftw For demonstration purposes,
we’ll set Metrics/AbcSize to 0. 1 # Just enough rubocop for demonstration 2 3 AllCops: 4 NewCops: enable 5 6 Style/FrozenStringLiteralComment: 7 Enabled: false 8 9 # Set to 0 to force output 10 Metrics/AbcSize: 11 Max: 0 ABC Sise
4.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end ABC Sise
5.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: ABC Sise
6.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 ABC Sise
7.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 Branches: ABC Sise
8.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 Branches: 4 ABC Sise
9.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 Branches: 4 Conditionals: ABC Sise
10.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 Branches: 4 Conditionals: 1 ABC Sise
11.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 Branches: 4 Conditionals: 1 AbcSize: ABC Sise
12.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Let’s count! 1 #
Demonstration of ABC Size 2 class AbcSize 3 def demonstrate 4 a = 'foo' 5 b = 'bar' 6 c = rand(2).even? ? 'baz' : 'quux' 7 a + b + c # a.+ b.+ c 8 end 9 end Assignments: 3 Branches: 4 Conditionals: 1 AbcSize: √ 26 ≈ 5.1 ABC Sise
13.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What does Rubocop
say? code/abc_size.rb : 6 : 3 : C: Metrics/AbcSize : Assignment Branch Condition s i z e f o r demonstrate i s too high . [<3, 4 , 1> 5.1/0] ABC Sise
14.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reducing ABC Size For
Ruby, use Rubocop The main way to reduce ABC size is refactoring. It’s that simple. ABC Sise
15.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reducing ABC Size For
Ruby, use Rubocop The main way to reduce ABC size is refactoring. It’s that simple. Well-factored programs tend to have lower ABC Size. ABC Sise
16.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reducing ABC Size For
Ruby, use Rubocop The main way to reduce ABC size is refactoring. It’s that simple. Well-factored programs tend to have lower ABC Size. It’s really that simple. ABC Sise
17.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . One major caveat... ...you
have to do the work THE MOST IMPORTANT PART IS TO ENABLE THE METRIC! ABC Sise
18.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . One major caveat... ...you
have to do the work THE MOST IMPORTANT PART IS TO ENABLE THE METRIC! 1 Metrics/AbcSize: 2 Enabled: true 3 Max: 15 # Rubocop default ABC Sise
19.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other complexity measures Same
code, different information Others for later: • Cyclomatic (McCabe) Complexity • Perceived Complexity • LCOM (Lack of Cohesion of Methods) ABC Sise
20.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Have fun! and remember ABC
is a simple metric, it’s not a silver bullet. Not every method is amenable to low ABC size. It’s a tool, and very good tool at that. ABC Sise
21.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . References • ABC Software
Metric • Rubocop default.yml • C2 Wiki: AbcMetric ABC Sise
22.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Questions? ABC Sise
Download now