COMPLEXITY
   THEORY                   SOFTWARE
                             DEVELOPMENT
                     and




                                       @tlberglund
Wednesday, October 17, 12                            1
Agents
                                         Landscapes
       Emergence


                            Complexity

                                        Criticality
                    Connectedness

Wednesday, October 17, 12                             2
Agents

Wednesday, October 17, 12            3
Agents are...



                  Simple
                   Interactive
                        Adaptive
Wednesday, October 17, 12          4
Why Does

                            TRAFFIC
                                       Jam?
Wednesday, October 17, 12                     5
Stuck
                                in           TRAFFIC
                                                                 Talking on cell
                                                                phone, not paying
                                                                   attention...




                                                 I sure am in
                                all this
                                                   a hurry!
                              space! I'm'a
                               speed up.




Wednesday, October 17, 12                                                           6
Stuck
                                 TRAFFIC
                                in
                                      maniAc!




                                     Oh, my
                                      bad.




                                     @%$#%!




Wednesday, October 17, 12                       7
Net
                                                  LOGO
                            http://ccl.northwestern.edu/netlogo/




Wednesday, October 17, 12                                          8
Net
                                  LOGO


Wednesday, October 17, 12                9
Net
                                                            LOGO
         Flocking
                            Alignment: a bird tends to move in the same
                            direction of nearby birds.

                            Separation: a bird will turn to avoid another bird
                            if they get too close.

                            Cohesion: a bird will tend to move towards other
                            nearby birds.


Wednesday, October 17, 12                                                        10
Net
                                  LOGO


Wednesday, October 17, 12                11
Agents
                                         Landscapes
       Emergence


                            Complexity

                                        Criticality
                    Connectedness

Wednesday, October 17, 12                             12
Landscapes

Wednesday, October 17, 12           13
Think of a


                       Problem
                            as a




            SURFACE
Wednesday, October 17, 12          14
MT. FUJI



Wednesday, October 17, 12    15
Frederick
                                 Winslow
                            TAYLOR


Wednesday, October 17, 12               16
RUGGED
                            LANDSCAPES




Wednesday, October 17, 12                17
Dancing
                            LANDSCAPES


Wednesday, October 17, 12                18
Agents
                                         Landscapes
       Emergence


                            Complexity

                                        Criticality
                    Connectedness

Wednesday, October 17, 12                             19
Criticality

Wednesday, October 17, 12                 20
the           Normal
         DISTRIBUTION



Wednesday, October 17, 12        21
the          Power Law
         DISTRIBUTION



Wednesday, October 17, 12          22
Wednesday, October 17, 12
                            Rice   PILES   23
Work
                             LOAD


Wednesday, October 17, 12           24
Work
                             LOAD


Wednesday, October 17, 12           25
Work
                             LOAD


Wednesday, October 17, 12           26
Work
                             LOAD


Wednesday, October 17, 12           27
Work
                             LOAD


Wednesday, October 17, 12           28
Work
                             LOAD


Wednesday, October 17, 12           29
Work
                             LOAD


Wednesday, October 17, 12           30
Work
                             LOAD


Wednesday, October 17, 12           31
Work
                             LOAD


Wednesday, October 17, 12           32
Work
                             LOAD


Wednesday, October 17, 12           33
Too much


                    Utilization        leads to


   CRITICALITY
Wednesday, October 17, 12                         34
Agents
                                         Landscapes
       Emergence


                            Complexity

                                        Criticality
                    Connectedness

Wednesday, October 17, 12                             35
Connectedness

Wednesday, October 17, 12   36
A really basic refresher in



                            Graph
        THEORY              Seriously...BASIC.

Wednesday, October 17, 12                        37
Degree 5

                                       Degree 1




                            Degree 4


Wednesday, October 17, 12                         38
To here


   From here



                    Path Length=   3
Wednesday, October 17, 12                    39
Network
        FUNCTIONALITY

Wednesday, October 17, 12   40
Information
           DIFFUSION        depends on Path Length



Wednesday, October 17, 12                            41
Robustness                                  to




       FAILURE              depends on degree distribution


Wednesday, October 17, 12                                    42
Agents
                                         Landscapes
       Emergence


                            Complexity

                                        Criticality
                    Connectedness

Wednesday, October 17, 12                             43
Emergence

Wednesday, October 17, 12         44
Slime

Wednesday, October 17, 12
                            MOLD     45
Slime Mold Emergence



Wednesday, October 17, 12               46
Conway’s

                      Game
                            of




Wednesday, October 17, 12
                            LIFE   47
Gameof
                             Conway’s
                                                       LIFE
                     1. Any live cell with fewer than two live neighbours
                        dies.

                     2. Any live cell with more than three live neighbours
                        dies.

                     3. Any live cell with two or three live neighbors lives.

                     4. Any dead cell with exactly three live neighbors
                        comes to life.



Wednesday, October 17, 12                                                       48
Wednesday, October 17, 12   49
Wednesday, October 17, 12   50
Wednesday, October 17, 12   51
Surprise!
                            it’s a
                                     COMPUTER


Wednesday, October 17, 12                       52
Von Neumann
                    ARCHITECTURE



Wednesday, October 17, 12          53
Wednesday, October 17, 12   54
Wednesday, October 17, 12   55
Ant
                  COLONIES
Wednesday, October 17, 12         56
Wednesday, October 17, 12   57
Proceed with


          CAUTION
Wednesday, October 17, 12                  58
Software               as a

                            COMPLEX
                             Profession
Wednesday, October 17, 12                 59
AGENT-
                             BASED
                              DECISION
                                MAKING


Wednesday, October 17, 12            60
Wednesday, October 17, 12   61
What kind of


     Software
      Architecture          would look like an



                              ANT
Wednesday, October 17, 12
                               COLONY?           62
Wednesday, October 17, 12   63
Wednesday, October 17, 12   64
Hypertext                          as the


     Engine
                                of



       APPLICATION
            STATE
        http://bit.ly/HATEOAS

Wednesday, October 17, 12                     65
the way
                                        HATEOAS
                                       Works
                                 GET /sandwich
                       Service




                                                 Web Service
Wednesday, October 17, 12                                      66
HATEOAS
                                 the way

                                     Works
                       Service



                                           400 ERROR
                                           <link rel=”bread” />
                                           <link rel=”ingredient” />




                                           Web Service
Wednesday, October 17, 12                                         67
HATEOAS
                                 the way

                                      Works
                                  POST /sandwich
                                  bread=rye
                       Service    meat=pastrami




                                                   Web Service
Wednesday, October 17, 12                                        68
HATEOAS
                                 the way

                                     Works
                       Service
                                           201 OK
                                           <link href=”sandwich”>
                                           <link href=”eat” />
                                           <link href=”side” />




                                               Web Service
Wednesday, October 17, 12                                           69
Make me a
                                                                   Add Toppings
                     Sandwich         I make     Give me a
                                    sandwiches.
                                              sandwich, and I
                                               can decorate it
                                               with toppings.
                                             I exchange
                                            sandwiches
                                        I toast Federal
                                            for
                                       sandwichReserve
                                         buns.Notes.




                                                                 Checkout
                        Toast Bun

Wednesday, October 17, 12                                                         70
REST  done

      RIGHT

Wednesday, October 17, 12   71
Class
                                Are your


                            Dependencies
   like a


        RICE PILE?
Wednesday, October 17, 12                   72
Afferent
          COUPLING
                 A class's afferent coupling is a measure of how many

                 other classes are coupled to it through method calls,

                 field accesses, inheritance, arguments, return

                 types, and exceptions.



Wednesday, October 17, 12                                                73
remember the           Power Law
                            DISTRIBUTION



Wednesday, October 17, 12                  74
grails-web
                            900




                            675




                            450




                            225




                             0

Wednesday, October 17, 12                 75
Hibernate 3
                            1500



                            1125



                            750



                            375



                              0


Wednesday, October 17, 12                 76
Spring 3 Core
                            300



                            225



                            150



                            75



                             0


Wednesday, October 17, 12          77
toward a
                            COMPLEX
           THEORY               of

    SOFTWARE
                    DEVELOPMENT
Wednesday, October 17, 12             78
Agents
                                         Landscapes
       Emergence


                            Complexity

                                        Criticality
                    Connectedness

Wednesday, October 17, 12                             79
Thank You
                             Tim Berglund
                              tlberglund@github.com
                                    @tlberglund




Wednesday, October 17, 12                             80
ACKNOWLEDGMENTS




                            http://bit.ly/unde
                                              rstanding-compl
                                                             exity

Wednesday, October 17, 12                                            81
Photo Credits
     Slime Mold Cells
     http://campus.queens.edu/faculty/jannr/Botany/images/slimies/slimeMolds/slimeMold1152.jpg

     Car Top View
     http://www.motiontrends.com/2006/m09/Volvo/C30.shtml

     Ants
     http://www.flickr.com/photos/binux/2495709841

     Traffic Jam
     http://www.flickr.com/photos/lynac/321100379/

     Turning Machine
     http://www.ecs.syr.edu/faculty/fawcett/handouts/webpages/CoreTechnologies.htm

     VonNeumann Machine
     http://en.wikipedia.org/wiki/File:Von_Neumann_architecture.svg

     Ant Colony
     http://www.bioone.org/doi/full/10.1672/1536-2442%282004%29004%5B0001%3ATNAOTF%5D2.0.CO%3B2

     Mt. Fuji
     http://www.flickr.com/photos/mtsn/229410448

     Snowy Mountains
     http://www.flickr.com/photos/huzhead/85362599

     Portrait of Frederick Winslow Taylor
     http://upload.wikimedia.org/wikipedia/commons/9/90/Frederick_Winslow_Taylor_crop.jpg

     Female Velvet Ant (in Work Load Illustration)
     http://www.flickr.com/photos/markop/1036891509

     Frederick Hayek
     http://www.lancs.ac.uk/staff/ecagrs/Hayek%20quotes.htm



Wednesday, October 17, 12                                                                         82

Complexity theory and software development : Tim Berglund

  • 1.
    COMPLEXITY THEORY SOFTWARE DEVELOPMENT and @tlberglund Wednesday, October 17, 12 1
  • 2.
    Agents Landscapes Emergence Complexity Criticality Connectedness Wednesday, October 17, 12 2
  • 3.
  • 4.
    Agents are... Simple Interactive Adaptive Wednesday, October 17, 12 4
  • 5.
    Why Does TRAFFIC Jam? Wednesday, October 17, 12 5
  • 6.
    Stuck in TRAFFIC Talking on cell phone, not paying attention... I sure am in all this a hurry! space! I'm'a speed up. Wednesday, October 17, 12 6
  • 7.
    Stuck TRAFFIC in maniAc! Oh, my bad. @%$#%! Wednesday, October 17, 12 7
  • 8.
    Net LOGO http://ccl.northwestern.edu/netlogo/ Wednesday, October 17, 12 8
  • 9.
    Net LOGO Wednesday, October 17, 12 9
  • 10.
    Net LOGO Flocking Alignment: a bird tends to move in the same direction of nearby birds. Separation: a bird will turn to avoid another bird if they get too close. Cohesion: a bird will tend to move towards other nearby birds. Wednesday, October 17, 12 10
  • 11.
    Net LOGO Wednesday, October 17, 12 11
  • 12.
    Agents Landscapes Emergence Complexity Criticality Connectedness Wednesday, October 17, 12 12
  • 13.
  • 14.
    Think of a Problem as a SURFACE Wednesday, October 17, 12 14
  • 15.
  • 16.
    Frederick Winslow TAYLOR Wednesday, October 17, 12 16
  • 17.
    RUGGED LANDSCAPES Wednesday, October 17, 12 17
  • 18.
    Dancing LANDSCAPES Wednesday, October 17, 12 18
  • 19.
    Agents Landscapes Emergence Complexity Criticality Connectedness Wednesday, October 17, 12 19
  • 20.
  • 21.
    the Normal DISTRIBUTION Wednesday, October 17, 12 21
  • 22.
    the Power Law DISTRIBUTION Wednesday, October 17, 12 22
  • 23.
    Wednesday, October 17,12 Rice PILES 23
  • 24.
    Work LOAD Wednesday, October 17, 12 24
  • 25.
    Work LOAD Wednesday, October 17, 12 25
  • 26.
    Work LOAD Wednesday, October 17, 12 26
  • 27.
    Work LOAD Wednesday, October 17, 12 27
  • 28.
    Work LOAD Wednesday, October 17, 12 28
  • 29.
    Work LOAD Wednesday, October 17, 12 29
  • 30.
    Work LOAD Wednesday, October 17, 12 30
  • 31.
    Work LOAD Wednesday, October 17, 12 31
  • 32.
    Work LOAD Wednesday, October 17, 12 32
  • 33.
    Work LOAD Wednesday, October 17, 12 33
  • 34.
    Too much Utilization leads to CRITICALITY Wednesday, October 17, 12 34
  • 35.
    Agents Landscapes Emergence Complexity Criticality Connectedness Wednesday, October 17, 12 35
  • 36.
  • 37.
    A really basicrefresher in Graph THEORY Seriously...BASIC. Wednesday, October 17, 12 37
  • 38.
    Degree 5 Degree 1 Degree 4 Wednesday, October 17, 12 38
  • 39.
    To here From here Path Length= 3 Wednesday, October 17, 12 39
  • 40.
    Network FUNCTIONALITY Wednesday, October 17, 12 40
  • 41.
    Information DIFFUSION depends on Path Length Wednesday, October 17, 12 41
  • 42.
    Robustness to FAILURE depends on degree distribution Wednesday, October 17, 12 42
  • 43.
    Agents Landscapes Emergence Complexity Criticality Connectedness Wednesday, October 17, 12 43
  • 44.
  • 45.
  • 46.
  • 47.
    Conway’s Game of Wednesday, October 17, 12 LIFE 47
  • 48.
    Gameof Conway’s LIFE 1. Any live cell with fewer than two live neighbours dies. 2. Any live cell with more than three live neighbours dies. 3. Any live cell with two or three live neighbors lives. 4. Any dead cell with exactly three live neighbors comes to life. Wednesday, October 17, 12 48
  • 49.
  • 50.
  • 51.
  • 52.
    Surprise! it’s a COMPUTER Wednesday, October 17, 12 52
  • 53.
    Von Neumann ARCHITECTURE Wednesday, October 17, 12 53
  • 54.
  • 55.
  • 56.
    Ant COLONIES Wednesday, October 17, 12 56
  • 57.
  • 58.
    Proceed with CAUTION Wednesday, October 17, 12 58
  • 59.
    Software as a COMPLEX Profession Wednesday, October 17, 12 59
  • 60.
    AGENT- BASED DECISION MAKING Wednesday, October 17, 12 60
  • 61.
  • 62.
    What kind of Software Architecture would look like an ANT Wednesday, October 17, 12 COLONY? 62
  • 63.
  • 64.
  • 65.
    Hypertext as the Engine of APPLICATION STATE http://bit.ly/HATEOAS Wednesday, October 17, 12 65
  • 66.
    the way HATEOAS Works GET /sandwich Service Web Service Wednesday, October 17, 12 66
  • 67.
    HATEOAS the way Works Service 400 ERROR <link rel=”bread” /> <link rel=”ingredient” /> Web Service Wednesday, October 17, 12 67
  • 68.
    HATEOAS the way Works POST /sandwich bread=rye Service meat=pastrami Web Service Wednesday, October 17, 12 68
  • 69.
    HATEOAS the way Works Service 201 OK <link href=”sandwich”> <link href=”eat” /> <link href=”side” /> Web Service Wednesday, October 17, 12 69
  • 70.
    Make me a Add Toppings Sandwich I make Give me a sandwiches. sandwich, and I can decorate it with toppings. I exchange sandwiches I toast Federal for sandwichReserve buns.Notes. Checkout Toast Bun Wednesday, October 17, 12 70
  • 71.
    REST done RIGHT Wednesday, October 17, 12 71
  • 72.
    Class Are your Dependencies like a RICE PILE? Wednesday, October 17, 12 72
  • 73.
    Afferent COUPLING A class's afferent coupling is a measure of how many other classes are coupled to it through method calls, field accesses, inheritance, arguments, return types, and exceptions. Wednesday, October 17, 12 73
  • 74.
    remember the Power Law DISTRIBUTION Wednesday, October 17, 12 74
  • 75.
    grails-web 900 675 450 225 0 Wednesday, October 17, 12 75
  • 76.
    Hibernate 3 1500 1125 750 375 0 Wednesday, October 17, 12 76
  • 77.
    Spring 3 Core 300 225 150 75 0 Wednesday, October 17, 12 77
  • 78.
    toward a COMPLEX THEORY of SOFTWARE DEVELOPMENT Wednesday, October 17, 12 78
  • 79.
    Agents Landscapes Emergence Complexity Criticality Connectedness Wednesday, October 17, 12 79
  • 80.
    Thank You Tim Berglund tlberglund@github.com @tlberglund Wednesday, October 17, 12 80
  • 81.
    ACKNOWLEDGMENTS http://bit.ly/unde rstanding-compl exity Wednesday, October 17, 12 81
  • 82.
    Photo Credits Slime Mold Cells http://campus.queens.edu/faculty/jannr/Botany/images/slimies/slimeMolds/slimeMold1152.jpg Car Top View http://www.motiontrends.com/2006/m09/Volvo/C30.shtml Ants http://www.flickr.com/photos/binux/2495709841 Traffic Jam http://www.flickr.com/photos/lynac/321100379/ Turning Machine http://www.ecs.syr.edu/faculty/fawcett/handouts/webpages/CoreTechnologies.htm VonNeumann Machine http://en.wikipedia.org/wiki/File:Von_Neumann_architecture.svg Ant Colony http://www.bioone.org/doi/full/10.1672/1536-2442%282004%29004%5B0001%3ATNAOTF%5D2.0.CO%3B2 Mt. Fuji http://www.flickr.com/photos/mtsn/229410448 Snowy Mountains http://www.flickr.com/photos/huzhead/85362599 Portrait of Frederick Winslow Taylor http://upload.wikimedia.org/wikipedia/commons/9/90/Frederick_Winslow_Taylor_crop.jpg Female Velvet Ant (in Work Load Illustration) http://www.flickr.com/photos/markop/1036891509 Frederick Hayek http://www.lancs.ac.uk/staff/ecagrs/Hayek%20quotes.htm Wednesday, October 17, 12 82