SlideShare une entreprise Scribd logo
1  sur  57
Télécharger pour lire hors ligne
(TOOLS FOR) IMPROVING YOUR 

CFML CODE QUALITY
KAI KOENIG (@AGENTK)
AGENDA
▸ Software and code quality
▸ Metrics and measuring
▸ Tooling and analysis
▸ CFLint
SOFTWARE AND CODE
QUALITY
https://www.flickr.com/photos/jakecaptive/47697477
THE ART OF CHICKEN SEXING
bsmalley @ commons.wikipedia.org
AND NOW…QUALITY
CONDITION OF EXCELLENCE IMPLYING 

FINE QUALITY 

AS DISTINCT FROM BAD QUALITY
https://www.flickr.com/photos/serdal/14863608800/
SOFTWARE AND CODE QUALITY
TYPES OF QUALITY
▸ Quality can be objective or subjective
▸ Subjective quality: dependent on personal experience to recognise
excellence. Subjective quality is ‘universally true’ from the observer’s point of
view.
▸ Objective quality: measure ‘genius’, quantify and repeat -> Feedback loop
SOFTWARE AND CODE QUALITY
CAN RECOGNISING QUALITY BE LEARNED?
▸ Chicken sexing seems to be something industry professionals lack objective
criteria for
▸ Does chicken sexing as process of quality determination lead to subjective or
objective quality?
▸ What about code and software?
▸ How can we improve in determining objective quality?
“ANY FOOL CAN WRITE CODE THAT A COMPUTER CAN
UNDERSTAND. GOOD PROGRAMMERS WRITE CODE
THAT HUMANS CAN UNDERSTAND.”
Martin Fowler
SOFTWARE AND CODE QUALITY
METRICS AND
MEASURING
http://commadot.com/wtf-per-minute/
STANDARD OF MEASUREMENT
https://www.flickr.com/photos/christinawelsh/5569561425/
METRICS AND MEASURING
DIFFERENT TYPES OF METRICS
▸ There are various categories to measure software quality in:
▸ Completeness
▸ Performance
▸ Aesthetics
▸ Maintainability and Support
▸ Usability
▸ Architecture
METRICS AND MEASURING
COMPLETENESS
▸ Fit for purpose
▸ Code fulfils requirements: use cases,
specs etc.
▸ All tests pass
▸ Tests cover all/most of the code
execution
▸ Security
https://www.flickr.com/photos/chrispiascik/4792101589/
METRICS AND MEASURING
PERFORMANCE
▸ Artefact size and efficiency
▸ System resources
▸ Behaviour under load
▸ Capacity limitations
https://www.flickr.com/photos/dodgechallenger1/2246952682/
METRICS AND MEASURING
AESTHETICS
▸ Readability of code
▸ Matches agreed coding style guides
▸ Organisation of code in a class/
module/component etc.
https://www.flickr.com/photos/nelljd/25157456300/
METRICS AND MEASURING
MAINTAINABILITY / SUPPORT
▸ Future maintenance of the code
▸ Documentation
▸ Stability/Lifespan
▸ Scalability
https://www.flickr.com/photos/dugspr/512883136/
METRICS AND MEASURING
USABILITY
▸ Positive user experience
▸ Positive reception
▸ UI leveraging best practices
▸ Support for impaired users
https://www.flickr.com/photos/baldiri/5734993652/
METRICS AND MEASURING
ARCHITECTURE
▸ System complexity
▸ Module cohesion
▸ Module dependency
https://www.flickr.com/photos/mini_malist/14416440852/
WHY BOTHER WITH
MEASURING QUALITY?
https://www.flickr.com/photos/magro-family/4601000979/
“YOU CAN'T CONTROL WHAT YOU CAN'T
MEASURE.”
Tom DeMarco
METRICS AND MEASURING
METRICS AND MEASURING
WHY WOULD WE WANT TO MEASURE ELEMENTS OF QUALITY?
▸ It’s impossible to add quality later, start early to:
▸ identify potential technical debt
▸ find and fix bugs early in the development work
▸ track your test coverage.
METRICS AND MEASURING
COST OF FIXING ISSUES
▸ Rule of thumb: The later you find a
problem in your software the more
effort, time and money is involved in
fixing it.
▸ Note: There has NEVER been any
scientific study into what the
appropriate ratios are - it’s all
anecdotal/made up numbers… the
zones of unscientific fluffiness!
METRICS AND MEASURING
HOW CAN WE MEASURE?
▸ Automated vs. manual
▸ Tools vs. humans
▸ Precise numeric values vs. ‘gut feeling’
… but what about those ‘code smells’?
METRICS AND MEASURING
WHAT CAN WE MEASURE?
▸ Certain metric categories lend themselves to being taken at design/code/
architecture level
▸ Others might have to be dealt with on others levels, e.g. acceptance criteria, ’fit
for purpose’, user happiness, etc.
METRICS AND MEASURING
COMPLETENESS
▸ Fit for purpose — Stakeholders/customers/users
▸ Code fulfils requirements: use cases, specs etc — BDD (to some level)
▸ All tests pass — TDD/BDD/UI tests
▸ Tests cover all/most of the code execution? — Code Coverage tools
▸ Security — Code security scanners
METRICS AND MEASURING
PERFORMANCE
▸ Artefact size and efficiency — Deployment size
▸ System resources — Load testing/System monitoring
▸ Behaviour under load — Load testing/System monitoring
▸ Capacity limitations — Load testing/System monitoring
METRICS AND MEASURING
AESTHETICS
▸ Readability of code — Code style checkers (to some level) & Human review
▸ Matches agreed coding style guides — Code style checkers
▸ Organisation of code in a class|module|component etc. — Architecture checks &
Human review
METRICS AND MEASURING
MAINTAINABILITY/SUPPORT
▸ Future maintenance of the code — Code style checkers & Human review
▸ Documentation — Documentation tools
▸ Stability/Lifespan — System monitoring
▸ Scalability — System monitoring/Architecture checks
METRICS AND MEASURING
USABILITY
▸ Positive user experience — UI/AB tests & Human review
▸ Positive reception — Stakeholders/customers/users
▸ UI leveraging best practices — UI/AB tests & Human review
▸ Support for impaired users — a11y checker & UI/AB tests & Human review
METRICS AND MEASURING
ARCHITECTURE
▸ System complexity — Code style & Architecture checks
▸ Module cohesion — Code style & Architecture checks
▸ Module dependency — Code style & Architecture checks
METRICS AND MEASURING
LINES OF CODE
▸ LOC: lines of code
▸ CLOC: commented lines of code
▸ NCLOC: not commented lines of code
▸ LLOC: logic lines of code
LOC = CLOC + NCLOC

LLOC <= NCLOC
METRICS AND MEASURING
COMPLEXITY
▸ McCabe (cyclomatic) counts number of decision points in a function: if/else,
switch/case, loops, etc.
▸ low: 1-4, normal: 5-7, high: 8-10, very high: 11+
▸ nPath tracks number of unique execution paths through a function
▸ values of 150+ are usually considered too high
▸ McCabe usually much small value than nPath
▸ Halstead metrics, lean into maintainability index metric - quite involved calculation
METRICS AND MEASURING
COMPEXITY
▸ McCabe complexity is 4
▸ nPath complexity is 8
METRICS AND MEASURING
MORE REFERENCE VALUES
Java Low Normal High Very High
CYCLO/LOC 0.15 0.2 0.25 0.35
LOC/method 7 10 13 20
NOM/class 4 7 10 15
METRICS AND MEASURING
MORE REFERENCE VALUES
C++ Low Normal High Very High
CYCLO/LOC 0.2 0.25 0.30 0.45
LOC/method 5 10 16 25
NOM/class 4 9 15 23
TOOLING AND ANALYSIS
https://www.flickr.com/photos/gasi/374913782
“THE PROBLEM WITH ‘QUICK AND DIRTY’ FIXES
IS THAT THE DIRTY STAYS AROUND FOREVER
WHILE THE QUICK HAS BEEN FORGOTTEN”
Common wisdom among software developers
TOOLING AND ANALYSIS
TOOLING AND ANALYSIS
TOOLING
▸ Testing: TDD/BDD/Spec tests, UI tests, user tests, load tests
▸ System management & monitoring
▸ Security: Intrusion detection, penetration testing, code scanner
▸ Code and architecture reviews and style checkers
TOOLING AND ANALYSIS
CODE ANALYSIS
▸ Static analysis: checks code that is not currently being executed
▸ Linter, syntax checking, style checker, architecture tools
▸ Dynamic/runtime analysis: checks code while being executed
▸ Code coverage, system monitoring
Test tools can fall into either category
TOOLING AND ANALYSIS
TOOLS FOR STATIC ANALYSIS
▸ CFLint: Linter, checking code by going through a set of rules
▸ CFML Complexity Metric Tool: McCabe index
TOOLING AND ANALYSIS
TOOLS FOR DYNAMIC ANALYSIS
▸ Rancho: Code coverage from Kunal Saini
▸ CF Metrics: Code coverage and statistics
STATIC CODE ANALYSIS
FOR CFML
STATIC CODE ANALYSIS FOR CFML
A STATIC CODE ANALYSER FOR CFML
▸ Started by Ryan Eberly
▸ Sitting on top of Denny Valiant's CFParser project
▸ Mission statement:
▸ ‘Provide a robust, configurable and extendable linter for CFML’
▸ Currently works with ACF and Lucee, main line of support is for ACF though
▸ Team of 4-5 regular contributors
STATIC CODE ANALYSIS FOR CFML
CFLINT
▸ Written in Java, requires Java 8+ to compile and run
▸ Unit tests can be contributed/executed without Java knowledge
▸ CFLint depends on CFParser to grok the code to analyse
▸ Various tooling/integration through 3rd party plugins
▸ Source is on Github
▸ Built with Gradle, distributed via Maven
DEMO TIME - USING CFLINT
STATIC CODE ANALYSIS FOR CFML
LINTING (I)
▸ CFLint traverses the source tree depth first:
▸ Component → Function → Statement → Expression → Identifier
▸ CFLint maintains its own scope during listing:
▸ Curent directory/filename
▸ Current component
▸ Current function
▸ Variables that are declared/attached to the scope
STATIC CODE ANALYSIS FOR CFML
LINTING (II)
▸ The scope is called the CFLint Context
▸ Provided to linting plugins
▸ Plugins do the actual work and feed reporting information back to CFLint
based on information in the Context and the respective plugin
▸ TLDR: plugins ~ liniting rules
STATIC CODE ANALYSIS FOR CFML
CFPARSER
▸ CFParser parses CFML code using two different approaches:
▸ CFML Tags: Jericho HTMLParser
▸ CFScript: ANTLR 4 grammar
▸ Output: AST (abstract syntax tree) of the CFML code
▸ CFLint builds usually rely on a certain CFParser release
▸ CFML expressions, statements and tags end up in CFLint being represented as
Java classes: CFStatement, CFExpression etc.
STATIC CODE ANALYSIS FOR CFML
REPORTING
▸ Currently four output formats:
▸ Text-based for Human consumption
▸ JSON object
▸ CFLint XML
▸ FindBugs XML
STATIC CODE ANALYSIS FOR CFML
TOOLING
▸ Various IDE and CI server integrations
▸ 3rd party projects: SublimeLinter (Sublime Text 3), ACF Builder extension,
AtomLinter (Atom), Visual Studio Code
▸ IntelliJ IDEA coming later this year or early 2018 — from me
▸ Jenkins plugin
▸ TeamCity (via Findbugs XML reporting)
▸ SonarQube
▸ NPM wrapper
STATIC CODE ANALYSIS FOR CFML
CONTRIBUTING
▸ Use CFLint with your code and provide feedback
▸ Talk to us and say hello!
▸ Provide test cases in CFML for issues you find
▸ Work on some documentation improvements
▸ Fix small and beginner-friendly CFLint tickets in Java code
▸ Become part of the regular dev team! :-)
STATIC CODE ANALYSIS FOR CFML
ROADMAP
▸ 1.0.1 — March 2017; first release after 2 years of betas :)
▸ 1.1 — June 2017; internal release
▸ 1.2.0-3 — August 2017
▸ Documentation/output work
▸ Internal changes to statistics tracking
▸ 1.3 — In progress; parsing/linting improvements, CommandBox
STATIC CODE ANALYSIS FOR CFML
ROADMAP
▸ 2.0 — 2018
▸ Complete rewrite of output and reporting
▸ Complete rewrite and clean up of configuration
▸ Performance improvements (parallelising linting)
▸ API for tooling
▸ Code metrics
STATIC CODE ANALYSIS FOR CFML
ROADMAP
▸ 3.0 — ???
▸ Support for rules in CFML
▸ Abstract internal DOM
▸ New rules based on the DOM implementation
FINAL THOUGHTS
RESOURCES
▸ CFLint: https://github.com/cflint/CFLint
▸ CFML Complexity Metric Tool: https://github.com/NathanStrutz/CFML-Complexity-Metric-Tool
▸ Rancho: http://kunalsaini.blogspot.co.nz/2012/05/rancho-code-coverage-tool-for.html
▸ CF Metrics: https://github.com/kacperus/cf-metrics
FINAL THOUGHTS
GET IN TOUCH
Kai Koenig
Email: kai@ventego-creative.co.nz
Twitter: @AgentK
Telegram: @kaikoenig

Contenu connexe

Tendances

Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective Engineering Software Lab
 
Cucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next levelCucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next levelnextbuild
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & toolsRajesh Kumar
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Alexandre (Shura) Iline
 
Understanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptUnderstanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptMark Daggett
 
TEA Presentation V 0.3
TEA Presentation V 0.3TEA Presentation V 0.3
TEA Presentation V 0.3Ian McDonald
 
SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011David O'Dowd
 
CSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 DigitsCSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 DigitsBill Tyler
 
Ph.D. Thesis Defense: Studying Reviewer Selection and Involvement in Modern ...
Ph.D. Thesis Defense:  Studying Reviewer Selection and Involvement in Modern ...Ph.D. Thesis Defense:  Studying Reviewer Selection and Involvement in Modern ...
Ph.D. Thesis Defense: Studying Reviewer Selection and Involvement in Modern ...The University of Adelaide
 
Automation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadAutomation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadDurga Prasad
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis Engineering Software Lab
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Simone Chiaretta
 
Revisiting Code Ownership and Its Relationship with Software Quality in the S...
Revisiting Code Ownership and Its Relationship with Software Quality in the S...Revisiting Code Ownership and Its Relationship with Software Quality in the S...
Revisiting Code Ownership and Its Relationship with Software Quality in the S...The University of Adelaide
 
Model Checking History
Model Checking History Model Checking History
Model Checking History Anit Thapaliya
 
Black Box Test Design Techniques
Black Box Test Design TechniquesBlack Box Test Design Techniques
Black Box Test Design TechniquesGlobalLogic Ukraine
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSourceOleksii Prohonnyi
 

Tendances (20)

Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective
 
Code Coverage
Code CoverageCode Coverage
Code Coverage
 
Cucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next levelCucumber spec - a tool takes your bdd to the next level
Cucumber spec - a tool takes your bdd to the next level
 
Code coverage & tools
Code coverage & toolsCode coverage & tools
Code coverage & tools
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
 
Understanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScriptUnderstanding, measuring and improving code quality in JavaScript
Understanding, measuring and improving code quality in JavaScript
 
Ensuring code quality
Ensuring code qualityEnsuring code quality
Ensuring code quality
 
TEA Presentation V 0.3
TEA Presentation V 0.3TEA Presentation V 0.3
TEA Presentation V 0.3
 
SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011SoftTest Ireland: Model Based Testing - January 27th 2011
SoftTest Ireland: Model Based Testing - January 27th 2011
 
CSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 DigitsCSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
CSUN 2018 Analyzing and Extending WCAG Beyond 3 Digits
 
Ph.D. Thesis Defense: Studying Reviewer Selection and Involvement in Modern ...
Ph.D. Thesis Defense:  Studying Reviewer Selection and Involvement in Modern ...Ph.D. Thesis Defense:  Studying Reviewer Selection and Involvement in Modern ...
Ph.D. Thesis Defense: Studying Reviewer Selection and Involvement in Modern ...
 
Automation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in HyderabadAutomation testing by Durgasoft in Hyderabad
Automation testing by Durgasoft in Hyderabad
 
Static code analysis
Static code analysisStatic code analysis
Static code analysis
 
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)
 
Revisiting Code Ownership and Its Relationship with Software Quality in the S...
Revisiting Code Ownership and Its Relationship with Software Quality in the S...Revisiting Code Ownership and Its Relationship with Software Quality in the S...
Revisiting Code Ownership and Its Relationship with Software Quality in the S...
 
Model Checking History
Model Checking History Model Checking History
Model Checking History
 
Black Box Test Design Techniques
Black Box Test Design TechniquesBlack Box Test Design Techniques
Black Box Test Design Techniques
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSource
 

Similaire à Improving your CFML code quality

Enterprise Node - Code Quality
Enterprise Node - Code QualityEnterprise Node - Code Quality
Enterprise Node - Code QualityKurtis Kemple
 
How to apply machine learning into your CI/CD pipeline
How to apply machine learning into your CI/CD pipelineHow to apply machine learning into your CI/CD pipeline
How to apply machine learning into your CI/CD pipelineAlon Weiss
 
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ..."Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...Fwdays
 
Zero-bug Software, Mathematically Guaranteed
Zero-bug Software, Mathematically GuaranteedZero-bug Software, Mathematically Guaranteed
Zero-bug Software, Mathematically GuaranteedAshley Zupkus
 
Software testing course - Manual
Software testing course - ManualSoftware testing course - Manual
Software testing course - ManualPankaj Dubey
 
Agile for Software as a Medical Device
Agile for Software as a Medical DeviceAgile for Software as a Medical Device
Agile for Software as a Medical DeviceOrthogonal
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQASymphony
 
Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1Gary Stafford
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverQA or the Highway
 
Introduction to automated quality assurance
Introduction to automated quality assuranceIntroduction to automated quality assurance
Introduction to automated quality assurancePhilip Johnson
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & ValidationElmar Selbach
 
Agile in Medical Software Development
Agile in Medical Software DevelopmentAgile in Medical Software Development
Agile in Medical Software DevelopmentBernhard Kappe
 
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Jorge Hidalgo
 
An introduction to Software Testing and Test Management
An introduction to Software Testing and Test ManagementAn introduction to Software Testing and Test Management
An introduction to Software Testing and Test ManagementAnuraj S.L
 
Manual Testing Guide1.pdf
Manual Testing Guide1.pdfManual Testing Guide1.pdf
Manual Testing Guide1.pdfKhushal Chate
 
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web TestingThe Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web TestingPerfecto by Perforce
 
Metrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryMetrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryAndrew Phillips
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Securitysedukull
 

Similaire à Improving your CFML code quality (20)

Enterprise Node - Code Quality
Enterprise Node - Code QualityEnterprise Node - Code Quality
Enterprise Node - Code Quality
 
How to apply machine learning into your CI/CD pipeline
How to apply machine learning into your CI/CD pipelineHow to apply machine learning into your CI/CD pipeline
How to apply machine learning into your CI/CD pipeline
 
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ..."Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
 
Zero-bug Software, Mathematically Guaranteed
Zero-bug Software, Mathematically GuaranteedZero-bug Software, Mathematically Guaranteed
Zero-bug Software, Mathematically Guaranteed
 
Resume_NIT
Resume_NITResume_NIT
Resume_NIT
 
Software testing course - Manual
Software testing course - ManualSoftware testing course - Manual
Software testing course - Manual
 
Agile for Software as a Medical Device
Agile for Software as a Medical DeviceAgile for Software as a Medical Device
Agile for Software as a Medical Device
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1Infrastructure as Code Maturity Model v1
Infrastructure as Code Maturity Model v1
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
 
Introduction to automated quality assurance
Introduction to automated quality assuranceIntroduction to automated quality assurance
Introduction to automated quality assurance
 
Presentation Verification & Validation
Presentation Verification & ValidationPresentation Verification & Validation
Presentation Verification & Validation
 
Agile in Medical Software Development
Agile in Medical Software DevelopmentAgile in Medical Software Development
Agile in Medical Software Development
 
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
Multilanguage Pipelines with Jenkins, Docker and Kubernetes (Commit Conf 2018)
 
An introduction to Software Testing and Test Management
An introduction to Software Testing and Test ManagementAn introduction to Software Testing and Test Management
An introduction to Software Testing and Test Management
 
Resume
ResumeResume
Resume
 
Manual Testing Guide1.pdf
Manual Testing Guide1.pdfManual Testing Guide1.pdf
Manual Testing Guide1.pdf
 
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web TestingThe Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
 
Metrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryMetrics-driven Continuous Delivery
Metrics-driven Continuous Delivery
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Security
 

Plus de Kai Koenig

Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Kai Koenig
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsKai Koenig
 
Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsKai Koenig
 
Android 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesAndroid 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesKai Koenig
 
Kotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKai Koenig
 
Kotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKai Koenig
 
Summer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcampSummer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcampKai Koenig
 
2017: Kotlin - now more than ever
2017: Kotlin - now more than ever2017: Kotlin - now more than ever
2017: Kotlin - now more than everKai Koenig
 
Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Kai Koenig
 
Coding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinCoding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinKai Koenig
 
API management with Taffy and API Blueprint
API management with Taffy and API BlueprintAPI management with Taffy and API Blueprint
API management with Taffy and API BlueprintKai Koenig
 
Little Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinLittle Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinKai Koenig
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data MiningKai Koenig
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and youKai Koenig
 
Real World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileReal World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileKai Koenig
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friendKai Koenig
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101Kai Koenig
 
There's a time and a place
There's a time and a placeThere's a time and a place
There's a time and a placeKai Koenig
 
Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Kai Koenig
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developersKai Koenig
 

Plus de Kai Koenig (20)

Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones Why a whole country skipped a day - Fun with Timezones
Why a whole country skipped a day - Fun with Timezones
 
Android 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture ComponentsAndroid 103 - Firebase and Architecture Components
Android 103 - Firebase and Architecture Components
 
Android 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other thingsAndroid 102 - Flow, Layouts and other things
Android 102 - Flow, Layouts and other things
 
Android 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutesAndroid 101 - Building a simple app with Kotlin in 90 minutes
Android 101 - Building a simple app with Kotlin in 90 minutes
 
Kotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 versionKotlin Coroutines and Android sitting in a tree - 2018 version
Kotlin Coroutines and Android sitting in a tree - 2018 version
 
Kotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a treeKotlin Coroutines and Android sitting in a tree
Kotlin Coroutines and Android sitting in a tree
 
Summer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcampSummer of Tech 2017 - Kotlin/Android bootcamp
Summer of Tech 2017 - Kotlin/Android bootcamp
 
2017: Kotlin - now more than ever
2017: Kotlin - now more than ever2017: Kotlin - now more than ever
2017: Kotlin - now more than ever
 
Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?Anko - The Ultimate Ninja of Kotlin Libraries?
Anko - The Ultimate Ninja of Kotlin Libraries?
 
Coding for Android on steroids with Kotlin
Coding for Android on steroids with KotlinCoding for Android on steroids with Kotlin
Coding for Android on steroids with Kotlin
 
API management with Taffy and API Blueprint
API management with Taffy and API BlueprintAPI management with Taffy and API Blueprint
API management with Taffy and API Blueprint
 
Little Helpers for Android Development with Kotlin
Little Helpers for Android Development with KotlinLittle Helpers for Android Development with Kotlin
Little Helpers for Android Development with Kotlin
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data Mining
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and you
 
Real World Lessons in jQuery Mobile
Real World Lessons in jQuery MobileReal World Lessons in jQuery Mobile
Real World Lessons in jQuery Mobile
 
The JVM is your friend
The JVM is your friendThe JVM is your friend
The JVM is your friend
 
Regular Expressions 101
Regular Expressions 101Regular Expressions 101
Regular Expressions 101
 
There's a time and a place
There's a time and a placeThere's a time and a place
There's a time and a place
 
Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)Clojure - an introduction (and some CFML)
Clojure - an introduction (and some CFML)
 
AngularJS for designers and developers
AngularJS for designers and developersAngularJS for designers and developers
AngularJS for designers and developers
 

Dernier

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationShrmpro
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburgmasabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 

Dernier (20)

AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 

Improving your CFML code quality

  • 1. (TOOLS FOR) IMPROVING YOUR 
 CFML CODE QUALITY KAI KOENIG (@AGENTK)
  • 2. AGENDA ▸ Software and code quality ▸ Metrics and measuring ▸ Tooling and analysis ▸ CFLint
  • 4. THE ART OF CHICKEN SEXING bsmalley @ commons.wikipedia.org
  • 5.
  • 7. CONDITION OF EXCELLENCE IMPLYING 
 FINE QUALITY 
 AS DISTINCT FROM BAD QUALITY https://www.flickr.com/photos/serdal/14863608800/
  • 8. SOFTWARE AND CODE QUALITY TYPES OF QUALITY ▸ Quality can be objective or subjective ▸ Subjective quality: dependent on personal experience to recognise excellence. Subjective quality is ‘universally true’ from the observer’s point of view. ▸ Objective quality: measure ‘genius’, quantify and repeat -> Feedback loop
  • 9. SOFTWARE AND CODE QUALITY CAN RECOGNISING QUALITY BE LEARNED? ▸ Chicken sexing seems to be something industry professionals lack objective criteria for ▸ Does chicken sexing as process of quality determination lead to subjective or objective quality? ▸ What about code and software? ▸ How can we improve in determining objective quality?
  • 10. “ANY FOOL CAN WRITE CODE THAT A COMPUTER CAN UNDERSTAND. GOOD PROGRAMMERS WRITE CODE THAT HUMANS CAN UNDERSTAND.” Martin Fowler SOFTWARE AND CODE QUALITY
  • 13. METRICS AND MEASURING DIFFERENT TYPES OF METRICS ▸ There are various categories to measure software quality in: ▸ Completeness ▸ Performance ▸ Aesthetics ▸ Maintainability and Support ▸ Usability ▸ Architecture
  • 14. METRICS AND MEASURING COMPLETENESS ▸ Fit for purpose ▸ Code fulfils requirements: use cases, specs etc. ▸ All tests pass ▸ Tests cover all/most of the code execution ▸ Security https://www.flickr.com/photos/chrispiascik/4792101589/
  • 15. METRICS AND MEASURING PERFORMANCE ▸ Artefact size and efficiency ▸ System resources ▸ Behaviour under load ▸ Capacity limitations https://www.flickr.com/photos/dodgechallenger1/2246952682/
  • 16. METRICS AND MEASURING AESTHETICS ▸ Readability of code ▸ Matches agreed coding style guides ▸ Organisation of code in a class/ module/component etc. https://www.flickr.com/photos/nelljd/25157456300/
  • 17. METRICS AND MEASURING MAINTAINABILITY / SUPPORT ▸ Future maintenance of the code ▸ Documentation ▸ Stability/Lifespan ▸ Scalability https://www.flickr.com/photos/dugspr/512883136/
  • 18. METRICS AND MEASURING USABILITY ▸ Positive user experience ▸ Positive reception ▸ UI leveraging best practices ▸ Support for impaired users https://www.flickr.com/photos/baldiri/5734993652/
  • 19. METRICS AND MEASURING ARCHITECTURE ▸ System complexity ▸ Module cohesion ▸ Module dependency https://www.flickr.com/photos/mini_malist/14416440852/
  • 20. WHY BOTHER WITH MEASURING QUALITY? https://www.flickr.com/photos/magro-family/4601000979/
  • 21. “YOU CAN'T CONTROL WHAT YOU CAN'T MEASURE.” Tom DeMarco METRICS AND MEASURING
  • 22. METRICS AND MEASURING WHY WOULD WE WANT TO MEASURE ELEMENTS OF QUALITY? ▸ It’s impossible to add quality later, start early to: ▸ identify potential technical debt ▸ find and fix bugs early in the development work ▸ track your test coverage.
  • 23. METRICS AND MEASURING COST OF FIXING ISSUES ▸ Rule of thumb: The later you find a problem in your software the more effort, time and money is involved in fixing it. ▸ Note: There has NEVER been any scientific study into what the appropriate ratios are - it’s all anecdotal/made up numbers… the zones of unscientific fluffiness!
  • 24. METRICS AND MEASURING HOW CAN WE MEASURE? ▸ Automated vs. manual ▸ Tools vs. humans ▸ Precise numeric values vs. ‘gut feeling’ … but what about those ‘code smells’?
  • 25. METRICS AND MEASURING WHAT CAN WE MEASURE? ▸ Certain metric categories lend themselves to being taken at design/code/ architecture level ▸ Others might have to be dealt with on others levels, e.g. acceptance criteria, ’fit for purpose’, user happiness, etc.
  • 26. METRICS AND MEASURING COMPLETENESS ▸ Fit for purpose — Stakeholders/customers/users ▸ Code fulfils requirements: use cases, specs etc — BDD (to some level) ▸ All tests pass — TDD/BDD/UI tests ▸ Tests cover all/most of the code execution? — Code Coverage tools ▸ Security — Code security scanners
  • 27. METRICS AND MEASURING PERFORMANCE ▸ Artefact size and efficiency — Deployment size ▸ System resources — Load testing/System monitoring ▸ Behaviour under load — Load testing/System monitoring ▸ Capacity limitations — Load testing/System monitoring
  • 28. METRICS AND MEASURING AESTHETICS ▸ Readability of code — Code style checkers (to some level) & Human review ▸ Matches agreed coding style guides — Code style checkers ▸ Organisation of code in a class|module|component etc. — Architecture checks & Human review
  • 29. METRICS AND MEASURING MAINTAINABILITY/SUPPORT ▸ Future maintenance of the code — Code style checkers & Human review ▸ Documentation — Documentation tools ▸ Stability/Lifespan — System monitoring ▸ Scalability — System monitoring/Architecture checks
  • 30. METRICS AND MEASURING USABILITY ▸ Positive user experience — UI/AB tests & Human review ▸ Positive reception — Stakeholders/customers/users ▸ UI leveraging best practices — UI/AB tests & Human review ▸ Support for impaired users — a11y checker & UI/AB tests & Human review
  • 31. METRICS AND MEASURING ARCHITECTURE ▸ System complexity — Code style & Architecture checks ▸ Module cohesion — Code style & Architecture checks ▸ Module dependency — Code style & Architecture checks
  • 32. METRICS AND MEASURING LINES OF CODE ▸ LOC: lines of code ▸ CLOC: commented lines of code ▸ NCLOC: not commented lines of code ▸ LLOC: logic lines of code LOC = CLOC + NCLOC
 LLOC <= NCLOC
  • 33. METRICS AND MEASURING COMPLEXITY ▸ McCabe (cyclomatic) counts number of decision points in a function: if/else, switch/case, loops, etc. ▸ low: 1-4, normal: 5-7, high: 8-10, very high: 11+ ▸ nPath tracks number of unique execution paths through a function ▸ values of 150+ are usually considered too high ▸ McCabe usually much small value than nPath ▸ Halstead metrics, lean into maintainability index metric - quite involved calculation
  • 34. METRICS AND MEASURING COMPEXITY ▸ McCabe complexity is 4 ▸ nPath complexity is 8
  • 35. METRICS AND MEASURING MORE REFERENCE VALUES Java Low Normal High Very High CYCLO/LOC 0.15 0.2 0.25 0.35 LOC/method 7 10 13 20 NOM/class 4 7 10 15
  • 36. METRICS AND MEASURING MORE REFERENCE VALUES C++ Low Normal High Very High CYCLO/LOC 0.2 0.25 0.30 0.45 LOC/method 5 10 16 25 NOM/class 4 9 15 23
  • 38. “THE PROBLEM WITH ‘QUICK AND DIRTY’ FIXES IS THAT THE DIRTY STAYS AROUND FOREVER WHILE THE QUICK HAS BEEN FORGOTTEN” Common wisdom among software developers TOOLING AND ANALYSIS
  • 39. TOOLING AND ANALYSIS TOOLING ▸ Testing: TDD/BDD/Spec tests, UI tests, user tests, load tests ▸ System management & monitoring ▸ Security: Intrusion detection, penetration testing, code scanner ▸ Code and architecture reviews and style checkers
  • 40. TOOLING AND ANALYSIS CODE ANALYSIS ▸ Static analysis: checks code that is not currently being executed ▸ Linter, syntax checking, style checker, architecture tools ▸ Dynamic/runtime analysis: checks code while being executed ▸ Code coverage, system monitoring Test tools can fall into either category
  • 41. TOOLING AND ANALYSIS TOOLS FOR STATIC ANALYSIS ▸ CFLint: Linter, checking code by going through a set of rules ▸ CFML Complexity Metric Tool: McCabe index
  • 42. TOOLING AND ANALYSIS TOOLS FOR DYNAMIC ANALYSIS ▸ Rancho: Code coverage from Kunal Saini ▸ CF Metrics: Code coverage and statistics
  • 44. STATIC CODE ANALYSIS FOR CFML A STATIC CODE ANALYSER FOR CFML ▸ Started by Ryan Eberly ▸ Sitting on top of Denny Valiant's CFParser project ▸ Mission statement: ▸ ‘Provide a robust, configurable and extendable linter for CFML’ ▸ Currently works with ACF and Lucee, main line of support is for ACF though ▸ Team of 4-5 regular contributors
  • 45. STATIC CODE ANALYSIS FOR CFML CFLINT ▸ Written in Java, requires Java 8+ to compile and run ▸ Unit tests can be contributed/executed without Java knowledge ▸ CFLint depends on CFParser to grok the code to analyse ▸ Various tooling/integration through 3rd party plugins ▸ Source is on Github ▸ Built with Gradle, distributed via Maven
  • 46. DEMO TIME - USING CFLINT
  • 47. STATIC CODE ANALYSIS FOR CFML LINTING (I) ▸ CFLint traverses the source tree depth first: ▸ Component → Function → Statement → Expression → Identifier ▸ CFLint maintains its own scope during listing: ▸ Curent directory/filename ▸ Current component ▸ Current function ▸ Variables that are declared/attached to the scope
  • 48. STATIC CODE ANALYSIS FOR CFML LINTING (II) ▸ The scope is called the CFLint Context ▸ Provided to linting plugins ▸ Plugins do the actual work and feed reporting information back to CFLint based on information in the Context and the respective plugin ▸ TLDR: plugins ~ liniting rules
  • 49. STATIC CODE ANALYSIS FOR CFML CFPARSER ▸ CFParser parses CFML code using two different approaches: ▸ CFML Tags: Jericho HTMLParser ▸ CFScript: ANTLR 4 grammar ▸ Output: AST (abstract syntax tree) of the CFML code ▸ CFLint builds usually rely on a certain CFParser release ▸ CFML expressions, statements and tags end up in CFLint being represented as Java classes: CFStatement, CFExpression etc.
  • 50. STATIC CODE ANALYSIS FOR CFML REPORTING ▸ Currently four output formats: ▸ Text-based for Human consumption ▸ JSON object ▸ CFLint XML ▸ FindBugs XML
  • 51. STATIC CODE ANALYSIS FOR CFML TOOLING ▸ Various IDE and CI server integrations ▸ 3rd party projects: SublimeLinter (Sublime Text 3), ACF Builder extension, AtomLinter (Atom), Visual Studio Code ▸ IntelliJ IDEA coming later this year or early 2018 — from me ▸ Jenkins plugin ▸ TeamCity (via Findbugs XML reporting) ▸ SonarQube ▸ NPM wrapper
  • 52. STATIC CODE ANALYSIS FOR CFML CONTRIBUTING ▸ Use CFLint with your code and provide feedback ▸ Talk to us and say hello! ▸ Provide test cases in CFML for issues you find ▸ Work on some documentation improvements ▸ Fix small and beginner-friendly CFLint tickets in Java code ▸ Become part of the regular dev team! :-)
  • 53. STATIC CODE ANALYSIS FOR CFML ROADMAP ▸ 1.0.1 — March 2017; first release after 2 years of betas :) ▸ 1.1 — June 2017; internal release ▸ 1.2.0-3 — August 2017 ▸ Documentation/output work ▸ Internal changes to statistics tracking ▸ 1.3 — In progress; parsing/linting improvements, CommandBox
  • 54. STATIC CODE ANALYSIS FOR CFML ROADMAP ▸ 2.0 — 2018 ▸ Complete rewrite of output and reporting ▸ Complete rewrite and clean up of configuration ▸ Performance improvements (parallelising linting) ▸ API for tooling ▸ Code metrics
  • 55. STATIC CODE ANALYSIS FOR CFML ROADMAP ▸ 3.0 — ??? ▸ Support for rules in CFML ▸ Abstract internal DOM ▸ New rules based on the DOM implementation
  • 56. FINAL THOUGHTS RESOURCES ▸ CFLint: https://github.com/cflint/CFLint ▸ CFML Complexity Metric Tool: https://github.com/NathanStrutz/CFML-Complexity-Metric-Tool ▸ Rancho: http://kunalsaini.blogspot.co.nz/2012/05/rancho-code-coverage-tool-for.html ▸ CF Metrics: https://github.com/kacperus/cf-metrics
  • 57. FINAL THOUGHTS GET IN TOUCH Kai Koenig Email: kai@ventego-creative.co.nz Twitter: @AgentK Telegram: @kaikoenig