SlideShare a Scribd company logo
Measuring & Analyzing
           Things That Matter
           When You Have Too
          Many Things To Keep
               Track Of*                                                                (chocolate salmon)




                                                    by @chadfowler

                            * this title easily understood by 13-15 year old students
Thursday, February 23, 12
Thursday, February 23, 12
How does this happen?




Thursday, February 23, 12
How do we fix it?

                     • code reviews are hard
                     • code reviews are time consuming
                     • there are too many commits to review
                     • bulleted lists are awesome

Thursday, February 23, 12
information radiator
                            “Coined around 2000 while standing in a Thoughtworks
                            office looking at all the paper on the walls around me,
                            “information radiator” refers to a publicly posted display
                            that shows people walking by what is going on.
                            Information radiators are best when they are big, very
                            easy to see (e.g. not online, generally), and change often
                            enough to be worth revisiting.”




                             http://alistair.cockburn.us/Information+radiator




Thursday, February 23, 12
“Chart what you care about, what you worry about,
                       what you want other people to know.”




                            http://xprogramming.com/articles/bigvisiblecharts/
Thursday, February 23, 12
http://www.exampler.com/old-blog/2005/04/02/
Thursday, February 23, 12
1/2 Marathon Training




Thursday, February 23, 12
What Should We
                              Measure?
                     • Project progress
                     • Code complexity
                     • Developer “productivity”
                     • Business “key performance indicators”
                     • Bug/error rates
                     • Everything important
Thursday, February 23, 12
Code “Quality”



Thursday, February 23, 12
Rudolph Flesch




Thursday, February 23, 12
Flesch-Kincaid Reading Ease
                            Score                           Notes

                            90-100   easily understood by an average 11-year-old student




                            60-70    easily understood by 13- to 15-year-old students




                             0-30    best understood by university graduates




Thursday, February 23, 12
competing algorithms

                     • SMOG
                     • Gunning-Fog

             http://www.editcentral.com/gwt1/EditCentral.html


Thursday, February 23, 12
Maurice Halstead
                             “Software Science”




                            http://en.wikipedia.org/wiki/Halstead_complexity_measures

Thursday, February 23, 12
Measure units of human
                               thought used!!!
      “Stroud’s (1955, 1967) original proposal, which is
     usually called a discrete-moment model, claims that
           all incoming information is processed in
     nonoverlapping (i.e., temporarily discrete) samples
       or scans and that the temporal order of stimuli
                 within a scan is not preserved.”


                T ' = ( n1N2( n1log2n1 +
                n2log2n2) log2n) / 2n2S




       http://yunus.hacettepe.edu.tr/~sencer/complexity.html
Thursday, February 23, 12
abc

   Assignment – an explicit transfer of data into a variable
   Branch – an explicit forward program branch out of scope
              Condition – a logical/Boolean test

                            |ABC| = sqrt((A*A)+(B*B)+(C*C))




           http://www.softwarerenovation.com/ABCMetric.pdf
Thursday, February 23, 12
Cyclomatic Complexity
                  M = E − N + 2P



            E = the number of edges of the graph
            N = the number of nodes of the graph
            P = the number of connected components




Thursday, February 23, 12
Basis Path Testing




  http://users.csc.calpoly.edu/~jdalbey/206/Lectures/BasisPathTutorial/index.html

Thursday, February 23, 12
Complexity
                                      Conservation
                              “One of McCabe's original applications was to limit the complexity of
                              routines during program development; he recommended that
                              programmers should count the complexity of the modules they are
                              developing, and split them into smaller modules whenever the
                              cyclomatic complexity of the module exceeded 10.”



 NO MORE THAN TEN GALLONS OF CYCLOMATIC
        COMPLEXITY PER MODULE!!!!!

                        http://en.wikipedia.org/wiki/Cyclomatic_complexity#cite_note-mccabe76-2


Thursday, February 23, 12
Complexity &
                             Cohesion
         “Our results support the idea that there is a relationship
         between complexity and cohesion, basically that a lack of
               cohesion is associated with high complexity”




Exploring the Relationship between Cohesion and Complexity - Stein, Cox, Etzkorn
                                    - 2005

Thursday, February 23, 12
saikuro




                            http://saikuro.rubyforge.org/
Thursday, February 23, 12
yup




Thursday, February 23, 12
flog

                     • Written by Ryan Davis
                     • opinionated
                     • ruby specific


Thursday, February 23, 12
Thursday, February 23, 12
Thursday, February 23, 12
Flog Method Reading Ease *
                            Score                          Notes
                             1-2    easily understood by an average Visual Basic developer




                            3-10    easily understood by PHP developers




                            10-20   best understood by Perl, Smalltalk, or Lisp developers




                            20+     rich hickey




                                            * all totally contrived


Thursday, February 23, 12
flogtime

      Not quite done, but a
        fun quick hack




                            https://github.com/chad/flogtime
Thursday, February 23, 12
code coverage




                            https://github.com/colszowka/simplecov
Thursday, February 23, 12
code coverage

                     • C0 - every line executed
                     • C1 - every branch executed
                     • C2 - every code path across lines executed

         It doesn’t matter which one. Only direction matters.
Thursday, February 23, 12
metric-fu
 roodi
 flog
 flay
 churn
 stats
 rails_best_practices
 reek
 saikuro
 coverage




                            http://metric-fu.rubyforge.org/
Thursday, February 23, 12
Ward’s Signature
                                Survey




                             http://c2.com/doc/SignatureSurvey/
Thursday, February 23, 12
something stupid




Thursday, February 23, 12
Thursday, February 23, 12
Bug Prediction at
                                Google
                            “Here at Google, we have thousands of
                            engineers working on our code base every
                            day. In fact, as previously noted, 50% of the
                            Google code base changes every month.”




      http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html




Thursday, February 23, 12
Bug Prediction at Google




                            https://github.com/igrigorik/bugspots



Thursday, February 23, 12
$> cd /your/git/repo
                       $>   git bugspots -d 500

                            .. example output ..


                              Scanning /git/eventmachine repo
                              Found 31 bugfix commits, with 23 hotspots:


                              Fixes:
                                  - Revert "Write maximum of 16KB of data to an SSL connection per tick (fixes #233)" for #273
                                  - Do not close attached sockets (fixes #200)
                                  - Write maximum of 16KB of data to an SSL connection per tick (fixes #233)
                                  - Merge branch 'master' into close_schedule_fix
                                  - Remove dependency on readbytes.rb for ruby 1.9 (fixes #167, #234)
                                  - Fix compilation on MSVC2008 (fixes #253)
                                  - EM::Deferrable#(callback|errback|timeout) now return self so you can chain them (closes #177)
                                  - Make EventMachine::Connection#get_peername and #get_sockname valid for IPv6 (closes #132)
                                  - reconnect DNS socket if closed
                                  - Use String#bytesize in EM::Connection#send_datagram for 1.9 (closes #153)




Thursday, February 23, 12
Hotspots:
                                   0.9723 - ext/ed.cpp
                                   0.3311 - ext/ed.h
                                   0.3271 - ext/em.cpp
                                   0.3034 - lib/eventmachine.rb
                                   0.2433 - lib/em/protocols/postgres3.rb
                                   0.2403 - ext/project.h
                                   0.0431 - lib/em/deferrable.rb
                                   0.029 - ext/cmain.cpp
                                   0.0278 - ext/rubymain.cpp
                                   0.0277 - ext/eventmachine.h
                                   0.0241 - lib/em/resolver.rb
                                   0.0241 - tests/test_resolver.rb
                                   0.0225 - lib/em/connection.rb
                                   0.0013 - lib/em/protocols/smtpserver.rb
                                   0.0003 - ext/extconf.rb
                                   0.0002 - tests/test_basic.rb
                                   0.0001 - ext/em.h
                                   0.0001 - ext/cplusplus.cpp




Thursday, February 23, 12
turbulence
 http://www.stickyminds.com/sitewide.asp?Function=edetail&ObjectType=COL&ObjectId=16679&tth=DYN&tt=siteemail&iDyn=2




                            https://github.com/chad/turbulence
Thursday, February 23, 12
highest complexity
                            turbulence   highest turbulence




Thursday, February 23, 12
gitstats




                            http://gitstats.sourceforge.net/
Thursday, February 23, 12
gitstats




Thursday, February 23, 12
The Church of Graphs




Thursday, February 23, 12
graphite

                            Highly scalable open source real time
                                       graphing engine.




                                http://graphite.wikidot.com/
Thursday, February 23, 12
statsd
                              Open source node-based daemon for
                            stats aggregation. UDP front-end for fault-
                                            tolerance*.

                              Pushes aggregated stats into graphite.



                                  https://github.com/etsy/statsd


Thursday, February 23, 12
statsd gem




Thursday, February 23, 12
Resque failures




Thursday, February 23, 12
Error rates that matter




Thursday, February 23, 12
various key stats overlaid




Thursday, February 23, 12
looking at pictures only
                                gets you so far




Thursday, February 23, 12
Shewhart Charts




                            Measure process stability
Thursday, February 23, 12
doesn’t work for data like this though




Thursday, February 23, 12
Double Exponential
                            Smoothing (Holt-Winters)




     http://www.it.iitb.ac.in/~praj/acads/seminar/04329008_ExponentialSmoothing.pdf


Thursday, February 23, 12
Thursday, February 23, 12
What is QA?




                            50 releases per day redefines “QA”
Thursday, February 23, 12
Thanks!




Thursday, February 23, 12

More Related Content

Similar to Measuring

The Web Designers Toolkit
The Web Designers ToolkitThe Web Designers Toolkit
The Web Designers Toolkit
R/GA
 
Aegir
AegirAegir
Aegir
Pure Sign
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
Max Klymyshyn
 
Building Data Driven Products With Ruby - RubyConf 2012
Building Data Driven Products With Ruby - RubyConf 2012Building Data Driven Products With Ruby - RubyConf 2012
Building Data Driven Products With Ruby - RubyConf 2012
Ryan Weald
 
Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"
Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"
Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"
Daniel Bryant
 
Thesispresentatie maart
Thesispresentatie maartThesispresentatie maart
Thesispresentatie maart
Robin De Croon
 
apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...
apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...
apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...
apidays
 
State of Puppet - Puppet Camp Barcelona 2013
State of Puppet - Puppet Camp Barcelona 2013State of Puppet - Puppet Camp Barcelona 2013
State of Puppet - Puppet Camp Barcelona 2013
Puppet
 
Monitoring and observability
Monitoring and observabilityMonitoring and observability
Monitoring and observability
Theo Schlossnagle
 
Big Data - architectural concerns for the new age
Big Data - architectural concerns for the new ageBig Data - architectural concerns for the new age
Big Data - architectural concerns for the new age
Debasish Ghosh
 
Drupal 8 Preview for Site Builders
Drupal 8 Preview for Site BuildersDrupal 8 Preview for Site Builders
Drupal 8 Preview for Site BuildersAcquia
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
Walter Heck
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
OlinData
 
Responsive design presentation
Responsive design presentationResponsive design presentation
Responsive design presentation
Mario Noble
 
The Design of Everyday Things
The Design of Everyday ThingsThe Design of Everyday Things
The Design of Everyday Things
Imre Gmelig Meijling
 
Grails 2.0 Update
Grails 2.0 UpdateGrails 2.0 Update
Grails 2.0 Update
Peter Ledbrook
 
GitHub Notable OSS Project
GitHub  Notable OSS ProjectGitHub  Notable OSS Project
GitHub Notable OSS Projectroumia
 
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
Daniel Bryant
 
Creating visualizations using Linked Data
Creating visualizations using Linked DataCreating visualizations using Linked Data
Creating visualizations using Linked Data
Alvaro Graves
 

Similar to Measuring (20)

The Web Designers Toolkit
The Web Designers ToolkitThe Web Designers Toolkit
The Web Designers Toolkit
 
20120223keystone
20120223keystone20120223keystone
20120223keystone
 
Aegir
AegirAegir
Aegir
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Building Data Driven Products With Ruby - RubyConf 2012
Building Data Driven Products With Ruby - RubyConf 2012Building Data Driven Products With Ruby - RubyConf 2012
Building Data Driven Products With Ruby - RubyConf 2012
 
Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"
Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"
Devoxx US 2017 "The Seven (More) Deadly Sins of Microservices"
 
Thesispresentatie maart
Thesispresentatie maartThesispresentatie maart
Thesispresentatie maart
 
apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...
apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...
apidays LIVE Paris 2021 - Measuring environmental impact reductions by Gregor...
 
State of Puppet - Puppet Camp Barcelona 2013
State of Puppet - Puppet Camp Barcelona 2013State of Puppet - Puppet Camp Barcelona 2013
State of Puppet - Puppet Camp Barcelona 2013
 
Monitoring and observability
Monitoring and observabilityMonitoring and observability
Monitoring and observability
 
Big Data - architectural concerns for the new age
Big Data - architectural concerns for the new ageBig Data - architectural concerns for the new age
Big Data - architectural concerns for the new age
 
Drupal 8 Preview for Site Builders
Drupal 8 Preview for Site BuildersDrupal 8 Preview for Site Builders
Drupal 8 Preview for Site Builders
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
 
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That WasPuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
PuppetCamp SEA @ Blk 71 - Puppet: The Year That Was
 
Responsive design presentation
Responsive design presentationResponsive design presentation
Responsive design presentation
 
The Design of Everyday Things
The Design of Everyday ThingsThe Design of Everyday Things
The Design of Everyday Things
 
Grails 2.0 Update
Grails 2.0 UpdateGrails 2.0 Update
Grails 2.0 Update
 
GitHub Notable OSS Project
GitHub  Notable OSS ProjectGitHub  Notable OSS Project
GitHub Notable OSS Project
 
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
LJCConf 2013 "Chuck Norris Doesn't Need DevOps"
 
Creating visualizations using Linked Data
Creating visualizations using Linked DataCreating visualizations using Linked Data
Creating visualizations using Linked Data
 

Recently uploaded

De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Measuring

  • 1. Measuring & Analyzing Things That Matter When You Have Too Many Things To Keep Track Of* (chocolate salmon) by @chadfowler * this title easily understood by 13-15 year old students Thursday, February 23, 12
  • 3. How does this happen? Thursday, February 23, 12
  • 4. How do we fix it? • code reviews are hard • code reviews are time consuming • there are too many commits to review • bulleted lists are awesome Thursday, February 23, 12
  • 5. information radiator “Coined around 2000 while standing in a Thoughtworks office looking at all the paper on the walls around me, “information radiator” refers to a publicly posted display that shows people walking by what is going on. Information radiators are best when they are big, very easy to see (e.g. not online, generally), and change often enough to be worth revisiting.” http://alistair.cockburn.us/Information+radiator Thursday, February 23, 12
  • 6. “Chart what you care about, what you worry about, what you want other people to know.” http://xprogramming.com/articles/bigvisiblecharts/ Thursday, February 23, 12
  • 9. What Should We Measure? • Project progress • Code complexity • Developer “productivity” • Business “key performance indicators” • Bug/error rates • Everything important Thursday, February 23, 12
  • 12. Flesch-Kincaid Reading Ease Score Notes 90-100 easily understood by an average 11-year-old student 60-70 easily understood by 13- to 15-year-old students 0-30 best understood by university graduates Thursday, February 23, 12
  • 13. competing algorithms • SMOG • Gunning-Fog http://www.editcentral.com/gwt1/EditCentral.html Thursday, February 23, 12
  • 14. Maurice Halstead “Software Science” http://en.wikipedia.org/wiki/Halstead_complexity_measures Thursday, February 23, 12
  • 15. Measure units of human thought used!!! “Stroud’s (1955, 1967) original proposal, which is usually called a discrete-moment model, claims that all incoming information is processed in nonoverlapping (i.e., temporarily discrete) samples or scans and that the temporal order of stimuli within a scan is not preserved.” T ' = ( n1N2( n1log2n1 + n2log2n2) log2n) / 2n2S http://yunus.hacettepe.edu.tr/~sencer/complexity.html Thursday, February 23, 12
  • 16. abc Assignment – an explicit transfer of data into a variable Branch – an explicit forward program branch out of scope Condition – a logical/Boolean test |ABC| = sqrt((A*A)+(B*B)+(C*C)) http://www.softwarerenovation.com/ABCMetric.pdf Thursday, February 23, 12
  • 17. Cyclomatic Complexity M = E − N + 2P E = the number of edges of the graph N = the number of nodes of the graph P = the number of connected components Thursday, February 23, 12
  • 18. Basis Path Testing http://users.csc.calpoly.edu/~jdalbey/206/Lectures/BasisPathTutorial/index.html Thursday, February 23, 12
  • 19. Complexity Conservation “One of McCabe's original applications was to limit the complexity of routines during program development; he recommended that programmers should count the complexity of the modules they are developing, and split them into smaller modules whenever the cyclomatic complexity of the module exceeded 10.” NO MORE THAN TEN GALLONS OF CYCLOMATIC COMPLEXITY PER MODULE!!!!! http://en.wikipedia.org/wiki/Cyclomatic_complexity#cite_note-mccabe76-2 Thursday, February 23, 12
  • 20. Complexity & Cohesion “Our results support the idea that there is a relationship between complexity and cohesion, basically that a lack of cohesion is associated with high complexity” Exploring the Relationship between Cohesion and Complexity - Stein, Cox, Etzkorn - 2005 Thursday, February 23, 12
  • 21. saikuro http://saikuro.rubyforge.org/ Thursday, February 23, 12
  • 23. flog • Written by Ryan Davis • opinionated • ruby specific Thursday, February 23, 12
  • 26. Flog Method Reading Ease * Score Notes 1-2 easily understood by an average Visual Basic developer 3-10 easily understood by PHP developers 10-20 best understood by Perl, Smalltalk, or Lisp developers 20+ rich hickey * all totally contrived Thursday, February 23, 12
  • 27. flogtime Not quite done, but a fun quick hack https://github.com/chad/flogtime Thursday, February 23, 12
  • 28. code coverage https://github.com/colszowka/simplecov Thursday, February 23, 12
  • 29. code coverage • C0 - every line executed • C1 - every branch executed • C2 - every code path across lines executed It doesn’t matter which one. Only direction matters. Thursday, February 23, 12
  • 30. metric-fu roodi flog flay churn stats rails_best_practices reek saikuro coverage http://metric-fu.rubyforge.org/ Thursday, February 23, 12
  • 31. Ward’s Signature Survey http://c2.com/doc/SignatureSurvey/ Thursday, February 23, 12
  • 34. Bug Prediction at Google “Here at Google, we have thousands of engineers working on our code base every day. In fact, as previously noted, 50% of the Google code base changes every month.” http://google-engtools.blogspot.com/2011/12/bug-prediction-at-google.html Thursday, February 23, 12
  • 35. Bug Prediction at Google https://github.com/igrigorik/bugspots Thursday, February 23, 12
  • 36. $> cd /your/git/repo $> git bugspots -d 500 .. example output .. Scanning /git/eventmachine repo Found 31 bugfix commits, with 23 hotspots: Fixes: - Revert "Write maximum of 16KB of data to an SSL connection per tick (fixes #233)" for #273 - Do not close attached sockets (fixes #200) - Write maximum of 16KB of data to an SSL connection per tick (fixes #233) - Merge branch 'master' into close_schedule_fix - Remove dependency on readbytes.rb for ruby 1.9 (fixes #167, #234) - Fix compilation on MSVC2008 (fixes #253) - EM::Deferrable#(callback|errback|timeout) now return self so you can chain them (closes #177) - Make EventMachine::Connection#get_peername and #get_sockname valid for IPv6 (closes #132) - reconnect DNS socket if closed - Use String#bytesize in EM::Connection#send_datagram for 1.9 (closes #153) Thursday, February 23, 12
  • 37. Hotspots: 0.9723 - ext/ed.cpp 0.3311 - ext/ed.h 0.3271 - ext/em.cpp 0.3034 - lib/eventmachine.rb 0.2433 - lib/em/protocols/postgres3.rb 0.2403 - ext/project.h 0.0431 - lib/em/deferrable.rb 0.029 - ext/cmain.cpp 0.0278 - ext/rubymain.cpp 0.0277 - ext/eventmachine.h 0.0241 - lib/em/resolver.rb 0.0241 - tests/test_resolver.rb 0.0225 - lib/em/connection.rb 0.0013 - lib/em/protocols/smtpserver.rb 0.0003 - ext/extconf.rb 0.0002 - tests/test_basic.rb 0.0001 - ext/em.h 0.0001 - ext/cplusplus.cpp Thursday, February 23, 12
  • 39. highest complexity turbulence highest turbulence Thursday, February 23, 12
  • 40. gitstats http://gitstats.sourceforge.net/ Thursday, February 23, 12
  • 42. The Church of Graphs Thursday, February 23, 12
  • 43. graphite Highly scalable open source real time graphing engine. http://graphite.wikidot.com/ Thursday, February 23, 12
  • 44. statsd Open source node-based daemon for stats aggregation. UDP front-end for fault- tolerance*. Pushes aggregated stats into graphite. https://github.com/etsy/statsd Thursday, February 23, 12
  • 47. Error rates that matter Thursday, February 23, 12
  • 48. various key stats overlaid Thursday, February 23, 12
  • 49. looking at pictures only gets you so far Thursday, February 23, 12
  • 50. Shewhart Charts Measure process stability Thursday, February 23, 12
  • 51. doesn’t work for data like this though Thursday, February 23, 12
  • 52. Double Exponential Smoothing (Holt-Winters) http://www.it.iitb.ac.in/~praj/acads/seminar/04329008_ExponentialSmoothing.pdf Thursday, February 23, 12
  • 54. What is QA? 50 releases per day redefines “QA” Thursday, February 23, 12