University of St Andrews                                             School of Computer ScienceSoftware Complexity   CS503...
University of St Andrews                                     School of Computer Science            Why complexity?• Softwa...
University of St Andrews                  School of Computer ScienceGreenfield development                            3
University of St Andrews                  School of Computer ScienceReal world: Brownfield                            4
University of St Andrews                                                   School of Computer Science        Enterprise is...
University of St Andrews                                             School of Computer Science          Thoughts on failu...
University of St AndrewsSchool of Computer Science          7
University of St Andrews         School of Computer ScienceLSCITS                   8
University of St Andrews                                                      School of Computer Science                  ...
University of St Andrews                                            School of Computer Science                          IT...
University of St Andrews                                           School of Computer Science                    Complex• ...
University of St Andrews                                            School of Computer Science                  Large Scal...
University of St AndrewsSchool of Computer Science          13
University of St Andrews                        School of Computer Science      Complex & Complicated• are not the same......
University of St Andrews                                             School of Computer Science                 Complicate...
University of St Andrews                                          School of Computer Science Inherently Complex Systems• C...
University of St Andrews                                             School of Computer ScienceInherently Complex Systems ...
University of St Andrews                                             School of Computer Science            Adaptive System...
University of St Andrews                                                     School of Computer Science              Autom...
University of St Andrews              School of Computer ScienceThe Flash Crash                        20
University of St Andrews                                                School of Computer Science              What happe...
University of St Andrews                                                  School of Computer Science           What happen...
University of St Andrews                                                   School of Computer Science                     ...
University of St Andrews                                           School of Computer Science                   Solution?•...
University of St Andrews                                                  School of Computer Science                      ...
University of St Andrews                                                   School of Computer Science                     ...
University of St Andrews                                               School of Computer Science                     Simp...
University of St Andrews                                                   School of Computer Science         Removing com...
University of St Andrews                                               School of Computer Science              Adding peop...
University of St Andrews                                              School of Computer Science         Epistemic Complex...
University of St Andrews                                            School of Computer Science             System observer...
University of St Andrews                                                   School of Computer Science  Recap: Types of Com...
University of St Andrews                                             School of Computer Science                    Combat ...
University of St Andrews                                            School of Computer Science    Understand relationships...
University of St Andrews                                             School of Computer Science                   but real...
University of St Andrews                                             School of Computer Science                   but real...
University of St Andrews                 School of Computer Scienceover to you...                           37
University of St Andrews                                             School of Computer Science                       Cred...
Upcoming SlideShare
Loading in …5
×

Software complexity

1,003 views

Published on

Presentation to MSc class on Software Complexity

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,003
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Software complexity

    1. 1. University of St Andrews School of Computer ScienceSoftware Complexity CS5031 - Advanced Software Engineering 2010/11 James Smith jws7@cs.st-andrews.ac.uk 1
    2. 2. University of St Andrews School of Computer Science Why complexity?• Software Engineers • build systems• Sometimes there are problems...• And graduates are not sensitised to the issues... 2
    3. 3. University of St Andrews School of Computer ScienceGreenfield development 3
    4. 4. University of St Andrews School of Computer ScienceReal world: Brownfield 4
    5. 5. University of St Andrews School of Computer Science Enterprise is changing• Dr Alan Brown (IBM) – “IBM spent most of their time trying to understand legacy systems” – Coding is outsourced • Separated. How do you integrate? – We have 20k contractors but we think we’re getting 3k people’s work. 5
    6. 6. University of St Andrews School of Computer Science Thoughts on failure• The world economy is losing over six trillion USD per year to IT failures and the problem is getting worse.• Software Engineers need to learn to fail - the solution? 6
    7. 7. University of St AndrewsSchool of Computer Science 7
    8. 8. University of St Andrews School of Computer ScienceLSCITS 8
    9. 9. University of St Andrews School of Computer Science LSCITS• Large Scale Complex IT systems • I am part of this group• Led by Prof Dave Cliff (Bristol), Prof Ian Sommerville (St. Andrews) and others• £5m Research proposal• Emerged after Department of Trade and Industry report “Complexity and Emergent Behaviour in ICT Systems” 9
    10. 10. University of St Andrews School of Computer Science ITS• Information Technology Systems• Or ICT? • Communications technology is heavily• So much of our lives is dominated by ICT. We are in fact living in Information Systems.• ITS in LSCITS covers all of this. 10
    11. 11. University of St Andrews School of Computer Science Complex• Complex Adaptive Systems• Dominated by emergent behaviour• Conventionally engineered systems can also be complex • functional and non functional behaviour cannot be predicted• likely when we create systems integrating different parts (of other systems) which are independently developed and managed• impossible to predict how the characteristics of one system will interfere with the characteristics of others 11
    12. 12. University of St Andrews School of Computer Science Large Scale• Not dependent on physical size of spatial dispersion• Rather the number of components or interactions • Birthday Paradox 12
    13. 13. University of St AndrewsSchool of Computer Science 13
    14. 14. University of St Andrews School of Computer Science Complex & Complicated• are not the same... 14
    15. 15. University of St Andrews School of Computer Science Complicated• Difficult for a human to understand• A system which can be understood in theory, but in practice rarely is• May be due to simply the sheer number of components or interactions.• Is this true? - Maybe that there is no difference between a complicated system and a complex one. 15
    16. 16. University of St Andrews School of Computer Science Inherently Complex Systems• Cannot deduce behaviour from examination of their components• Cannot predict the consequences of changes to these systems• Behaviour and properties are non-deterministic 16
    17. 17. University of St Andrews School of Computer ScienceInherently Complex Systems (2)Inherent complexity stems from dynamic, dependentrelationships between parts of the system - relationships evolve in time and according to stimulifrom the system environment - new relationships may be created & existingrelationships may change - deterministic modelling techniques cannot be used tomake predictions about such systems 17
    18. 18. University of St Andrews School of Computer Science Adaptive Systems• Inherent complexity in situations where we have adaptive systems – dynamic dependencies – we cannot have enough knowledge about the system to make accurate predications of its behaviour – at best we can be probabilistic 18
    19. 19. University of St Andrews School of Computer Science Automated Agents• If we have automated agents – i.e. automated traders • thousands of operations per seconds • linked through unit prices • cannot predict behaviour • other factors effect prices • we have no idea how the agents will interact 19
    20. 20. University of St Andrews School of Computer ScienceThe Flash Crash 20
    21. 21. University of St Andrews School of Computer Science What happened?• On the 6th of May 2010 at 2.45pm the Dow Jones Market plundged over 900 points...• Traders were selling the shirt of their backs to cut their losses...• Chaos reigned 21
    22. 22. University of St Andrews School of Computer Science What happened? (2)• Within minutes... it recovered – It was the second largest point swing (1,010.14 points) and the biggest one day decline (998.5) in Dow Jones history• In 5 minutes billions of dollars were wiped of the face of the earth and then found again...• Why? 22
    23. 23. University of St Andrews School of Computer Science Why?• A trader initiated a sell program to sell 75,000 contracts... – an unusually large number at a volatile time in the market• High Frequency Traders (HTF) also started aggressively selling...• No buyers... so they kept selling to each other...• “Hot-potato” effect. – Between 2:45:13 and 2:45:27 HTFs traded 27,000 contracts 49% of the trading traffic 23
    24. 24. University of St Andrews School of Computer Science Solution?• “The rout continued until an automatic stabilizer on the futures exchange cut in and paused trading for five seconds, after which the markets recovered." 24
    25. 25. University of St Andrews School of Computer Science Lessons• When you have a large number of dynamic, dependent relationships – You can’t predict what’s going to happen – Incredibly hard to engineer dependable systems of this type• This is the challenge facing Software Engineers in today’s world. 25
    26. 26. University of St Andrews School of Computer Science An analogy• Complexity is analogous to heat and simplicity is analogous to cold – There is no such thing as cold, just absence of heat. – That is why we have absolute zero - no heat left – But no absolute heat - things can always get hotter 26
    27. 27. University of St Andrews School of Computer Science Simplicity• So we can never add simplicity, only remove complexity• required functionality places a lower limit on the complexity required.• Walking is simpler than a rocket ship… but doesnt solve the same problem 27
    28. 28. University of St Andrews School of Computer Science Removing complexity• So the idea is to remove unnecessary complexity• Some complexity that is required does not excuse the surfeit of complexity currently in IT systems. – but does this imply the ability to measure complexity? – how do we prove that we have removed complexity? 28
    29. 29. University of St Andrews School of Computer Science Adding people...• If you consider people to be part of the system – then you have dynamic, dependent relationships between components• so are all large, socio-technical systems complex systems?• We would argue that they are... 29
    30. 30. University of St Andrews School of Computer Science Epistemic Complexity• (Epistemic: of or relating to knowledge and its validation)• relates to the predictability of system properties when changes are proposed• if you dont have enough knowledge of the system and its components - you cannot make predictions about it• even if the system does NOT have dynamic, dependent relationships between components• therefore large complicated systems are also complex systems when it is practically impossible to aquire the necessary knowledge 30
    31. 31. University of St Andrews School of Computer Science System observer• Complexity is not only a property of a system but also of the system observer.• If an expert has a knowledge of a system and can reliably make changes• but cannot articulate his knowledge• then if he leaves, his replacement may never be able to accrue the same level of understanding• therfore a complicated system becomes a complex one 31
    32. 32. University of St Andrews School of Computer Science Recap: Types of Complexity• Adaptive Systems – systems of systems where behaviour cannot be predicted• Socio-technical systems – people form dynamic, dependent relationships• Complicated systems – Epistemic complexity – Observer knowledge 32
    33. 33. University of St Andrews School of Computer Science Combat plan• So how do we combat these?• Really an open ended method• For example, formal methods really dont help with dynamic dependancies• Epistemic complexity may allow us to state truths about the system. – filling in our knowledge 33
    34. 34. University of St Andrews School of Computer Science Understand relationships• Better understanding of dynamic, dependent relationships may also be useful in helping manage complexity• This means that Socio-technical analysis is required – Organisational analysis – Stakeholders• May be able to change these relationships from dynamic to static – and therefore reduce complexity 34
    35. 35. University of St Andrews School of Computer Science but really...• Graduates in Software Engineering will rarely face these problems during their studies• So be aware, be sensitised to the issues• You WILL come across them in industry• Be ready for your Kobayashi Maru... 35
    36. 36. University of St Andrews School of Computer Science but really...• Graduates in Software Engineering will rarely face these problems during their studies• So be aware, be sensitised to the issues• You WILL come across them in industry• Be ready for your Kobayashi Maru... but don’t cheat! 36
    37. 37. University of St Andrews School of Computer Scienceover to you... 37
    38. 38. University of St Andrews School of Computer Science Credits• Slides by me - email jws7@cs.st-andrews.ac.uk for a copy.s• Images from Google Image Search.• To learn more on LSCITS visit http://www.lscits.org• Recommended reading: – Clay Shirky: Here Comes Everybody 38

    ×