LOG6306 : Études Empiriques Sur Les Patrons Logiciels
Total Page:16
File Type:pdf, Size:1020Kb
LOG6306 : Études empiriques sur les patrons logiciels Yann-Gaël Guéhéneuc Recurring Course – Well-known Computer Scientists Département de génie informatique et de génie logiciel École Polytechnique de Montréal © Guéhéneuc, 2012 Why Is It Important? (1/2) Those who cannot remember the past are condemned to repeat it. – By George Santayana – Life of Reason, Reason in Common Sense, Scribner's, 1905, page 284 2/52 Why Is It Important? (2/2) Pythagoras theorem Euclid’s theorem Intercept theorem or Thales’ theorem … You know the Nobel Prizes… … do you know the Turing Awards? 3/52 Some Known Computer Scientists Frances E. Allen Grady Booch Frederick Brooks Ole -Johan Dahl et Kristen Nygaard Erich Gamma Grace Murray Hopper Manny Lehman Barbara Liskov John McCarthy Dave Parnas Edward Yourdon 4/52 Frances E. Allen Frances E. Allen Frances E. Allen – Born on the 4th of August, 1932 *1932 – Pioneer of optimising compilation, code optimisation, and parallelisation AWC Augusta Ada Lovelace Award en 2002 ACM Turing Award en 2006 – Cf. http://en.wikipedia.org/wiki/Frances_E._Allen 5/52 Frances E. Allen Before 1966 – Since the 1930s • Programmable computers – Since the 1950s • First compilers by Grace Murray Hopper • Programming languages – FORTRAN: first complete compiler – COBOL: first programming language compiled for different computer architectures (UNIVAC II et RCA 501) 6/52 Frances E. Allen Before 1966 – In 1955 • Context-free grammar invented by Noam Chomsky – In 1966 • LR Parsing invented by Donald Knuth 7/52 Frances E. Allen In 1966 – Program Optimization • Use of graphs to describe programs and to allow their optimisations In 1970 – Control Flow Analysis et A Basis for Program Optimization • Intervals for control-flow analyses In 1974 – Interprocedural data flow analysis • Interprocedural analyses of whole programs 8/52 Grady Booch Grady Booch Grady Booch – Born 27 February 1955 *1955 – Father of the UML with Jacobson et Rumbaugh Stevens Award in 2003 – Cf. http://en.wikipedia.org/wiki/Grady_Booch 9/52 Grady Booch UML – Context 10/52 Grady Booch – Three Amigos and their methods • Grady Booch, – Booch Method (design) • Ivar Jacobson – Object Oriented Software Engineering, OOSE (use cases) • James Rumbaugh – Object Modeling Technique, OMT (analysis) • Rational Software Corporation – UML 11/52 Frederick Brooks Frederick Brooks Frederick Brooks – Born 19 April 1931 *1931 – Father of Brooks’ Law – IEEE J. von Neumann Medal in 1993 – ACM Turing Award in 1999 – Cf. http://en.wikipedia.org/wiki/Fred_Brooks 12/52 Frederick Brooks Principle of Brooks’ Law – Context • 1956–1964 – Manager of the IBM OS/360 development project – Delays in the delivery – Book • The Mythical Man-Month: Essays on Software Engineering – Principle • Adding manpower to a late software project makes it later 13/52 Frederick Brooks – Rationale • It takes some time for the people added to a project to become productive. Brooks calls this the "ramp up" time. New workers must first become educated about the work that has preceded them; also integrate with a team composed of multiple engineers who must educate the new worker in their area of expertise in the code base, day by day • Communication overheads increase as the number of people increases. The number of different communication channels increases along with the square of the number of people 14/52 Frederick Brooks – Comments, solutions • Brooks' Law applies to projects that are already late • The quantity, quality and role of the people added to the project also must be taken into consideration • Good management and development practices also help to minimize the impact of Brooks' Law • Rather than depending on heroes to carry the day with extraordinary efforts, Wiegers argues that a team of ordinarily-skilled individuals can repeatedly deliver timely results in the right work environment 15/52 Frederick Brooks – Critics “How to quadruple your productivity with an army of student interns” • Tolerate a little crowding • Locate next to a deep pool of hackers • Know who the best people are and only hire them • Pay well • Divide tasks to be as loosely-coupled as possible • Design your intern projects in advance 16/52 Dahl–Nygaard Ole-Johan Dahl Ole-Johan Dahl – Born 12 October 1931, †29 June 2002 *1931 †2002 – Co-inventor of the object-oriented paradigm – ACM Turing Award in 2001 – IEEE J. von Neumann in 2002 – Cf. http://www.olejohandahl.info/ – Cf. http://en.wikipedia.org/wiki/Ole-Johan_Dahl 17/52 Dahl–Nygaard Kristen Nygaard Kristen Nygaard – Born 27 August 1926, †10 August 2002 *1926 †2002 – Co-inventor of the object-oriented paradigm – ACM Turing Award in 2001 – IEEE J. von Neumann in 2002 – Cf. http://www.ifi.uio.no/in_memoriam_kristen/ – Cf. http://en.wikipedia.org/wiki/Kristen_Nygaard 18/52 Dahl–Nygaard Object-oriented paradigm – Context • 1961 – Algol imperative programming – Classes, objects, encapsulation, inheritance, polymorphism • Simula I • Simula 67 19/52 Dahl–Nygaard Object-oriented programming – Smalltalk • Xerox Parc, 1970–1983 – GUI – Icons – WYSIWYG – Mouse (cf. Stanford Research Institute) • Dynamic typing • Reflection • Garbage collection 20/52 Dahl–Nygaard Object-oriented programming – C++ • AT&T Bell Labs • Bjarne Stroustrup • 1980 • Static typing • Multiple inheritance • Cf. http://www.approximity.com/ruby/ Comparison_rb_st_m_java.html 21/52 Dahl–Nygaard Object-oriented programming – Oberon • ETH Zurich • Niklaus Wirth • 1986 • Static typing • Garbage collection • Array bounds checking 22/52 Erich Gamma Erich Gamma Erich Gamma *1961 – Born 1961 – Father of the software design patterns Dahl-Nygaard Prizes in 2006 – Cf. http://en.wikipedia.org/wiki/Erich_Gamma – Cf. http://c2.com/cgi/wiki?ErichGamma 23/52 Erich Gamma Software design patterns – Context • 1977 et 1979 – Christopher Alexander – A Pattern Language: Towns, Buildings, Construction and the idea of generative patterns – The Timeless Way of Building and the idea of perfection in architecture • 1990 – Object-oriented programs are becoming mainstream 24/52 Erich Gamma A Pattern Language: Towns, Buildings, Construction – 253 patterns – Generative grammar – « At the core... is the idea that people should design for themselves their own houses, streets and communities. This idea... comes simply from the observation that most of the wonderful places of the world were not made by architects but by the people » Design Patterns: Elements of Reusable Object- Oriented Software – 23 patterns – Not a language? – « Dynamic, highly parameterized software is harder to understand and build than more static software » 25/52 Erich Gamma Design Patterns: Elements of Reusable Object-Oriented Software – Dahl-Nygaard Prizes à • Ralph Johnson • Richard Helm • Erich Gamma • † John Vlissides 26/52 Grace Murray Hopper Grace Murray Hopper (rear admiral) Grace Hopper *1906 †1992 – Born the 9th of December, 1906, died the 1st of January, 1992 – Mother of the first compiler, of the term “debugging”, of COBOL and of standards Defense Distinguished Service Medal in the USA in 1986 – Cf. http://en.wikipedia.org/wiki/Grace_Hopper 27/52 Grace Murray Hopper 1944 – WWII is almost over – Computers showed their usefulness • Dehomag D11 (Germany/USA, 1930s): handling of identify cards • Zuse Z3 (Germany, 1941): flutter (dynamic aeroelasticity of wings) • Colossus Mark 1 (Grande Bretagne, 1943): decoding of messages • Harvard Mark I (USA, 1944): production of calculus tables for the Navy 28/52 Grace Murray Hopper Principle of the first computers – Electromechanical or electromagnetic relays – Two active relays make a third relay active • Relays “3” et “6” make relay “9” active for a sum 1947 29/52 Grace Murray Hopper 1950 – Computers become programmable with higher- level languages than microcode or assembly • UNIVAC I: census • A-0 (Arithmetic Language version 0) • Loader or linker more than a compiler 1954 – B-0 (Business Language version 0) also known as FLOW-MATIC 30/52 Grace Murray Hopper 1959 – Conference CODASYL (Conference on Data Systems Languages) – COBOL as successor of FLOW-MATIC – Close to English 1970s – Advocated standards tests for programming languages, FORTRAN in particular 31/52 Manny Lehman Meir M. « Manny » Lehman Manny Lehman – Died 29 December 2010 *1925 †2010 – Father of the laws of software evolution Stevens Award in 2003 – Cf. http://www.doc.ic.ac.uk/news/archive/story/ manny-lehman – Cf. http://www.ieeeghn.org/wiki/index.php/Oral- History:Meir_Lehman 32/52 Manny Lehman Laws of software evolution – Context • 1974 – IBM OS/360 et OS/370 • Types of programs – S: can be formally specified – P: follow an iterative development process – E: are embedded in our environment 33/52 Manny Lehman – Eight laws 1. Continuing change : E-type systems must be continually adapted or they become progressively less satisfactory 2. Increasing complexity : As an E-type system evolves its complexity increases unless work is done to maintain or reduce it 3. Self regulation : E-type system evolution process is self regulating with distribution of product and process measures close to normal 4. Conservation of organisational stability : The average effective global activity rate in an evolving E-type system is invariant over product lifetime 34/52 Manny Lehman – Eight laws 5. Conservation of familiarity : As an E-type system evolves all associated with it must maintain mastery of its content and behaviour to achieve satisfactory evolution. The average incremental growth remains invariant as the system evolves 6. Continuing