SlideShare a Scribd company logo
1 of 59
Download to read offline
Introduction to
reverse engineering


      Tudor Gîrba
    www.tudorgirba.com
Reference
Reverse engineering is analyzing a subject system to:
 identify components and their relationships, and
 create more abstract representations.




                                 Chikofky & Cross, 90
Why reverse engineer?
In 1944, 3 B-29 had to land in Russia
Requirement: Copy everything fast!
Approach
 disassemble
         run
         test
TU-4 Result:
105,000 pieces reassembled in 2 years
Why reverse engineer software systems?
1946
1956
1956
1956
1956   2006
1956   2006
1956   2006
1956   2006




       ?
Software is complex.



   29% Succeeded

      18% Failed



   53% Challenged



 The Standish Group, 2004
How large is your project?
How large is your project?


    1’000’000 lines of code
How large is your project?


    1’000’000 lines of code
    * 2 = 2’000’000 seconds
How large is your project?


    1’000’000 lines of code
    * 2 = 2’000’000 seconds
      / 3600 = 560 hours
How large is your project?


    1’000’000 lines of code
    * 2 = 2’000’000 seconds
      / 3600 = 560 hours
         / 8 = 70 days
How large is your project?


    1’000’000 lines of code
    * 2 = 2’000’000 seconds
      / 3600 = 560 hours
         / 8 = 70 days
       / 20 = 3 months
How development happens




                                           fo
                                            rw
                                              ar
                                                d
                                                 en
                                                     gin
                                                      ee
                                                       rin
                                                           g
{               {
    {                   {                                      {               {
                            }                                      {               {
        }
        }                       actual development                     }               }
            }       {       }                                              }               }
Reengineering is needed to regain control




                                                         fo
                                                          rw
                                              g
                                            rin




                                                            ar
                                         ee




                                                              d
                                        gin




                                                                 en
                                                                  gin
                                       en




                                                                   ee
                                   se




                                                                      rin
                                 erv




                                                                        g
                                re




{               {
    {                   {                                                   {               {
                            }                                                   {               {
        }
        }                               program transformation                      }               }
            }       {       }                                                           }               }
Reverse engineering is creating high level views




                                              g
                                            rin
                                         ee
                                        gin
                                       en
                                   se
                                 erv
                                re




{               {
    {                   {
                            }
        }
        }
            }       {       }
Legacy
 a sum of money, or a specified article, given to
 another by will;
 anything handed down by an ancestor or predecessor.




Oxford English Dictionary
A   legacy system is piece of software that
    you have inherited, and
    is valuable to you.
Reverse engineering is creating high level views




                                              g
                                            rin
                                         ee
                                        gin
                                       en
                                   se
                                 erv
                                re




{               {
    {                   {
                            }
        }
        }
            }       {       }
Setting direction

                  First contact
              g
            rin
         ee
        gin

                  Initial understanding
       en
   se




                  Detailed model capture
 erv
re
What is a   pattern?
Setting direction


              g
                  First contact
            rin
         ee
        gin

                  Initial understanding
       en
   se
 er




                  Detailed model capture
   v
re
You got to be careful
if you don't know
where you're going,
because you might not
get there.

Yogi Berra
Setting direction patterns

           Set                                       Where
        direction                                    to start

         Agree                              Most valuable
       on maxims                                first
Maintain            Coordinate       What not                   What
direction            direction        to do                     to do

 Appoint      Speak to the       If it ain’t broke      Fix problems
a navigator   round table           don’t fix it        not symptoms

                                                 How to do

                                                       Keep it simple
Setting direction

                  First contact
              g
            rin
         ee
        gin

                  Initial understanding
       en
   se
 er




                  Detailed model capture
   v
re
First contact patterns


 Talk with      Talk with
developers        users
                                       Talk
Chat with    Interview               about it
maintainers during demo



  Verify what         Read      Read about            Compile
   you hear         the code     the code             the code

                    Read all code       Skim        Do a mock
                     in one hour    documentation   installation
Interview                            Chat
during demo               with maintainers


What is the usage?       What is the history?

Users complain                   Developers
Users are enthusiastic      protect their job

Who to choose?                 What to ask?
Interview                                  Chat
during demo                     with maintainers


What is the usage?             What is the history?

Users complain                         Developers
Users are enthusiastic            protect their job

Who to choose?                       What to ask?



         Remember, they are all humans :)
What to ask a maintainer?


How long was your project going on?
Who worked on the project?
What was the most interesting bug you had to fix?
Why was the reengineering effort started?
How do you release?
How do you plan what to do?
How do you test?
Read all code in one hour
Read all code in one hour
Read all code in one hour




I took a course in speed reading and read “War and
Peace” in twenty minutes.
It’s about Russia.


                                      Woody Allen
How large is your project?


    1’000’000 lines of code
    * 2 = 2’000’000 seconds
      / 3600 = 560 hours
         / 8 = 70 days
       / 20 = 3 months
Why read all code in one hour?
Setting direction

                  First contact
              g
            rin
         ee
        gin

                  Initial understanding
       en
   se
 er




                  Detailed model capture
   v
re
Initial understanding patterns

                   Top down
                         Recover
                          design

                   Speculate
                  about design
                    Iteration
   Analyze                             Study
persistent data                  exceptional entities

 Recover                               Identify
 database                             problems
                   Bottom up
Identify exceptional entities
Speculate about design
Speculate about design



        Layout           Abstract
                           Item



Graph              Node             Edge
Setting direction

                  First contact
              g
            rin
         ee
        gin

                  Initial understanding
       en
   se




                  Detailed model capture
 erv
re
Detailed model capture patterns
                     Tie code and
                      questions
            Track your           Expose
           understanding         design

                        Refactor
                     to understand
        Expose                              Encode
    collaborations                        assumptions

Step through                                Write tests
  execution                                to understand
    Expose
   contracts                Expose
                           evolution
           Look for                    Learn from
         the contracts                  the past
Why refactor? To understand
Write tests to understand
and to ensure later refactorings
Example:
Visualization does not guarantee understanding
Learn from the past
Setting direction

                  First contact
              g
            rin
         ee
        gin

                  Initial understanding
       en
   se




                  Detailed model capture
 erv
re
Tudor Gîrba
       www.tudorgirba.com




creativecommons.org/licenses/by/3.0/

More Related Content

Viewers also liked

Reverse engineering project
Reverse engineering projectReverse engineering project
Reverse engineering project
thomasthetrain
 
Introduction to Reverse Engineering
Introduction to Reverse EngineeringIntroduction to Reverse Engineering
Introduction to Reverse Engineering
Gopinath Chintala
 
Introduction to Reverse Engineering
Introduction to Reverse EngineeringIntroduction to Reverse Engineering
Introduction to Reverse Engineering
Dobromir Enchev
 
La Flora del Promontorio di Portofino-ISBN-9789077634004
La Flora del Promontorio di Portofino-ISBN-9789077634004La Flora del Promontorio di Portofino-ISBN-9789077634004
La Flora del Promontorio di Portofino-ISBN-9789077634004
Fergus-On
 

Viewers also liked (15)

Reverse engineering project
Reverse engineering projectReverse engineering project
Reverse engineering project
 
Rev engg
Rev enggRev engg
Rev engg
 
Introduction to Reverse Engineering
Introduction to Reverse EngineeringIntroduction to Reverse Engineering
Introduction to Reverse Engineering
 
Concurrent engineering
Concurrent engineeringConcurrent engineering
Concurrent engineering
 
Introduction to Reverse Engineering
Introduction to Reverse EngineeringIntroduction to Reverse Engineering
Introduction to Reverse Engineering
 
Reverse engineering
Reverse engineeringReverse engineering
Reverse engineering
 
MobileTechTalk - Android application troubleshooting
MobileTechTalk - Android application troubleshootingMobileTechTalk - Android application troubleshooting
MobileTechTalk - Android application troubleshooting
 
La Flora del Promontorio di Portofino-ISBN-9789077634004
La Flora del Promontorio di Portofino-ISBN-9789077634004La Flora del Promontorio di Portofino-ISBN-9789077634004
La Flora del Promontorio di Portofino-ISBN-9789077634004
 
118052664 modul-1
118052664 modul-1118052664 modul-1
118052664 modul-1
 
ываываываывфы фы вфы фыв фыв фыв фыв
ываываываывфы фы вфы фыв фыв фыв фывываываываывфы фы вфы фыв фыв фыв фыв
ываываываывфы фы вфы фыв фыв фыв фыв
 
Social Media Workshop
Social Media WorkshopSocial Media Workshop
Social Media Workshop
 
Pam Tilson
Pam TilsonPam Tilson
Pam Tilson
 
Agile Lean Conference 2015 - Lean & Startup (Canessa)
Agile Lean Conference 2015 - Lean & Startup (Canessa)Agile Lean Conference 2015 - Lean & Startup (Canessa)
Agile Lean Conference 2015 - Lean & Startup (Canessa)
 
Gizi ibu hamil berdasarkan trimester kehamilan
Gizi ibu hamil berdasarkan trimester kehamilanGizi ibu hamil berdasarkan trimester kehamilan
Gizi ibu hamil berdasarkan trimester kehamilan
 
Tecnología
Tecnología Tecnología
Tecnología
 

Similar to Reverse Engineering 2007-11-27

05 Problem Detection
05 Problem Detection05 Problem Detection
05 Problem Detection
Jorge Ressia
 
A Moose Slideshow
A Moose SlideshowA Moose Slideshow
A Moose Slideshow
Tudor Girba
 

Similar to Reverse Engineering 2007-11-27 (18)

Problem Detection (EVO 2008)
Problem Detection (EVO 2008)Problem Detection (EVO 2008)
Problem Detection (EVO 2008)
 
Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)Reverse Engineering (EVO 2008)
Reverse Engineering (EVO 2008)
 
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
Pragmatic Design Quality Assessment - (Tutorial at ICSE 2008)
 
05 Problem Detection
05 Problem Detection05 Problem Detection
05 Problem Detection
 
History Analysis (EVO 2008)
History Analysis (EVO 2008)History Analysis (EVO 2008)
History Analysis (EVO 2008)
 
Modeling History to Understand Software Evolution with Hismo 2008-03-12
Modeling History to Understand Software Evolution with Hismo 2008-03-12Modeling History to Understand Software Evolution with Hismo 2008-03-12
Modeling History to Understand Software Evolution with Hismo 2008-03-12
 
Modeling History to Understand Software Evolution With Hismo 2008-02-25
Modeling History to Understand Software Evolution With Hismo 2008-02-25 Modeling History to Understand Software Evolution With Hismo 2008-02-25
Modeling History to Understand Software Evolution With Hismo 2008-02-25
 
Software understanding in the large (EVO 2008)
Software understanding in the large (EVO 2008)Software understanding in the large (EVO 2008)
Software understanding in the large (EVO 2008)
 
Humane assessment at ICSM 2010
Humane assessment at ICSM 2010Humane assessment at ICSM 2010
Humane assessment at ICSM 2010
 
Holistic software assessment at the University of Zurich
Holistic software assessment at the University of ZurichHolistic software assessment at the University of Zurich
Holistic software assessment at the University of Zurich
 
Software in Pictures 2008-03-12
Software in Pictures 2008-03-12Software in Pictures 2008-03-12
Software in Pictures 2008-03-12
 
Enhancing agile development through software assessment
Enhancing agile development through software assessmentEnhancing agile development through software assessment
Enhancing agile development through software assessment
 
What history can tell us
What history can tell usWhat history can tell us
What history can tell us
 
Reverse Engineering Techniques 2007-11-29
Reverse Engineering Techniques 2007-11-29 Reverse Engineering Techniques 2007-11-29
Reverse Engineering Techniques 2007-11-29
 
Migration and Testing (EVO 2008)
Migration and Testing (EVO 2008)Migration and Testing (EVO 2008)
Migration and Testing (EVO 2008)
 
A Moose Slideshow
A Moose SlideshowA Moose Slideshow
A Moose Slideshow
 
The humane software assessment (Choose Forum 2009)
The humane software assessment (Choose Forum 2009)The humane software assessment (Choose Forum 2009)
The humane software assessment (Choose Forum 2009)
 
Software Evolution
Software EvolutionSoftware Evolution
Software Evolution
 

More from Tudor Girba

More from Tudor Girba (20)

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalism
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
 
GT Spotter
GT SpotterGT Spotter
GT Spotter
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cards
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective Thinking
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks later
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development room
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading code
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systems
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaser
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Reverse Engineering 2007-11-27

  • 1. Introduction to reverse engineering Tudor Gîrba www.tudorgirba.com
  • 3. Reverse engineering is analyzing a subject system to: identify components and their relationships, and create more abstract representations. Chikofky & Cross, 90
  • 5. In 1944, 3 B-29 had to land in Russia
  • 8. TU-4 Result: 105,000 pieces reassembled in 2 years
  • 9. Why reverse engineer software systems?
  • 10. 1946
  • 11. 1956
  • 12. 1956
  • 13. 1956
  • 14. 1956 2006
  • 15. 1956 2006
  • 16. 1956 2006
  • 17. 1956 2006 ?
  • 18. Software is complex. 29% Succeeded 18% Failed 53% Challenged The Standish Group, 2004
  • 19. How large is your project?
  • 20. How large is your project? 1’000’000 lines of code
  • 21. How large is your project? 1’000’000 lines of code * 2 = 2’000’000 seconds
  • 22. How large is your project? 1’000’000 lines of code * 2 = 2’000’000 seconds / 3600 = 560 hours
  • 23. How large is your project? 1’000’000 lines of code * 2 = 2’000’000 seconds / 3600 = 560 hours / 8 = 70 days
  • 24. How large is your project? 1’000’000 lines of code * 2 = 2’000’000 seconds / 3600 = 560 hours / 8 = 70 days / 20 = 3 months
  • 25. How development happens fo rw ar d en gin ee rin g { { { { { { } { { } } actual development } } } { } } }
  • 26. Reengineering is needed to regain control fo rw g rin ar ee d gin en gin en ee se rin erv g re { { { { { { } { { } } program transformation } } } { } } }
  • 27. Reverse engineering is creating high level views g rin ee gin en se erv re { { { { } } } } { }
  • 28. Legacy a sum of money, or a specified article, given to another by will; anything handed down by an ancestor or predecessor. Oxford English Dictionary
  • 29. A legacy system is piece of software that you have inherited, and is valuable to you.
  • 30. Reverse engineering is creating high level views g rin ee gin en se erv re { { { { } } } } { }
  • 31. Setting direction First contact g rin ee gin Initial understanding en se Detailed model capture erv re
  • 32. What is a pattern?
  • 33. Setting direction g First contact rin ee gin Initial understanding en se er Detailed model capture v re
  • 34. You got to be careful if you don't know where you're going, because you might not get there. Yogi Berra
  • 35. Setting direction patterns Set Where direction to start Agree Most valuable on maxims first Maintain Coordinate What not What direction direction to do to do Appoint Speak to the If it ain’t broke Fix problems a navigator round table don’t fix it not symptoms How to do Keep it simple
  • 36. Setting direction First contact g rin ee gin Initial understanding en se er Detailed model capture v re
  • 37. First contact patterns Talk with Talk with developers users Talk Chat with Interview about it maintainers during demo Verify what Read Read about Compile you hear the code the code the code Read all code Skim Do a mock in one hour documentation installation
  • 38. Interview Chat during demo with maintainers What is the usage? What is the history? Users complain Developers Users are enthusiastic protect their job Who to choose? What to ask?
  • 39. Interview Chat during demo with maintainers What is the usage? What is the history? Users complain Developers Users are enthusiastic protect their job Who to choose? What to ask? Remember, they are all humans :)
  • 40. What to ask a maintainer? How long was your project going on? Who worked on the project? What was the most interesting bug you had to fix? Why was the reengineering effort started? How do you release? How do you plan what to do? How do you test?
  • 41. Read all code in one hour
  • 42. Read all code in one hour
  • 43. Read all code in one hour I took a course in speed reading and read “War and Peace” in twenty minutes. It’s about Russia. Woody Allen
  • 44. How large is your project? 1’000’000 lines of code * 2 = 2’000’000 seconds / 3600 = 560 hours / 8 = 70 days / 20 = 3 months
  • 45. Why read all code in one hour?
  • 46. Setting direction First contact g rin ee gin Initial understanding en se er Detailed model capture v re
  • 47. Initial understanding patterns Top down Recover design Speculate about design Iteration Analyze Study persistent data exceptional entities Recover Identify database problems Bottom up
  • 50. Speculate about design Layout Abstract Item Graph Node Edge
  • 51. Setting direction First contact g rin ee gin Initial understanding en se Detailed model capture erv re
  • 52. Detailed model capture patterns Tie code and questions Track your Expose understanding design Refactor to understand Expose Encode collaborations assumptions Step through Write tests execution to understand Expose contracts Expose evolution Look for Learn from the contracts the past
  • 53. Why refactor? To understand
  • 54. Write tests to understand and to ensure later refactorings
  • 55.
  • 56. Example: Visualization does not guarantee understanding
  • 58. Setting direction First contact g rin ee gin Initial understanding en se Detailed model capture erv re
  • 59. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/