SlideShare a Scribd company logo

Connascence

1 of 20
Download to read offline
(c) kevin rutherford 2012
describing the internal quality of software
@kevinrutherford
(c) kevin rutherford 2012
code smells
Primitive Obsession
Feature Envy
Sim
ulated
Polym
orphismLazy Class
Temporary Field
Inappropriate Intimacy
ShotgunSurgery
Data Clump
Long
M
ethod
Large Class
RefusedBequest
(c) kevin rutherford 2012
code smells
Primitive Obsession
Feature Envy
Sim
ulated
Polym
orphismLazy Class
Temporary Field
Inappropriate Intimacy
ShotgunSurgery
Data Clump
Long
M
ethod
Large Class
???
??? ???
???
???
???
???
RefusedBequest
(c) kevin rutherford 2012
connascence
Two software components are connascent
if a change in one would require the other to be modified
in order to maintain the overall correctness of the system.
(c) kevin rutherford 2012
connascence
Connascence of Name
Connascence of Type
Connascence of Meaning
Connascence of Algorithm
Connascence of Position
Connascence of Execution order
Connascence of Timing
Connascence of Value
Connascence of Identity
(c) kevin rutherford 2012
connascence
Connascence of Name
Connascence of Type
Connascence of Meaning
Connascence of Algorithm
Connascence of Position
Connascence of Execution order
Connascence of Timing
Connascence of Value
Connascence of Identity
refactoring should
take the code in
this direction
static code
properties
properties of
running code

More Related Content

What's hot

Insert цэсний тухай
Insert цэсний тухайInsert цэсний тухай
Insert цэсний тухайbbe_0416
 
SCRUM арга
SCRUM аргаSCRUM арга
SCRUM аргаUndram J
 
компьютер ба түүний дагалдах хэрэгсэл
компьютер ба түүний дагалдах хэрэгсэлкомпьютер ба түүний дагалдах хэрэгсэл
компьютер ба түүний дагалдах хэрэгсэлХ. Гэрэлчимэг
 
сүлжээний технологи
сүлжээний технологисүлжээний технологи
сүлжээний технологиKhishighuu Myanganbuu
 
өгөгдөл дамжуулах 4
өгөгдөл дамжуулах 4өгөгдөл дамжуулах 4
өгөгдөл дамжуулах 4Oidov Umbelee
 
Motherboard буюу эх хавтан гэж юу вэ
Motherboard буюу эх хавтан гэж юу вэMotherboard буюу эх хавтан гэж юу вэ
Motherboard буюу эх хавтан гэж юу вэKisoGaki
 
компьютэрийн төрлүүд
компьютэрийн төрлүүдкомпьютэрийн төрлүүд
компьютэрийн төрлүүдTegshee myagmar
 
Nat гэж юу вэ
Nat  гэж юу вэNat  гэж юу вэ
Nat гэж юу вэOchiroo Dorj
 
компьютерийн техник хангамж 7 р анги
компьютерийн техник хангамж 7 р ангикомпьютерийн техник хангамж 7 р анги
компьютерийн техник хангамж 7 р ангиKhishighuu Myanganbuu
 
Төгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх нь
Төгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх ньТөгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх нь
Төгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх ньBayarmaaBayrmaa
 
срU гэж юу вэ?
срU гэж юу вэ?срU гэж юу вэ?
срU гэж юу вэ?shulam
 
Lec4 хereglegchiinpunkts
Lec4 хereglegchiinpunktsLec4 хereglegchiinpunkts
Lec4 хereglegchiinpunktsTuruu Tsogt
 
Оюуны зураглал
Оюуны зураглалОюуны зураглал
Оюуны зураглалBurnee Naran
 

What's hot (20)

лекц №1 насаз
лекц №1 насазлекц №1 насаз
лекц №1 насаз
 
It101-3
It101-3It101-3
It101-3
 
Insert цэсний тухай
Insert цэсний тухайInsert цэсний тухай
Insert цэсний тухай
 
SCRUM арга
SCRUM аргаSCRUM арга
SCRUM арга
 
Page layout цэс
Page layout цэсPage layout цэс
Page layout цэс
 
компьютер ба түүний дагалдах хэрэгсэл
компьютер ба түүний дагалдах хэрэгсэлкомпьютер ба түүний дагалдах хэрэгсэл
компьютер ба түүний дагалдах хэрэгсэл
 
сүлжээний технологи
сүлжээний технологисүлжээний технологи
сүлжээний технологи
 
өгөгдөл дамжуулах 4
өгөгдөл дамжуулах 4өгөгдөл дамжуулах 4
өгөгдөл дамжуулах 4
 
Motherboard буюу эх хавтан гэж юу вэ
Motherboard буюу эх хавтан гэж юу вэMotherboard буюу эх хавтан гэж юу вэ
Motherboard буюу эх хавтан гэж юу вэ
 
компьютэрийн төрлүүд
компьютэрийн төрлүүдкомпьютэрийн төрлүүд
компьютэрийн төрлүүд
 
Human res planing 1 2010 hunii nuutsiin tuluvlultiin undes
Human res planing 1 2010 hunii nuutsiin tuluvlultiin undesHuman res planing 1 2010 hunii nuutsiin tuluvlultiin undes
Human res planing 1 2010 hunii nuutsiin tuluvlultiin undes
 
Nat гэж юу вэ
Nat  гэж юу вэNat  гэж юу вэ
Nat гэж юу вэ
 
Ms word
Ms wordMs word
Ms word
 
компьютерийн техник хангамж 7 р анги
компьютерийн техник хангамж 7 р ангикомпьютерийн техник хангамж 7 р анги
компьютерийн техник хангамж 7 р анги
 
Төгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх нь
Төгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх ньТөгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх нь
Төгсөгчдийн мэдлэг ур чадварыг ажлын байранд дээшлүүлэх нь
 
срU гэж юу вэ?
срU гэж юу вэ?срU гэж юу вэ?
срU гэж юу вэ?
 
Mtms lec-1
Mtms lec-1Mtms lec-1
Mtms lec-1
 
Lec4 хereglegchiinpunkts
Lec4 хereglegchiinpunktsLec4 хereglegchiinpunkts
Lec4 хereglegchiinpunkts
 
Lec03 concurrency (2)
Lec03 concurrency (2)Lec03 concurrency (2)
Lec03 concurrency (2)
 
Оюуны зураглал
Оюуны зураглалОюуны зураглал
Оюуны зураглал
 

Viewers also liked

A better way to learn refactoring
A better way to learn refactoringA better way to learn refactoring
A better way to learn refactoringRafael Sperling
 
The Building Blocks Of Modularity
The Building Blocks Of ModularityThe Building Blocks Of Modularity
The Building Blocks Of ModularityLittleBIGRuby
 
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet ModulesPuppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet ModulesPuppet
 
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopPuppet
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development WorkflowJeffery Smith
 
Devops, Dungeons & Dragons
Devops, Dungeons & Dragons Devops, Dungeons & Dragons
Devops, Dungeons & Dragons David Lutz
 
Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Aaron Bernstein
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Puppet
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of PackerFreyr Lin
 
Designing with capabilities (DDD-EU 2017)
Designing with capabilities (DDD-EU 2017)Designing with capabilities (DDD-EU 2017)
Designing with capabilities (DDD-EU 2017)Scott Wlaschin
 
Contagious Messages
Contagious MessagesContagious Messages
Contagious MessageskarenMoyse
 
Compresent pyramid by coon
Compresent pyramid by coonCompresent pyramid by coon
Compresent pyramid by coonCoon Chaiyapruk
 
Recommendation From ABC Industries 2014
Recommendation From ABC Industries 2014Recommendation From ABC Industries 2014
Recommendation From ABC Industries 2014Boyd Breeding
 

Viewers also liked (20)

A better way to learn refactoring
A better way to learn refactoringA better way to learn refactoring
A better way to learn refactoring
 
Connascence hunting
Connascence huntingConnascence hunting
Connascence hunting
 
The Building Blocks Of Modularity
The Building Blocks Of ModularityThe Building Blocks Of Modularity
The Building Blocks Of Modularity
 
Code smells
Code smellsCode smells
Code smells
 
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet ModulesPuppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
Puppet Camp Atlanta 2014: Continuous Deployment of Puppet Modules
 
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet ModulePuppet Camp Sydney 2015: The (Im)perfect Puppet Module
Puppet Camp Sydney 2015: The (Im)perfect Puppet Module
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & Hadoop
 
Puppet Development Workflow
Puppet Development WorkflowPuppet Development Workflow
Puppet Development Workflow
 
Devops, Dungeons & Dragons
Devops, Dungeons & Dragons Devops, Dungeons & Dragons
Devops, Dungeons & Dragons
 
Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)Puppet - Configuration Management Made Eas(ier)
Puppet - Configuration Management Made Eas(ier)
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014
 
Docker
Docker Docker
Docker
 
A Introduction of Packer
A Introduction of PackerA Introduction of Packer
A Introduction of Packer
 
Docker internals
Docker internalsDocker internals
Docker internals
 
Designing with capabilities (DDD-EU 2017)
Designing with capabilities (DDD-EU 2017)Designing with capabilities (DDD-EU 2017)
Designing with capabilities (DDD-EU 2017)
 
Penal especial
Penal especialPenal especial
Penal especial
 
Contagious Messages
Contagious MessagesContagious Messages
Contagious Messages
 
Compresent pyramid by coon
Compresent pyramid by coonCompresent pyramid by coon
Compresent pyramid by coon
 
Recommendation From ABC Industries 2014
Recommendation From ABC Industries 2014Recommendation From ABC Industries 2014
Recommendation From ABC Industries 2014
 
insect legs
insect legsinsect legs
insect legs
 

Similar to Connascence

Cleaning your architecture with android architecture components
Cleaning your architecture with android architecture componentsCleaning your architecture with android architecture components
Cleaning your architecture with android architecture componentsDebora Gomez Bertoli
 
Make A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst FrameworkMake A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst FrameworkYodalee
 
An Introduction To CQRS
An Introduction To CQRSAn Introduction To CQRS
An Introduction To CQRSNeil Robbins
 
1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer iiIsabella789
 
Java level 1 Quizzes
Java level 1 QuizzesJava level 1 Quizzes
Java level 1 QuizzesSteven Luo
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the raceVictor_Cr
 
Deterministic simulation testing
Deterministic simulation testingDeterministic simulation testing
Deterministic simulation testingFoundationDB
 
Navigating the xDD Alphabet Soup
Navigating the xDD Alphabet SoupNavigating the xDD Alphabet Soup
Navigating the xDD Alphabet SoupDror Helper
 
a data driven game object system
a data driven game object systema data driven game object system
a data driven game object systemmaa77
 
Refactoring & Restructuring - Improving the Code and Structure of Software
Refactoring & Restructuring - Improving the Code and Structure of SoftwareRefactoring & Restructuring - Improving the Code and Structure of Software
Refactoring & Restructuring - Improving the Code and Structure of SoftwareCodeOps Technologies LLP
 
Clean Software Design: The Practices to Make The Design Simple
Clean Software Design: The Practices to Make The Design SimpleClean Software Design: The Practices to Make The Design Simple
Clean Software Design: The Practices to Make The Design SimpleLemi Orhan Ergin
 
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시Junha Jang
 
Unit test candidate solutions
Unit test candidate solutionsUnit test candidate solutions
Unit test candidate solutionsbenewu
 

Similar to Connascence (15)

Cleaning your architecture with android architecture components
Cleaning your architecture with android architecture componentsCleaning your architecture with android architecture components
Cleaning your architecture with android architecture components
 
Make A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst FrameworkMake A Shoot ‘Em Up Game with Amethyst Framework
Make A Shoot ‘Em Up Game with Amethyst Framework
 
An Introduction To CQRS
An Introduction To CQRSAn Introduction To CQRS
An Introduction To CQRS
 
Object discovery
Object discoveryObject discovery
Object discovery
 
1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii1z0 804 exam-java se 7 programmer ii
1z0 804 exam-java se 7 programmer ii
 
Java level 1 Quizzes
Java level 1 QuizzesJava level 1 Quizzes
Java level 1 Quizzes
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the race
 
Deterministic simulation testing
Deterministic simulation testingDeterministic simulation testing
Deterministic simulation testing
 
Navigating the xDD Alphabet Soup
Navigating the xDD Alphabet SoupNavigating the xDD Alphabet Soup
Navigating the xDD Alphabet Soup
 
a data driven game object system
a data driven game object systema data driven game object system
a data driven game object system
 
Refactoring & Restructuring - Improving the Code and Structure of Software
Refactoring & Restructuring - Improving the Code and Structure of SoftwareRefactoring & Restructuring - Improving the Code and Structure of Software
Refactoring & Restructuring - Improving the Code and Structure of Software
 
Clean Software Design: The Practices to Make The Design Simple
Clean Software Design: The Practices to Make The Design SimpleClean Software Design: The Practices to Make The Design Simple
Clean Software Design: The Practices to Make The Design Simple
 
Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시Java 스터디 강의자료 - 1차시
Java 스터디 강의자료 - 1차시
 
Unit test candidate solutions
Unit test candidate solutionsUnit test candidate solutions
Unit test candidate solutions
 
Import java
Import javaImport java
Import java
 

More from Kevin Rutherford (20)

Making the most of autism
Making the most of autismMaking the most of autism
Making the most of autism
 
Evolving the Kanban Board
Evolving the Kanban BoardEvolving the Kanban Board
Evolving the Kanban Board
 
Don't forget the developers!
Don't forget the developers!Don't forget the developers!
Don't forget the developers!
 
Love and death
Love and deathLove and death
Love and death
 
The 5-day challenge
The 5-day challengeThe 5-day challenge
The 5-day challenge
 
Red, green, ... what now?!
Red, green, ... what now?!Red, green, ... what now?!
Red, green, ... what now?!
 
Pair programming
Pair programmingPair programming
Pair programming
 
Tdd is dead
Tdd is deadTdd is dead
Tdd is dead
 
Hex arch
Hex archHex arch
Hex arch
 
Shepherding antipatterns
Shepherding antipatternsShepherding antipatterns
Shepherding antipatterns
 
Kata rules
Kata rulesKata rules
Kata rules
 
Movie app kata
Movie app kataMovie app kata
Movie app kata
 
OCP Checkout kata
OCP Checkout kataOCP Checkout kata
OCP Checkout kata
 
OCP bowling kata
OCP bowling kataOCP bowling kata
OCP bowling kata
 
OCP String Calculator kata
OCP String Calculator kataOCP String Calculator kata
OCP String Calculator kata
 
OCP kata overview
OCP kata overviewOCP kata overview
OCP kata overview
 
Telling not-asking
Telling not-askingTelling not-asking
Telling not-asking
 
Uml
UmlUml
Uml
 
Agile principles
Agile principlesAgile principles
Agile principles
 
Flow
FlowFlow
Flow
 

Recently uploaded

Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...Adrian Sanabria
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, TripadvisorProduct School
 
Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...
Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...
Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...DianaGray10
 
Introduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVAIntroduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVARobert McDermott
 
Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?MENGSAYLOEM1
 
Imaging and Design for the Online Environment Part 1.pptx
Imaging and Design for the Online Environment Part 1.pptxImaging and Design for the Online Environment Part 1.pptx
Imaging and Design for the Online Environment Part 1.pptxPower Point
 
How AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptxHow AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptxInfosec
 
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERNRonnelBaroc
 
Battle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsBattle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsEvangelia Mitsopoulou
 
Power of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdfPower of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdfkatalinjordans1
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17Ana-Maria Mihalceanu
 
AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...
AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...
AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...ISPMAIndia
 
How we think about an advisor tech stack
How we think about an advisor tech stackHow we think about an advisor tech stack
How we think about an advisor tech stackSummit
 
Apex Replay Debugger and Salesforce Platform Events.pptx
Apex Replay Debugger and Salesforce Platform Events.pptxApex Replay Debugger and Salesforce Platform Events.pptx
Apex Replay Debugger and Salesforce Platform Events.pptxmohayyudin7826
 
"Platform Engineering with Development Containers", Igor Fesenko
"Platform Engineering with Development Containers", Igor Fesenko"Platform Engineering with Development Containers", Igor Fesenko
"Platform Engineering with Development Containers", Igor FesenkoFwdays
 
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...MarcovanHurne2
 
LF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIELF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIEDanBrown980551
 
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, GoogleISPMAIndia
 
"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura RochniakFwdays
 

Recently uploaded (20)

Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
Avoiding Bad Stats and the Benefits of Playing Trivia with Friends: PancakesC...
 
In sharing we trust. Taking advantage of a diverse consortium to build a tran...
In sharing we trust. Taking advantage of a diverse consortium to build a tran...In sharing we trust. Taking advantage of a diverse consortium to build a tran...
In sharing we trust. Taking advantage of a diverse consortium to build a tran...
 
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner,  Challenge Like a VC by former CPO, TripadvisorAct Like an Owner,  Challenge Like a VC by former CPO, Tripadvisor
Act Like an Owner, Challenge Like a VC by former CPO, Tripadvisor
 
Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...
Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...
Automation Ops Series: Session 1 - Introduction and setup DevOps for UiPath p...
 
Introduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVAIntroduction to Multimodal LLMs with LLaVA
Introduction to Multimodal LLMs with LLaVA
 
Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?Are Human-generated Demonstrations Necessary for In-context Learning?
Are Human-generated Demonstrations Necessary for In-context Learning?
 
Imaging and Design for the Online Environment Part 1.pptx
Imaging and Design for the Online Environment Part 1.pptxImaging and Design for the Online Environment Part 1.pptx
Imaging and Design for the Online Environment Part 1.pptx
 
How AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptxHow AI and ChatGPT are changing cybersecurity forever.pptx
How AI and ChatGPT are changing cybersecurity forever.pptx
 
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
21ST CENTURY LITERACY FROM TRADITIONAL TO MODERN
 
Battle of React State Managers in frontend applications
Battle of React State Managers in frontend applicationsBattle of React State Managers in frontend applications
Battle of React State Managers in frontend applications
 
Power of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdfPower of 2024 - WITforce Odyssey.pptx.pdf
Power of 2024 - WITforce Odyssey.pptx.pdf
 
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17Enhancing Productivity and Insight  A Tour of JDK Tools Progress Beyond Java 17
Enhancing Productivity and Insight A Tour of JDK Tools Progress Beyond Java 17
 
AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...
AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...
AI MODELS USAGE IN FINTECH PRODUCTS: PM APPROACH & BEST PRACTICES by Kasthuri...
 
How we think about an advisor tech stack
How we think about an advisor tech stackHow we think about an advisor tech stack
How we think about an advisor tech stack
 
Apex Replay Debugger and Salesforce Platform Events.pptx
Apex Replay Debugger and Salesforce Platform Events.pptxApex Replay Debugger and Salesforce Platform Events.pptx
Apex Replay Debugger and Salesforce Platform Events.pptx
 
"Platform Engineering with Development Containers", Igor Fesenko
"Platform Engineering with Development Containers", Igor Fesenko"Platform Engineering with Development Containers", Igor Fesenko
"Platform Engineering with Development Containers", Igor Fesenko
 
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
Digital Transformation Strategy & Plan Templates - www.beyondthecloud.digital...
 
LF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIELF Energy Webinar: Introduction to TROLIE
LF Energy Webinar: Introduction to TROLIE
 
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
"The Transformative Power of AI and Open Challenges" by Dr. Manish Gupta, Google
 
"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak
 

Connascence

  • 1. (c) kevin rutherford 2012 describing the internal quality of software @kevinrutherford
  • 2. (c) kevin rutherford 2012 code smells Primitive Obsession Feature Envy Sim ulated Polym orphismLazy Class Temporary Field Inappropriate Intimacy ShotgunSurgery Data Clump Long M ethod Large Class RefusedBequest
  • 3. (c) kevin rutherford 2012 code smells Primitive Obsession Feature Envy Sim ulated Polym orphismLazy Class Temporary Field Inappropriate Intimacy ShotgunSurgery Data Clump Long M ethod Large Class ??? ??? ??? ??? ??? ??? ??? RefusedBequest
  • 4. (c) kevin rutherford 2012 connascence Two software components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system.
  • 5. (c) kevin rutherford 2012 connascence Connascence of Name Connascence of Type Connascence of Meaning Connascence of Algorithm Connascence of Position Connascence of Execution order Connascence of Timing Connascence of Value Connascence of Identity
  • 6. (c) kevin rutherford 2012 connascence Connascence of Name Connascence of Type Connascence of Meaning Connascence of Algorithm Connascence of Position Connascence of Execution order Connascence of Timing Connascence of Value Connascence of Identity refactoring should take the code in this direction static code properties properties of running code
  • 7. (c) kevin rutherford 2012 connascence of name Two components must agree on the name of something int count; count = 10; public enum Deck {   SPADES, HEARTS, CLUBS, DIAMONDS }; card = new Card(3, Deck.HEARTS); @Override public String toString() {   ... };
  • 8. (c) kevin rutherford 2012 connascence of type Two components must agree on the type of something String var; var = 10;   // oops! Writer out = new PrintWriter(f); @Override public String toString() {   ... };
  • 9. (c) kevin rutherford 2012 connascence of meaning Two components must agree on the interpretation of a value String getSSN() {   if (ssnIsMissing) {     return "999­99­9999";   } else {     return blah_blah_blah;   } } ssn = getSSN(); if (ssn.equals("999­99­9999")) {   // handle missing ssn } switch (message.getType()) { case 1:   return message.sendToAll(); case 2:   return message.cancel(); default:   return null; }
  • 10. (c) kevin rutherford 2012 connascence of meaning Two components must agree on the interpretation of a value String getSSN() {   if (ssnIsMissing) {     return "999­99­9999";   } else {     return blah_blah_blah;   } } ssn = getSSN(); if (ssn.equals("999­99­9999")) {   // handle missing ssn } switch (message.getType()) { case 1:   return message.sendToAll(); case 2:   return message.cancel(); default:   return null; }
  • 11. (c) kevin rutherford 2012 connascence of algorithm Two components must agree on a particular algorithm @Test public void testFingerprint() {   String actual = myObj.getFingerprint();   String expected = DigestUtils.md5Hex(myObj.name);   assertEquals(expected, actual); }
  • 12. (c) kevin rutherford 2012 connascence of position Two components must be adjacent or occur in a particular order String names[] = { "Jim", "Helen", "Jenny" }; ... System.out.println("Father: " + names[0]); System.out.println("Mother: " + names[1]); System.out.println("Child:  " + names[2]); Rectangle rect = new Rectangle(23.0, 15.5);
  • 13. (c) kevin rutherford 2012 connascence of execution order The order of execution of two components is important Email email = new Email(); email.setSender(“joe.bloggs”); //. . . email.deliver();
  • 14. (c) kevin rutherford 2012 connascence of timing Two components must agree on the timing of execution timeout = 200; // Milliseconds socket.writeRequest(data); answer = socket.readResponse(timeout);
  • 15. (c) kevin rutherford 2012 connascence of value The values of two components are related class CircularBuffer {     private int myHead;     private int myTail;     // myHead == myTail    =>  buffer empty     // myHead+1 == myTail  =>  buffer full }
  • 16. (c) kevin rutherford 2012 connascence of identity Two components must reference the same object class Producer implements Runnable {   public static Queue myQueue;   public void run() {     myQueue.put(37);   } } class Consumer implements Runnable {   public void run() {     int item = Producer.myQueue.get();     processItem(item);   } }
  • 17. (c) kevin rutherford 2012 connascence of identity Two components must reference the same object class Producer implements Runnable {   public static Queue myQueue;   public void run() {     myQueue.put(37);   } } class Consumer implements Runnable {   public void run() {     int item = Producer.myQueue.get();     processItem(item);   } } also connascence of timing ...and connascence of type
  • 18. (c) kevin rutherford 2012 connascence Connascence of Name Connascence of Type Connascence of Meaning Connascence of Algorithm Connascence of Position Connascence of Execution order Connascence of Timing Connascence of Value Connascence of Identity refactoring should take the code in this direction static code properties properties of running code
  • 19. (c) kevin rutherford 2012 connascence Two software components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system. What Every Programmer Should Know About Object Oriented Design, Meilir Page-Jones, Dorset House Publishing, 1996 Fundamentals of Object-Oriented Design in UML, Meilir Page-Jones, Addison-Wesley, 1999
  • 20. (c) kevin rutherford 2012 connascence Two software components are connascent if a change in one would require the other to be modified in order to maintain the overall correctness of the system. http://onestepback.org/articles/connascence/index.html Jim Weirich Connascence as a software design metric http://blog.rubybestpractices.com/posts/gregory/056-issue-24-connascence.html Gregory Brown Grand unified theory of software design, http://vimeo.com/10837903 Jim Weirich