SlideShare uma empresa Scribd logo
1 de 82
Baixar para ler offline
Sand Piles
                 and
              Software

Zach Dennis
Part I
Bak-Tang-Wiesenfeld




Sand Pile Model
macro
 from the
    micro
What eventually
happens if you keep
 dropping grains of
       sand?
It
     la
       nd
        sl
       id
          e
              s.
Systems can only sustain
    so much stress.
self-organized criticality
 A property of a system that has a critical
      state (point) as an attractor.
Complexity




                                  critical point




                 Functionality

Software is attracted to its critical point.
software is not linear




       X
Complexity




                                  critical point




                 Functionality

Software is attracted to its critical point.
software is non-linear
Software feeds back into itself
           Sx = ... (Sx - 1)
0.2 compared to 0.2000000001
Complexity




                             critical point




             Functionality
What we don’t want.
Balanced and Distributed
Sand Piles and Sand Boxes
Complexity




                                       critical point




             The Vicious Stop n Go.
                       Functionality

               Vicious Stop / Go Cycle
Complexity




                                         critical point




             The Vicious Stop n Go.
                       Functionality

                More effort initially.
small app                large app
Complexity




                                          critical point




             The Vicious Stop n Go.
                          Functionality

             Smaller apps get away with it.
Performance =   Complexity(Process)   * Team * Tools
bad processes amplify complexity

   good processes dampen it
How do we
keep software
away from its
critical point?
Part II
Optimized
decision making
   pathways
def solve_problem(problem, knowledge)
 if quick_fix(problem).possible?
   quick_fix.go!
 else
   solve_problem problem, learn(problem)
 end
end
Problem                               Good
                  None       Little                  A lot
Understanding                          Amount




                Random                Intentional   Nailed it
  Solution                 Quick fix
                Attempts
If you do ______________ today,
you’ll likely do ___________ tomorrow.


If you don’t do ______________ today,
you’ll likely won’t do ___________ tomorrow.
Our brains don’t compute probabilities
and then choose the best possible outcome
           when it can avoid it.
Dependencies

                                                  Cheeps
                                                   Data
                                                 Structure



File System



                                                      Person   Subscription
                   DailyCheeper
                     #cheep!




Mobile Push
 Library      - know about where and how to load cheeps
              data
              - know about how person is related to - know
              about subscriptions
              - know about time zone conversion
              - know about about to use mobile push library
              - localizations???
Dependencies after balancing responsibilities




                                                 Person                   Subscription


                       DailyCheeper
                         #cheep!                - knows how to determine eligibility based
                                                on subscription



               - knows how to use cheeps data
 Mobile Push   - knows how to use Person         Cheeps                    File System
  Library      interface to find eligible
               subscribers

               - knows how to use mobile push     - message_for_day
               library                            - localization for accessing cheeps
Let’s improve our decision pathways
Domain complexity

Conceptual complexity

Code complexity
Properties and concepts
for practical application

Cohesion             Exposing Crisp Abstractions /         Responsibility /
Coupling               Concepts                            Dependencies /
Connassence          Testability                           Collaborators /
Entanglement                                                 Boundaries


        Naming, Concepts                     Composition
        Shared Understanding                 Inheritance
        Pattern Language                     Mixins


                               Reflection
Cohesion
 the focus of an individual software component
      given its function or purpose to exist


 Array#push    Cheeper#delivery_daily    Cheeps#load
 Array#pop     Cheeper#delivery_weekly   Cheeps#add
 Array#[]      Cheeper#deliver_monthly   Cheeps#save
 Array#count                             Cheeps#remove
 Array#<<
Not very cohesive
Separating out concepts
Coupling
 The relationship between software components, the
extent to which a component of our software depends
                on other components.
                               Cheeps
                                Data
                              Structure
File System



                                          Person   Subscription
               DailyCheeper
                 #cheep!




Mobile Push
 Library
Connassence
 a single measure combining coupling and cohesion,
measured in terms of strength or weakness (preferred)
 weaker      Name
              Type
            Meaning
            Position           http://en.wikipedia.org/wiki/
                            Connascent_software_components
            Algorithm
            Execution           http://vimeo.com/10837903
              Timing
                        http://onestepback.org/articles/connascence/
             Identity                    index.html
 stronger
Being explicit
  Making concepts and abstractions in your application
    (technical or domain related) first-class citizens.
Extracting a Concept
w/a distinct responsibility
Explicit abstractions




https://github.com/raganwald/homoiconic/blob/master/
              2009-10-08/metalinguistic.md
Rake
       ActiveModel::Validations
       ActiveRecord::Relation
ActionController filters (orthogonality)
           Whenever (gem)
              Capybara
Directed Acyclic Graph




http://en.wikipedia.org/wiki/Directed_acyclic_graph
Testability
Testable components are typically simpler components.
Testability
       - simpler objects

       - simpler interfaces

       - lower number of unnecessary dependencies

       - push external system interaction to the edge,
       isolate when possible

       - remove unnecessary conditionals when
       possible

       - promotes simpler code and more distributed,
       balanced set of responsibilities

       - stub less, mock less, spy only when necessary
Testability
Responsibility / Dependencies /
Collaborators / Boundaries

   - Write a statement describing the responsibility a class or
   module. If there are a bunch of ANDs consider it
   suspicious.

   - Identify “what” your object needs to fulfill that
   responsibility

   - Identify your collaborators to meet those needs

   - Identify boundaries for primary dependencies and
   everything else
Good statement:
#
# The DailyCheeper is responsible for sending mobile notifications via SMS
# to people have subscribed to them.
#




Suspicious statement:
#
# The DailyCheeper is responsible for sending mobile notifications via SMS
# to people have subscribed to them, building reports around cheeps statistics,
# subscribing users to cheeps, and updating/saving cheeps.
#
Dependencies list:
     - find people who are eligible and have subscribed to
     receiving cheeps for given time

     - take into account timezones

     - find out if locales/translations are necessary

     - get/retrieve access to today’s cheep to send

     - mobile library for sending out cheeps
       - access to device_id (can get off from person)
Identify collaborators                                       Load
                                                         Cheeps from
                                                          FileSystem

                                                Cheeps




         Mobile Push             DailyCheeper
          Library




                                                Person




                                                         Subscription
       Primary collaborators
       Secondary collaborators
Identify boundaries                                    Load
                                                   Cheeps from
                                                    FileSystem

                                          Cheeps




        Mobile Push        DailyCheeper
         Library




                                          Person




                                                   Subscription

      Unit testing scope
Identify boundaries                                    Load
                                                   Cheeps from
                                                    FileSystem

                                          Cheeps




        Mobile Push        DailyCheeper
         Library




                                          Person




                                                   Subscription

      Unit testing scope
Naming, Concepts

- Semantic                      CustomersController#create

- Appropriate for level of
abstraction                          Customer#create

- Classes, modules, methods,    ConnectionPool#connection
variables

- Avoid redundancy, ambiguity    MySQLAdapter#insert_sql
Shared Understanding /
Pattern Languages



- Make conventions and patterns an explicit part of your
vocabulary

- Make them up, or re-use useful patterns, etc you’ve found

- Evaluate, share, teach, learn
A few we use:
 - Ruby module pattern for inheritance (for chaining behavior in
 a loosely coupled way, ie: ActiveRecord uses this pattern a lot when for
 #save)

 - Constructor injection (for providing defaults but allowing object to
 be more easily testable)

 - Boundaries (for creating a clear distinction between one part of the
 application and another, ie: Api, Kernel, and Border)

 - Splatting/flattening conditionals (to indicate a conditional,
 branch of code, should not exist, investigate ways to remove it)

 - Everything’s private until it’s public

 - No class variables (they should be banished)
Ruby module pattern example
Boundaries example (API/Library)



 Intuit::Api       Intuit::Kernel          Intuit::Border
 Customer           Customer                 Customer
 Employee           Employee                 Employee
 Vendor             Vendor                   Vendor
 Configuration       QueryDSL                 Connection
 ...                ...                      QBQL
                                             ...

                   Mapping, additional
  Public API for                           Barebones Intuit Definitions
                   functionality, Intuit
   Consumers
                          fixes
Boundaries example (Web App, generic)


  Application                Domain
   Delivery




                                              ORM
                  Domain
                  Services

    Application
     Services
                                      Infrastructure
Request comes in to find an Order


  Application                Domain
   Delivery




                                              ORM
                  Domain
                  Services

    Application
     Services
                                      Infrastructure
Request comes into to process batch of
orders

  Application                 Domain
   Delivery




                                               ORM
                  Domain
                  Services

    Application
     Services
                                       Infrastructure
Request comes into to process batch of orders,
then notifies customer who placed order.

  Application                 Domain
   Delivery




                                               ORM
                  Domain
                  Services

    Application
     Services
                                       Infrastructure
Classes, Mixins, Inheritance, and
Composition


 - Classes are great for representing entities and things which
 have instances (Well-Grounded Rubyist)

 - Mixins are great for characteristics or properties of entities,
 cross-cutting concerns, explicit grouping of functionality

 - Composition is a often under-used. You create a new class/
 object and pass in an existing one as a collaborator/dependency.
Composition



- full control over your object and API

- reduces the ripple effects of change if the API of the
object you’re composing changes

- removes dependencies on parent objects you may or
may not own

- simplifies testing because you own it and its
dependencies
Reflection


 - Give yourself time to reflect

 - Personal growth

 - Make mid-course corrections

 - Keep complexity down

 - if you’re only focused on add, add, add, then you don’t give
 yourself time to do that
Values over
P r a c t i c e s
If you actively seek
ways to exploit your
values, practices will
    come naturally.
<insert here>


good      bad
Practices change more often
than values.
Complexity




                                         critical point




             The Vicious Stop n Go.
                       Functionality

                More effort initially.
May the landscape of your
software be smooth rolling hills.

 twitter: @zachdennis
 github: zdennis
 mutuallyhuman.com
                        Sand Piles & Software
                        Article
                        in April PragPub

Mais conteúdo relacionado

Destaque

Final Capstone Report A14-159 Frans Georges
Final Capstone Report A14-159 Frans GeorgesFinal Capstone Report A14-159 Frans Georges
Final Capstone Report A14-159 Frans GeorgesFrans Georges
 
SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...
SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...
SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...IAEME Publication
 
Soils properties and foundations
Soils properties and foundations Soils properties and foundations
Soils properties and foundations ARUN KUMAR
 
Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)
Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)
Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)Abhay Kumar
 
Lateral earthpressures by sivakugan
Lateral earthpressures by sivakuganLateral earthpressures by sivakugan
Lateral earthpressures by sivakuganAndre Az
 
Pile capacity equations
Pile capacity equationsPile capacity equations
Pile capacity equationsPrionath Roy
 
Pile Foundation
Pile Foundation Pile Foundation
Pile Foundation Waqas Aslam
 
Pile Foundation for advanced construction equipments
Pile Foundation for advanced construction equipmentsPile Foundation for advanced construction equipments
Pile Foundation for advanced construction equipmentsNagma Modi
 
Behavior of laterally loaded piles in cohesive soils
Behavior of laterally loaded piles in cohesive soilsBehavior of laterally loaded piles in cohesive soils
Behavior of laterally loaded piles in cohesive soilseSAT Publishing House
 
types of Foundations with animated sketches
types of Foundations with animated sketchestypes of Foundations with animated sketches
types of Foundations with animated sketchesGiri Babu S V
 
L 16 pilfoundation
L 16 pilfoundationL 16 pilfoundation
L 16 pilfoundationkarna13
 

Destaque (16)

Final Capstone Report A14-159 Frans Georges
Final Capstone Report A14-159 Frans GeorgesFinal Capstone Report A14-159 Frans Georges
Final Capstone Report A14-159 Frans Georges
 
SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...
SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...
SOIL STRUCTURE INTERACTION STUDY ON PLANE BUILDING FRAME SUPPORTED ON PILE GR...
 
Soils properties and foundations
Soils properties and foundations Soils properties and foundations
Soils properties and foundations
 
Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)
Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)
Lateral stability (Complete Soil Mech. Undestanding Pakage: ABHAY)
 
Lateral earthpressures by sivakugan
Lateral earthpressures by sivakuganLateral earthpressures by sivakugan
Lateral earthpressures by sivakugan
 
Pile capacity equations
Pile capacity equationsPile capacity equations
Pile capacity equations
 
Pile foundation
Pile foundationPile foundation
Pile foundation
 
Pile Foundation
Pile Foundation Pile Foundation
Pile Foundation
 
Pile and pile driving equipments
Pile and pile driving equipmentsPile and pile driving equipments
Pile and pile driving equipments
 
Pile Foundation for advanced construction equipments
Pile Foundation for advanced construction equipmentsPile Foundation for advanced construction equipments
Pile Foundation for advanced construction equipments
 
Behavior of laterally loaded piles in cohesive soils
Behavior of laterally loaded piles in cohesive soilsBehavior of laterally loaded piles in cohesive soils
Behavior of laterally loaded piles in cohesive soils
 
Different types of pile
Different types of pile Different types of pile
Different types of pile
 
Foundation
FoundationFoundation
Foundation
 
TYPES OF FOUNDATION(PPT)
TYPES OF FOUNDATION(PPT)TYPES OF FOUNDATION(PPT)
TYPES OF FOUNDATION(PPT)
 
types of Foundations with animated sketches
types of Foundations with animated sketchestypes of Foundations with animated sketches
types of Foundations with animated sketches
 
L 16 pilfoundation
L 16 pilfoundationL 16 pilfoundation
L 16 pilfoundation
 

Semelhante a Software Systems Approaching Critical Points

Moving to Microservices with the Help of Distributed Traces
Moving to Microservices with the Help of Distributed TracesMoving to Microservices with the Help of Distributed Traces
Moving to Microservices with the Help of Distributed TracesKP Kaiser
 
The macro of microservices
The macro of microservicesThe macro of microservices
The macro of microservicesSoftware Guru
 
Dev ops and_infrastructure_immunology_v0.4
Dev ops and_infrastructure_immunology_v0.4Dev ops and_infrastructure_immunology_v0.4
Dev ops and_infrastructure_immunology_v0.4Julie Tsai
 
The Impact of Emerging Technology on Digital Transformation
The Impact of Emerging Technology on Digital TransformationThe Impact of Emerging Technology on Digital Transformation
The Impact of Emerging Technology on Digital TransformationRichard Esplin
 
20111104 s4 overview
20111104 s4 overview20111104 s4 overview
20111104 s4 overviewLeo Neumeyer
 
One Does Not Simply Walk Into Devops
One Does Not Simply Walk Into Devops One Does Not Simply Walk Into Devops
One Does Not Simply Walk Into Devops Uri Cohen
 
Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE Rundeck
 
All Day DevOps 2017 - There is No Root Cause
All Day DevOps 2017 - There is No Root CauseAll Day DevOps 2017 - There is No Root Cause
All Day DevOps 2017 - There is No Root CauseMatthew Boeckman
 
Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE Rundeck
 
CYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGY
CYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGYCYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGY
CYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGYjmical
 
High time to add machine learning to your information security stack
High time to add machine learning to your information security stackHigh time to add machine learning to your information security stack
High time to add machine learning to your information security stackMinhaz A V
 
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...Stephan Chenette
 
DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...
DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...
DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...Daniel Bryant
 
Talk at the Boston Cloud Foundry Meetup June 2015
Talk at the Boston Cloud Foundry Meetup June 2015Talk at the Boston Cloud Foundry Meetup June 2015
Talk at the Boston Cloud Foundry Meetup June 2015Chip Childers
 
Apachecon Euro 2012: Elastic, Multi-tenant Hadoop on Demand
Apachecon Euro 2012: Elastic, Multi-tenant Hadoop on DemandApachecon Euro 2012: Elastic, Multi-tenant Hadoop on Demand
Apachecon Euro 2012: Elastic, Multi-tenant Hadoop on DemandRichard McDougall
 
Dynamo Systems - QCon SF 2012 Presentation
Dynamo Systems - QCon SF 2012 PresentationDynamo Systems - QCon SF 2012 Presentation
Dynamo Systems - QCon SF 2012 PresentationShanley Kane
 
Bodleian Library's DAMS system
Bodleian Library's DAMS systemBodleian Library's DAMS system
Bodleian Library's DAMS systembenosteen
 

Semelhante a Software Systems Approaching Critical Points (20)

Moving to Microservices with the Help of Distributed Traces
Moving to Microservices with the Help of Distributed TracesMoving to Microservices with the Help of Distributed Traces
Moving to Microservices with the Help of Distributed Traces
 
The macro of microservices
The macro of microservicesThe macro of microservices
The macro of microservices
 
Dev ops and_infrastructure_immunology_v0.4
Dev ops and_infrastructure_immunology_v0.4Dev ops and_infrastructure_immunology_v0.4
Dev ops and_infrastructure_immunology_v0.4
 
The Impact of Emerging Technology on Digital Transformation
The Impact of Emerging Technology on Digital TransformationThe Impact of Emerging Technology on Digital Transformation
The Impact of Emerging Technology on Digital Transformation
 
20111104 s4 overview
20111104 s4 overview20111104 s4 overview
20111104 s4 overview
 
One Does Not Simply Walk Into Devops
One Does Not Simply Walk Into Devops One Does Not Simply Walk Into Devops
One Does Not Simply Walk Into Devops
 
Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE
 
Introduction to Pig
Introduction to PigIntroduction to Pig
Introduction to Pig
 
All Day DevOps 2017 - There is No Root Cause
All Day DevOps 2017 - There is No Root CauseAll Day DevOps 2017 - There is No Root Cause
All Day DevOps 2017 - There is No Root Cause
 
Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE Incident Management in the Age of DevOps and SRE
Incident Management in the Age of DevOps and SRE
 
What DevOps Isn't
What DevOps Isn'tWhat DevOps Isn't
What DevOps Isn't
 
CYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGY
CYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGYCYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGY
CYBER INTELLIGENCE &amp; RESPONSE TECHNOLOGY
 
High time to add machine learning to your information security stack
High time to add machine learning to your information security stackHigh time to add machine learning to your information security stack
High time to add machine learning to your information security stack
 
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
Detecting Web Browser Heap Corruption Attacks - Stephan Chenette, Moti Joseph...
 
DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...
DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...
DevoxxUK 2016: "DevOps: Microservices, containers, platforms, tooling... Oh y...
 
Talk at the Boston Cloud Foundry Meetup June 2015
Talk at the Boston Cloud Foundry Meetup June 2015Talk at the Boston Cloud Foundry Meetup June 2015
Talk at the Boston Cloud Foundry Meetup June 2015
 
Apachecon Euro 2012: Elastic, Multi-tenant Hadoop on Demand
Apachecon Euro 2012: Elastic, Multi-tenant Hadoop on DemandApachecon Euro 2012: Elastic, Multi-tenant Hadoop on Demand
Apachecon Euro 2012: Elastic, Multi-tenant Hadoop on Demand
 
Deep Neural Networks (DNN)
Deep Neural Networks (DNN)Deep Neural Networks (DNN)
Deep Neural Networks (DNN)
 
Dynamo Systems - QCon SF 2012 Presentation
Dynamo Systems - QCon SF 2012 PresentationDynamo Systems - QCon SF 2012 Presentation
Dynamo Systems - QCon SF 2012 Presentation
 
Bodleian Library's DAMS system
Bodleian Library's DAMS systemBodleian Library's DAMS system
Bodleian Library's DAMS system
 

Mais de Zach Dennis

A Brief, Very Very Brief Intro to Systems Thinking
A Brief, Very Very Brief Intro to Systems ThinkingA Brief, Very Very Brief Intro to Systems Thinking
A Brief, Very Very Brief Intro to Systems ThinkingZach Dennis
 
BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth Zach Dennis
 
Discovering patterns
Discovering patternsDiscovering patterns
Discovering patternsZach Dennis
 
JavaScript Code Organizations, Patterns Slides - Zach Dennis
JavaScript Code Organizations, Patterns Slides - Zach DennisJavaScript Code Organizations, Patterns Slides - Zach Dennis
JavaScript Code Organizations, Patterns Slides - Zach DennisZach Dennis
 
Balancing the Pendulum: Reflecting on BDD in Practice
Balancing the Pendulum: Reflecting on BDD in PracticeBalancing the Pendulum: Reflecting on BDD in Practice
Balancing the Pendulum: Reflecting on BDD in PracticeZach Dennis
 

Mais de Zach Dennis (6)

A Brief, Very Very Brief Intro to Systems Thinking
A Brief, Very Very Brief Intro to Systems ThinkingA Brief, Very Very Brief Intro to Systems Thinking
A Brief, Very Very Brief Intro to Systems Thinking
 
BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth BTLE (Bluetooth Low Energy) and CoreBluetooth
BTLE (Bluetooth Low Energy) and CoreBluetooth
 
Discovering patterns
Discovering patternsDiscovering patterns
Discovering patterns
 
SSH
SSHSSH
SSH
 
JavaScript Code Organizations, Patterns Slides - Zach Dennis
JavaScript Code Organizations, Patterns Slides - Zach DennisJavaScript Code Organizations, Patterns Slides - Zach Dennis
JavaScript Code Organizations, Patterns Slides - Zach Dennis
 
Balancing the Pendulum: Reflecting on BDD in Practice
Balancing the Pendulum: Reflecting on BDD in PracticeBalancing the Pendulum: Reflecting on BDD in Practice
Balancing the Pendulum: Reflecting on BDD in Practice
 

Último

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Software Systems Approaching Critical Points

  • 1. Sand Piles and Software Zach Dennis
  • 2.
  • 6.
  • 7. What eventually happens if you keep dropping grains of sand?
  • 8. It la nd sl id e s.
  • 9. Systems can only sustain so much stress.
  • 10. self-organized criticality A property of a system that has a critical state (point) as an attractor.
  • 11. Complexity critical point Functionality Software is attracted to its critical point.
  • 12. software is not linear X
  • 13. Complexity critical point Functionality Software is attracted to its critical point.
  • 15. Software feeds back into itself Sx = ... (Sx - 1)
  • 16. 0.2 compared to 0.2000000001
  • 17. Complexity critical point Functionality
  • 20. Sand Piles and Sand Boxes
  • 21. Complexity critical point The Vicious Stop n Go. Functionality Vicious Stop / Go Cycle
  • 22. Complexity critical point The Vicious Stop n Go. Functionality More effort initially.
  • 23. small app large app Complexity critical point The Vicious Stop n Go. Functionality Smaller apps get away with it.
  • 24. Performance = Complexity(Process) * Team * Tools
  • 25. bad processes amplify complexity good processes dampen it
  • 26. How do we keep software away from its critical point?
  • 29. def solve_problem(problem, knowledge) if quick_fix(problem).possible? quick_fix.go! else solve_problem problem, learn(problem) end end
  • 30. Problem Good None Little A lot Understanding Amount Random Intentional Nailed it Solution Quick fix Attempts
  • 31. If you do ______________ today, you’ll likely do ___________ tomorrow. If you don’t do ______________ today, you’ll likely won’t do ___________ tomorrow.
  • 32. Our brains don’t compute probabilities and then choose the best possible outcome when it can avoid it.
  • 33.
  • 34.
  • 35.
  • 36. Dependencies Cheeps Data Structure File System Person Subscription DailyCheeper #cheep! Mobile Push Library - know about where and how to load cheeps data - know about how person is related to - know about subscriptions - know about time zone conversion - know about about to use mobile push library - localizations???
  • 37.
  • 38. Dependencies after balancing responsibilities Person Subscription DailyCheeper #cheep! - knows how to determine eligibility based on subscription - knows how to use cheeps data Mobile Push - knows how to use Person Cheeps File System Library interface to find eligible subscribers - knows how to use mobile push - message_for_day library - localization for accessing cheeps
  • 39. Let’s improve our decision pathways
  • 41. Properties and concepts for practical application Cohesion Exposing Crisp Abstractions / Responsibility / Coupling Concepts Dependencies / Connassence Testability Collaborators / Entanglement Boundaries Naming, Concepts Composition Shared Understanding Inheritance Pattern Language Mixins Reflection
  • 42. Cohesion the focus of an individual software component given its function or purpose to exist Array#push Cheeper#delivery_daily Cheeps#load Array#pop Cheeper#delivery_weekly Cheeps#add Array#[] Cheeper#deliver_monthly Cheeps#save Array#count Cheeps#remove Array#<<
  • 45. Coupling The relationship between software components, the extent to which a component of our software depends on other components. Cheeps Data Structure File System Person Subscription DailyCheeper #cheep! Mobile Push Library
  • 46.
  • 47.
  • 48. Connassence a single measure combining coupling and cohesion, measured in terms of strength or weakness (preferred) weaker Name Type Meaning Position http://en.wikipedia.org/wiki/ Connascent_software_components Algorithm Execution http://vimeo.com/10837903 Timing http://onestepback.org/articles/connascence/ Identity index.html stronger
  • 49.
  • 50. Being explicit Making concepts and abstractions in your application (technical or domain related) first-class citizens.
  • 51. Extracting a Concept w/a distinct responsibility
  • 52.
  • 54. Rake ActiveModel::Validations ActiveRecord::Relation ActionController filters (orthogonality) Whenever (gem) Capybara
  • 56. Testability Testable components are typically simpler components.
  • 57. Testability - simpler objects - simpler interfaces - lower number of unnecessary dependencies - push external system interaction to the edge, isolate when possible - remove unnecessary conditionals when possible - promotes simpler code and more distributed, balanced set of responsibilities - stub less, mock less, spy only when necessary
  • 59. Responsibility / Dependencies / Collaborators / Boundaries - Write a statement describing the responsibility a class or module. If there are a bunch of ANDs consider it suspicious. - Identify “what” your object needs to fulfill that responsibility - Identify your collaborators to meet those needs - Identify boundaries for primary dependencies and everything else
  • 60. Good statement: # # The DailyCheeper is responsible for sending mobile notifications via SMS # to people have subscribed to them. # Suspicious statement: # # The DailyCheeper is responsible for sending mobile notifications via SMS # to people have subscribed to them, building reports around cheeps statistics, # subscribing users to cheeps, and updating/saving cheeps. #
  • 61. Dependencies list: - find people who are eligible and have subscribed to receiving cheeps for given time - take into account timezones - find out if locales/translations are necessary - get/retrieve access to today’s cheep to send - mobile library for sending out cheeps - access to device_id (can get off from person)
  • 62. Identify collaborators Load Cheeps from FileSystem Cheeps Mobile Push DailyCheeper Library Person Subscription Primary collaborators Secondary collaborators
  • 63. Identify boundaries Load Cheeps from FileSystem Cheeps Mobile Push DailyCheeper Library Person Subscription Unit testing scope
  • 64. Identify boundaries Load Cheeps from FileSystem Cheeps Mobile Push DailyCheeper Library Person Subscription Unit testing scope
  • 65. Naming, Concepts - Semantic CustomersController#create - Appropriate for level of abstraction Customer#create - Classes, modules, methods, ConnectionPool#connection variables - Avoid redundancy, ambiguity MySQLAdapter#insert_sql
  • 66. Shared Understanding / Pattern Languages - Make conventions and patterns an explicit part of your vocabulary - Make them up, or re-use useful patterns, etc you’ve found - Evaluate, share, teach, learn
  • 67. A few we use: - Ruby module pattern for inheritance (for chaining behavior in a loosely coupled way, ie: ActiveRecord uses this pattern a lot when for #save) - Constructor injection (for providing defaults but allowing object to be more easily testable) - Boundaries (for creating a clear distinction between one part of the application and another, ie: Api, Kernel, and Border) - Splatting/flattening conditionals (to indicate a conditional, branch of code, should not exist, investigate ways to remove it) - Everything’s private until it’s public - No class variables (they should be banished)
  • 69. Boundaries example (API/Library) Intuit::Api Intuit::Kernel Intuit::Border Customer Customer Customer Employee Employee Employee Vendor Vendor Vendor Configuration QueryDSL Connection ... ... QBQL ... Mapping, additional Public API for Barebones Intuit Definitions functionality, Intuit Consumers fixes
  • 70. Boundaries example (Web App, generic) Application Domain Delivery ORM Domain Services Application Services Infrastructure
  • 71. Request comes in to find an Order Application Domain Delivery ORM Domain Services Application Services Infrastructure
  • 72. Request comes into to process batch of orders Application Domain Delivery ORM Domain Services Application Services Infrastructure
  • 73. Request comes into to process batch of orders, then notifies customer who placed order. Application Domain Delivery ORM Domain Services Application Services Infrastructure
  • 74. Classes, Mixins, Inheritance, and Composition - Classes are great for representing entities and things which have instances (Well-Grounded Rubyist) - Mixins are great for characteristics or properties of entities, cross-cutting concerns, explicit grouping of functionality - Composition is a often under-used. You create a new class/ object and pass in an existing one as a collaborator/dependency.
  • 75. Composition - full control over your object and API - reduces the ripple effects of change if the API of the object you’re composing changes - removes dependencies on parent objects you may or may not own - simplifies testing because you own it and its dependencies
  • 76. Reflection - Give yourself time to reflect - Personal growth - Make mid-course corrections - Keep complexity down - if you’re only focused on add, add, add, then you don’t give yourself time to do that
  • 77. Values over P r a c t i c e s
  • 78. If you actively seek ways to exploit your values, practices will come naturally.
  • 80. Practices change more often than values.
  • 81. Complexity critical point The Vicious Stop n Go. Functionality More effort initially.
  • 82. May the landscape of your software be smooth rolling hills. twitter: @zachdennis github: zdennis mutuallyhuman.com Sand Piles & Software Article in April PragPub