SlideShare una empresa de Scribd logo
1 de 60
Descargar para leer sin conexión
1
2
Pete Goodliffe
                         pete@goodliffe.net
               http://www.goodliffe.net
Who is Pete?




                                              3
Specific

              The
impact
of

                                   design

              design
on
a

                               techniques
              system
                                An
entire

              Learn
some
                                software

              ways
to

Our roadmap




                                  design

              improve
our

                                  course
              software

                                      1
              designs




                                              4
Learning
lessions
                      Design
Town
                              The
Messy

                              Metropolis

              So
what?
Our roadmap




                                           2




                                               5
Our roadmap




               So
what?


           3




6
So
what?



           7
So what?




8
So what?




9
What has design done for us?
                                   Ease of modification
                               ●



                                   Ease of extension
                               ●



                                   Fit for purpose
                               ●



                                   Ease of documentation
                               ●




                                   Design quality is a sink or swim issue for
                               ●


                                   software projects
                                   Some people/teams are inherently
                               ●


                                   better at design than others



                                                                                10
Effects within software
                 ●


                         Software quality
                     –

                         Developer sanity
                     –

                     Influences outside software
                 ●


                         Success of project
                     –

                         Team structure
                     –
Design matters




                         Morale
                     –

                         Company success
                     –




                                                   11
So
what?
Our roadmap




                         3




                             12
The
Messy

                         Metropolis

              So
what?
Our roadmap




                                      4




                                          13
These are comparable systems
                        ●



                            Similar size
                        ●



                            Both Linux-based
                        ●



                            “Embedded” applications
A tale of two systems

                        ●



                            Audio products
                        ●



                            C++
                        ●



                            Developed by “experienced”
                        ●


                            programmers
                            Programmers were designers
                        ●



                            Names have been changed to protect the
                        ●


                            innocent/guilty
                                                                     14
The
Messy

Metropolis



             15
A project well under way when I joined
                ●



                    “Modern” C++ codebase, a few years old
                ●



                    Ouch!
                ●



                    Warning signs:
                ●


                        Code took a fantastically long time to learn
                    –

                        No obvious routes into the system
                    –

                        It was (broadly) clear what the product did,
                    –
First contact




                        but no one explained how it did it
                        Actually getting the code, and getting it to
                    –
                        build was a rite of passage



                                                                       16
Micro-level problems:
                ●


                        Messy, inconsistent code, with no style
                    –

                        Badly put together
                    –

                        No unifying concepts
                    –

                        Far to many bad code smells
                    –
Warning signs




                                                                  17
Macro-level problems:
                ●


                        Control flew around the system in
                    –
                        unfathomable ways
                        Data rarely kept near where it was used
                    –

                        Many baroque caching layers to mitigate this
                    –
Warning signs




                                                                       18
No one had a complete picture of system
                ●



                    No one actually knew how it worked!
                ●


                        A combination of luck and heroic
                    –
                        maintenance programmers
                    People only knew their own small areas
                ●



                    Naturally there was no documentation
                ●
Warning signs




                    Town planning disaster!
                ●



                    We needed a map
                ●




                                                              19
The map




20
The map




21
The map




22
Design problems went directly to the top
                      ●


                              Development process
                          –

                              Company culture
                          –

                          Code grown “organically” over time
                      ●
Software archeology


                          Had been given no architectural design
                      ●




                          A system never has no design
                      ●




                          Understandable given company history
                      ●




                                                                     23
Hard to comprehend system
                       ●



                           Practically impossible to modify
                       ●



                           Bad design encouraged further bad design
                       ●
Consequences: Design

                               Paths of least resistance
                           –

                           New recruits stunned by complexity
                       ●


                               Very high staff turnover
                           –

                           System components not cohesive
                       ●


                               Grab-bags of unrelated functionality
                           –

                               Hard to determine why a component existed
                           –

                               Hard to work out where particular
                           –
                               functionality was implemented
                           Bugfixing nightmare!
                       ●
                                                                           24
Functionality and data in the wrong place
                         ●


                                 “Core services” not in the core
                             –
Consequences: Layering
                                 Why? Team dynamics! (Empire building)
                             –

                             No clear layering
                         ●


                                 Bidirectional coupling
                             –

                                 No “bottom” or “hub” or the system
                             –

                                 tight coupling
                         ●



                             Low-level testing impossible
                         ●


                                 No class unit tests
                             –

                                 No component tests
                             –




                                                                         25
Design problems fed into code problems
                     ●


                             Like no one bothered with design, no one
                         –
                             bothered with code standard
                             Duplication
                         –
Consequences: Code


                             No common libraries
                         –

                             No common idioms
                         –

                             No naming conventions
                         –

                             No common build system
                         –

                         Why?
                     ●


                             More software archeology...
                         –

                             An accidental conurbation
                         –

                             Know what you're designing
                         –

                                                                        26
Problems spilled out beyond development
                     ●


                         team
                             Slow development cycle
                         –

                             Support engineers
                         –
Consequences: Team


                             External protocol
                         –

                             Intra-company politics (marketing, sales,
                         –
                             manufacturing)




                                                                         27
It headed in a downward spiral
                   ●



                       Very uneconomical to maintain
                   ●



                       Did not fulfil business objectives
                   ●



                       Thrown away
                   ●



                       Rewritten in C# on Windows
                   ●
Where is it now?




                                                            28
Low quality product
                           ●
The upshot of bad design
                               Inflexible system
                           ●


                                   Can't accommodate change
                               –

                                   Can't add new functionality
                               –

                               Pervasive code problems
                           ●



                               Infrequent releases
                           ●



                               Staffing problems
                           ●



                               Messy internal politics
                           ●



                               Lack of success
                           ●



                               Many painful headaches and late nights
                           ●



                                                                        29
The
Messy

                         Metropolis

              So
what?
Our roadmap




                                      4




                                          30
Design
Town
                             The
Messy

                             Metropolis

              So
what?
Our roadmap




                                          5




                                              31
Design
Town



              32
Involved from very start
                ●



                    New team of capable programmers
                ●


                        Small team
                    –

                        Flat structure
                    –

                        No rivalry
                    –

                    Clear roadmap
                ●


                        Initial product
                    –
First contact




                        Future functionality
                    –

                    XP development
                ●




                                                      33
XP and design?
                      ●




                          YAGNI
                      ●
eXtreme Programming

                          Spikes
                      ●




                                           34
Started with design!
              ●



                  Not a big up-front design
              ●



                  Identified main areas of functionality
              ●



                  Initial architecture
              ●



                  Core threading models
              ●



                                 User Interface
First steps




                               Control Components


                                   Audio Path


                               OS/Audio Codecs

                                                           35
Audio path as sub-architecture
                ●



                    Pipe and filter
                ●



                    Product configuration determines
                ●


                    individual audio path


                                    User Interface
                          A   B    C         D         E   F
First steps




                                  Control Components
              Audio file                                        Audio hardware

                                      Audio Path


                                  OS/Audio Codecs

                                                                                36
Other early choices:
              ●


                      Supporting libraries
                  –

                      Top-level file structure
                  –

                      Naming
                  –

                      “House” presentation style
                  –

                      Coding idioms
                  –

                      Choice of unit test framework
                  –

                      Infrastructure
                  –
First steps




                           Source control
                       ●


                           Build system
                       ●


                           Continuous integration
                       ●




                  These influenced design decisions
              ●

                                                      37
Helped to locate new functionality
                    ●


                            With clear system overview...
                        –

                            New units of functionality consistently added
                        –
                            the the right place
                            Easy to find where existing functionality
                        –
                            implemented
The story unfolds




                            Easy to locate/fix bugs
                        –

                            Not always convenient
                        –

                                 Made programmers work harder
                             ●


                                 Payoff: easier life later
                             ●




                                                                            38
Entire system was consistent
                    ●


                            Every decision was taken in the context of
                        –
                            the whole design
                            Done intentionally
                        –

                            Design always in view:
                        –

                                 All code produced fitted the design
The story unfolds



                             ●



                            Over entire life of system, things followed
                        –
                            original design




                                                                          39
Elegance at top level fed down to the
                    ●


                        lower levels
                            At lowest level, code uniform and neat
                        –

                            Helped by
                        –

                                 Pair programming
                             ●


                                 Code reviews
                             ●
The story unfolds



                                 Code standards
                             ●



                            No unusual surprises
                        –




                                                                     40
New areas of functionality appeared
                    ●


                            Not a problem
                        –

                            Design (like code) malleable
                        –

                            Nothing is set in stone
                        –

                            Design must be changed when required
                        –
The story unfolds



                            Encouraged simple design
                        –

                            Consequence:
                        –

                                 Code could grow rapidly
                             ●


                                 Code could maintain good internal structure
                             ●




                                                                               41
(Unit) test everything
                    ●


                            Change sections of software without breaking
                        –
                            everything else
                                 Design town had major design changes
                             ●



                            Shaping of the code design
                        –

                                 Enforce good code structure
                             ●
The story unfolds



                                 Loosely coupled: construct in a test harness
                             ●


                                 Cohesive
                             ●



                            Encouraged good APIs
                        –




                                                                                42
Quality control
                    ●


                            Pair programming
                        –

                            Code reviews
                        –

                            Reviews ensured changes did not sully design
                        –
The story unfolds



                        Programmers took responsibility for
                    ●


                        the design




                                                                           43
Pragmatic approach to design
                    ●


                            Deadlines lead to corner-cutting
                        –

                            Technical debt
                        –

                            Scheduled for later revision
                        –
The story unfolds



                        Timescales worked in favour
                    ●


                            Not too long
                        –

                            Not too short
                        –




                                                               44
Team dynamics followed code design
                    ●


                            No one “owned” code
                        –

                            Everyone expected to write high-quality code
                        –

                            Closely co-operating colleagues
                        –

                            Conway's Law
                        –
The story unfolds




                        Design was sufficiently well documented
                    ●


                            Architecture overview
                        –

                            Code as documentation
                        –

                                 Naming conventions
                             ●


                                 Structure (namespaces, nested classes,
                             ●


                                 enums, etc)
                            Doxygen
                        –
                                                                           45
New team members could enter project
                    ●


                        easily


                        Code still enjoyable to work with
                    ●


                            Low turnover of members
                        –
The story unfolds



                            Programmers taking ownership
                        –




                                                               46
User Interface


                                                Control Components
                                                User Interface
One We Made Earlier


                                                                                      External
                                                    Audio Path
                                                                                      controllers
                                                   Control


                                                 OS/Audio Codecs
                                Storage
                                                         Audio path
                              management



                                  A        B       C        D         E   F
                                               OS/Audio codecs


                      Audio file                                               Audio hardware


                                                                                                47
Still in use
                   ●



                       Still being developed
                   ●



                       Still changing
                   ●



                       Not perfect
                   ●
Where is it now?




                                               48
Design
Town
                             The
Messy

                             Metropolis

              So
what?
Our roadmap




                                          5




                                              49
Learning
lessions
                      Design
Town
                              The
Messy

                              Metropolis

              So
what?
Our roadmap




                                           6




                                               50
Design matters
                         ●


                                 It can go spectacularly wrong
                             –

                                 It can go spectacularly right
                             –

                             You've got to design on purpose
The moral of the story

                         ●


                                 This does not mean a big up-front design
                             –



                             Good design
                         ●


                                 Leads to better code
                             –

                                 Leads to better teams
                             –

                                 Leads to success
                             –




                                                                            51
Good design comes from:
                         ●


                                 Actually doing up-front design (as much as
                             –
                                 required)
                                 Quality and experience of designers
                             –
The moral of the story


                                 Keeping design in view at all times
                             –

                                 Team being given/talking responsibility
                             –

                                 Not being afraid of changing design
                             –

                                 Team:
                             –

                                      Having the right people on the team
                                  ●


                                      Size of the team
                                  ●


                                      Health of working relationships
                                  ●



                                 Making decisions at the right time
                             –

                                 Good project management
                             –
                                                                              52
Fin


      53
Your turn




54
What's the best system you've ever seen?
            ●


                    What have you learnt from it?
                –

                    What were the consequences of this design:
                –

                         Inside code
                     ●


                         Outside code
                     ●



                What's the worst system you've ever seen
            ●
Your turn




                    What have you learnt from it?
                –

                    What were the consequences of this design:
                –

                         Inside code
                     ●


                         Outside code
                     ●
                                                                 55
Epilogue




56
“Its useful and fun and it'll
                     make       you     a     better
                     programmer.” Jez Higgins “A
                     goldmine of information
                     that     every     professional
                     software developer should be
                     aware of.” Tim Penhey “A
                     terrific     resource       for
                     developers wanting to learn or
                     teach good coding practices ...
 . . . buy it now!




                     deserves a place on the
                     bookshelf.” Frazzled Dad blog
                     “A unique and practical
                     guide to being a professional
                     programmer in the modern
                     workplace.” Andrew Burrows
                     “Readable, engaging, and
                     even funny ... It's the book I
                     wish I'd had when I started
                     work as a programmer.quot; Steve
                     Love “A 'must read' for any
The book




                     programmer who wants to be
                     a better programmer” Linux
                     Tutorial “This is exactly the
                     kind of book you should give
                     raw recruits.” Jon Jagger




                                                       57
Any questions?




58
© 2008 Pete Goodliffe. All rights reserved. No part of this document may be reproduced without the author's prior permission.
                                                                                                                                59
Version info:


Slides version:   0.5
Last updated:     2008-03-12
Copyright:        © 2008 Pete Goodliffe




                                          60

Más contenido relacionado

Similar a A Tale Of Two Systems

Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...Software Park Thailand
 
Role of Retrospectives in Success of Agile Project
Role of Retrospectives in Success of Agile ProjectRole of Retrospectives in Success of Agile Project
Role of Retrospectives in Success of Agile ProjectNaresh Jain
 
Hey open source, don’t forget the user! - by Chad Kieffer
Hey open source,  don’t forget the user! - by Chad KiefferHey open source,  don’t forget the user! - by Chad Kieffer
Hey open source, don’t forget the user! - by Chad Kiefferdmthompson
 
Metadata to create and collect
Metadata to create and collectMetadata to create and collect
Metadata to create and collectvrt-medialab
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl UniMatthew Landauer
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth PresentationLong Nguyen
 
How to build vibrant communities
How to build vibrant communitiesHow to build vibrant communities
How to build vibrant communitiesPeter H. Reiser
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Coursepeter_marklund
 
symfony: Open-Source Enterprise Framework
symfony: Open-Source Enterprise Frameworksymfony: Open-Source Enterprise Framework
symfony: Open-Source Enterprise FrameworkFabien Potencier
 
Internet World Web2
Internet World Web2Internet World Web2
Internet World Web2BobsNJ
 
Twitter in the enterprise: Microblogging vs. Microsharing
Twitter in the enterprise: Microblogging vs. MicrosharingTwitter in the enterprise: Microblogging vs. Microsharing
Twitter in the enterprise: Microblogging vs. MicrosharingCommunardo GmbH
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Ivo Jansch
 
Product Development 230109
Product Development 230109Product Development 230109
Product Development 230109Espen Sivertsen
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static AnalysisConSanFrancisco123
 
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)Fabien Potencier
 
Unosat19 April09
Unosat19 April09Unosat19 April09
Unosat19 April09guestf13366
 

Similar a A Tale Of Two Systems (20)

Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
Thailand SPIN: Series 3: กุญแจสู่ความสำเร็จในการเขียนโปรแกรมให้ตรงกับความต้อง...
 
Role of Retrospectives in Success of Agile Project
Role of Retrospectives in Success of Agile ProjectRole of Retrospectives in Success of Agile Project
Role of Retrospectives in Success of Agile Project
 
Hey open source, don’t forget the user! - by Chad Kieffer
Hey open source,  don’t forget the user! - by Chad KiefferHey open source,  don’t forget the user! - by Chad Kieffer
Hey open source, don’t forget the user! - by Chad Kieffer
 
Metadata to create and collect
Metadata to create and collectMetadata to create and collect
Metadata to create and collect
 
Working With People Adl Uni
Working With People Adl UniWorking With People Adl Uni
Working With People Adl Uni
 
Oop 1
Oop 1Oop 1
Oop 1
 
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
Just In Time Scalability  Agile Methods To Support Massive Growth PresentationJust In Time Scalability  Agile Methods To Support Massive Growth Presentation
Just In Time Scalability Agile Methods To Support Massive Growth Presentation
 
How to build vibrant communities
How to build vibrant communitiesHow to build vibrant communities
How to build vibrant communities
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Grensesnitt i bevegelse
Grensesnitt i bevegelseGrensesnitt i bevegelse
Grensesnitt i bevegelse
 
The Boundaryless Value-Chain
The Boundaryless Value-ChainThe Boundaryless Value-Chain
The Boundaryless Value-Chain
 
symfony: Open-Source Enterprise Framework
symfony: Open-Source Enterprise Frameworksymfony: Open-Source Enterprise Framework
symfony: Open-Source Enterprise Framework
 
Internet World Web2
Internet World Web2Internet World Web2
Internet World Web2
 
Twitter in the enterprise: Microblogging vs. Microsharing
Twitter in the enterprise: Microblogging vs. MicrosharingTwitter in the enterprise: Microblogging vs. Microsharing
Twitter in the enterprise: Microblogging vs. Microsharing
 
Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)Dynamic Languages In The Enterprise (4developers march 2009)
Dynamic Languages In The Enterprise (4developers march 2009)
 
Product Development 230109
Product Development 230109Product Development 230109
Product Development 230109
 
Secure Programming With Static Analysis
Secure Programming With Static AnalysisSecure Programming With Static Analysis
Secure Programming With Static Analysis
 
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)symfony: An Open-Source Framework for Professionals (PHP Day 2008)
symfony: An Open-Source Framework for Professionals (PHP Day 2008)
 
Jobs In Foss
Jobs In FossJobs In Foss
Jobs In Foss
 
Unosat19 April09
Unosat19 April09Unosat19 April09
Unosat19 April09
 

Más de QConLondon2008

J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The JvmQConLondon2008
 
Evolving The Java Language
Evolving The Java LanguageEvolving The Java Language
Evolving The Java LanguageQConLondon2008
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebQConLondon2008
 
14147503 Intentions Interfaces Making Patterns Concrete
14147503 Intentions Interfaces Making Patterns Concrete14147503 Intentions Interfaces Making Patterns Concrete
14147503 Intentions Interfaces Making Patterns ConcreteQConLondon2008
 
The Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryThe Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryQConLondon2008
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1QConLondon2008
 
Application Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomApplication Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomQConLondon2008
 
Rest Reuse And Serendipity
Rest Reuse And SerendipityRest Reuse And Serendipity
Rest Reuse And SerendipityQConLondon2008
 

Más de QConLondon2008 (10)

J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The Jvm
 
Agile Mashups
Agile MashupsAgile Mashups
Agile Mashups
 
Evolving The Java Language
Evolving The Java LanguageEvolving The Java Language
Evolving The Java Language
 
Google G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The WebGoogle G Data Reading And Writing Data On The Web
Google G Data Reading And Writing Data On The Web
 
14147503 Intentions Interfaces Making Patterns Concrete
14147503 Intentions Interfaces Making Patterns Concrete14147503 Intentions Interfaces Making Patterns Concrete
14147503 Intentions Interfaces Making Patterns Concrete
 
The Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J QueryThe Dom Scripting Toolkit J Query
The Dom Scripting Toolkit J Query
 
Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1Google G Data Reading And Writing Data On The Web 1
Google G Data Reading And Writing Data On The Web 1
 
Application Services On The Web Sales Forcecom
Application Services On The Web Sales ForcecomApplication Services On The Web Sales Forcecom
Application Services On The Web Sales Forcecom
 
Managers In Scrum
Managers In ScrumManagers In Scrum
Managers In Scrum
 
Rest Reuse And Serendipity
Rest Reuse And SerendipityRest Reuse And Serendipity
Rest Reuse And Serendipity
 

Último

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Último (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

A Tale Of Two Systems

  • 1. 1
  • 2. 2
  • 3. Pete Goodliffe pete@goodliffe.net http://www.goodliffe.net Who is Pete? 3
  • 4. Specific
 The
impact
of
 design
 design
on
a
 techniques system An
entire
 Learn
some software
 ways
to
 Our roadmap design
 improve
our
 course software
 1 designs 4
  • 5. Learning
lessions Design
Town The
Messy
 Metropolis So
what? Our roadmap 2 5
  • 6. Our roadmap So
what? 3 6
  • 10. What has design done for us? Ease of modification ● Ease of extension ● Fit for purpose ● Ease of documentation ● Design quality is a sink or swim issue for ● software projects Some people/teams are inherently ● better at design than others 10
  • 11. Effects within software ● Software quality – Developer sanity – Influences outside software ● Success of project – Team structure – Design matters Morale – Company success – 11
  • 13. The
Messy
 Metropolis So
what? Our roadmap 4 13
  • 14. These are comparable systems ● Similar size ● Both Linux-based ● “Embedded” applications A tale of two systems ● Audio products ● C++ ● Developed by “experienced” ● programmers Programmers were designers ● Names have been changed to protect the ● innocent/guilty 14
  • 16. A project well under way when I joined ● “Modern” C++ codebase, a few years old ● Ouch! ● Warning signs: ● Code took a fantastically long time to learn – No obvious routes into the system – It was (broadly) clear what the product did, – First contact but no one explained how it did it Actually getting the code, and getting it to – build was a rite of passage 16
  • 17. Micro-level problems: ● Messy, inconsistent code, with no style – Badly put together – No unifying concepts – Far to many bad code smells – Warning signs 17
  • 18. Macro-level problems: ● Control flew around the system in – unfathomable ways Data rarely kept near where it was used – Many baroque caching layers to mitigate this – Warning signs 18
  • 19. No one had a complete picture of system ● No one actually knew how it worked! ● A combination of luck and heroic – maintenance programmers People only knew their own small areas ● Naturally there was no documentation ● Warning signs Town planning disaster! ● We needed a map ● 19
  • 23. Design problems went directly to the top ● Development process – Company culture – Code grown “organically” over time ● Software archeology Had been given no architectural design ● A system never has no design ● Understandable given company history ● 23
  • 24. Hard to comprehend system ● Practically impossible to modify ● Bad design encouraged further bad design ● Consequences: Design Paths of least resistance – New recruits stunned by complexity ● Very high staff turnover – System components not cohesive ● Grab-bags of unrelated functionality – Hard to determine why a component existed – Hard to work out where particular – functionality was implemented Bugfixing nightmare! ● 24
  • 25. Functionality and data in the wrong place ● “Core services” not in the core – Consequences: Layering Why? Team dynamics! (Empire building) – No clear layering ● Bidirectional coupling – No “bottom” or “hub” or the system – tight coupling ● Low-level testing impossible ● No class unit tests – No component tests – 25
  • 26. Design problems fed into code problems ● Like no one bothered with design, no one – bothered with code standard Duplication – Consequences: Code No common libraries – No common idioms – No naming conventions – No common build system – Why? ● More software archeology... – An accidental conurbation – Know what you're designing – 26
  • 27. Problems spilled out beyond development ● team Slow development cycle – Support engineers – Consequences: Team External protocol – Intra-company politics (marketing, sales, – manufacturing) 27
  • 28. It headed in a downward spiral ● Very uneconomical to maintain ● Did not fulfil business objectives ● Thrown away ● Rewritten in C# on Windows ● Where is it now? 28
  • 29. Low quality product ● The upshot of bad design Inflexible system ● Can't accommodate change – Can't add new functionality – Pervasive code problems ● Infrequent releases ● Staffing problems ● Messy internal politics ● Lack of success ● Many painful headaches and late nights ● 29
  • 30. The
Messy
 Metropolis So
what? Our roadmap 4 30
  • 31. Design
Town The
Messy
 Metropolis So
what? Our roadmap 5 31
  • 33. Involved from very start ● New team of capable programmers ● Small team – Flat structure – No rivalry – Clear roadmap ● Initial product – First contact Future functionality – XP development ● 33
  • 34. XP and design? ● YAGNI ● eXtreme Programming Spikes ● 34
  • 35. Started with design! ● Not a big up-front design ● Identified main areas of functionality ● Initial architecture ● Core threading models ● User Interface First steps Control Components Audio Path OS/Audio Codecs 35
  • 36. Audio path as sub-architecture ● Pipe and filter ● Product configuration determines ● individual audio path User Interface A B C D E F First steps Control Components Audio file Audio hardware Audio Path OS/Audio Codecs 36
  • 37. Other early choices: ● Supporting libraries – Top-level file structure – Naming – “House” presentation style – Coding idioms – Choice of unit test framework – Infrastructure – First steps Source control ● Build system ● Continuous integration ● These influenced design decisions ● 37
  • 38. Helped to locate new functionality ● With clear system overview... – New units of functionality consistently added – the the right place Easy to find where existing functionality – implemented The story unfolds Easy to locate/fix bugs – Not always convenient – Made programmers work harder ● Payoff: easier life later ● 38
  • 39. Entire system was consistent ● Every decision was taken in the context of – the whole design Done intentionally – Design always in view: – All code produced fitted the design The story unfolds ● Over entire life of system, things followed – original design 39
  • 40. Elegance at top level fed down to the ● lower levels At lowest level, code uniform and neat – Helped by – Pair programming ● Code reviews ● The story unfolds Code standards ● No unusual surprises – 40
  • 41. New areas of functionality appeared ● Not a problem – Design (like code) malleable – Nothing is set in stone – Design must be changed when required – The story unfolds Encouraged simple design – Consequence: – Code could grow rapidly ● Code could maintain good internal structure ● 41
  • 42. (Unit) test everything ● Change sections of software without breaking – everything else Design town had major design changes ● Shaping of the code design – Enforce good code structure ● The story unfolds Loosely coupled: construct in a test harness ● Cohesive ● Encouraged good APIs – 42
  • 43. Quality control ● Pair programming – Code reviews – Reviews ensured changes did not sully design – The story unfolds Programmers took responsibility for ● the design 43
  • 44. Pragmatic approach to design ● Deadlines lead to corner-cutting – Technical debt – Scheduled for later revision – The story unfolds Timescales worked in favour ● Not too long – Not too short – 44
  • 45. Team dynamics followed code design ● No one “owned” code – Everyone expected to write high-quality code – Closely co-operating colleagues – Conway's Law – The story unfolds Design was sufficiently well documented ● Architecture overview – Code as documentation – Naming conventions ● Structure (namespaces, nested classes, ● enums, etc) Doxygen – 45
  • 46. New team members could enter project ● easily Code still enjoyable to work with ● Low turnover of members – The story unfolds Programmers taking ownership – 46
  • 47. User Interface Control Components User Interface One We Made Earlier External Audio Path controllers Control OS/Audio Codecs Storage Audio path management A B C D E F OS/Audio codecs Audio file Audio hardware 47
  • 48. Still in use ● Still being developed ● Still changing ● Not perfect ● Where is it now? 48
  • 49. Design
Town The
Messy
 Metropolis So
what? Our roadmap 5 49
  • 50. Learning
lessions Design
Town The
Messy
 Metropolis So
what? Our roadmap 6 50
  • 51. Design matters ● It can go spectacularly wrong – It can go spectacularly right – You've got to design on purpose The moral of the story ● This does not mean a big up-front design – Good design ● Leads to better code – Leads to better teams – Leads to success – 51
  • 52. Good design comes from: ● Actually doing up-front design (as much as – required) Quality and experience of designers – The moral of the story Keeping design in view at all times – Team being given/talking responsibility – Not being afraid of changing design – Team: – Having the right people on the team ● Size of the team ● Health of working relationships ● Making decisions at the right time – Good project management – 52
  • 53. Fin 53
  • 55. What's the best system you've ever seen? ● What have you learnt from it? – What were the consequences of this design: – Inside code ● Outside code ● What's the worst system you've ever seen ● Your turn What have you learnt from it? – What were the consequences of this design: – Inside code ● Outside code ● 55
  • 57. “Its useful and fun and it'll make you a better programmer.” Jez Higgins “A goldmine of information that every professional software developer should be aware of.” Tim Penhey “A terrific resource for developers wanting to learn or teach good coding practices ... . . . buy it now! deserves a place on the bookshelf.” Frazzled Dad blog “A unique and practical guide to being a professional programmer in the modern workplace.” Andrew Burrows “Readable, engaging, and even funny ... It's the book I wish I'd had when I started work as a programmer.quot; Steve Love “A 'must read' for any The book programmer who wants to be a better programmer” Linux Tutorial “This is exactly the kind of book you should give raw recruits.” Jon Jagger 57
  • 59. © 2008 Pete Goodliffe. All rights reserved. No part of this document may be reproduced without the author's prior permission. 59
  • 60. Version info: Slides version: 0.5 Last updated: 2008-03-12 Copyright: © 2008 Pete Goodliffe 60