being effective with legacy projects
TRANSCRIPT
![Page 1: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/1.jpg)
Being effective
with legacy projectsKonstantin Kudryashov | @everzet
![Page 2: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/2.jpg)
What are the two hardest problems in
software development?
![Page 3: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/3.jpg)
What are the two hardest problems in software development?
1. Order of arguments in string and array functions
2. Which line do you put an opening bracket on
![Page 4: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/4.jpg)
What is a good software design?
![Page 5: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/5.jpg)
A software design is contextual to the people that use and
produce it
![Page 6: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/6.jpg)
A good design is a design that supports
people interacting with it
![Page 7: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/7.jpg)
Any design is a good design in a system that nobody uses or
develops
![Page 8: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/8.jpg)
What are the two hardest problems in software development?
1. Making sure users keep using it
2. Making sure developers keep developing it
![Page 9: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/9.jpg)
Legacy
![Page 10: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/10.jpg)
Technical debt
![Page 11: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/11.jpg)
3 analogies
![Page 12: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/12.jpg)
Restaurant kitchen
![Page 13: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/13.jpg)
Tetris
![Page 14: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/14.jpg)
Broken windows theory
![Page 15: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/15.jpg)
How do we get a legacy problem?
![Page 16: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/16.jpg)
How do we get a legacy problem?
1. Users want the software to change
2. Developers want to change the software
3. Constantly
![Page 17: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/17.jpg)
Legacy is a side-effect of a constant use and
adaptation
![Page 18: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/18.jpg)
In other words...
![Page 19: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/19.jpg)
![Page 20: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/20.jpg)
![Page 21: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/21.jpg)
![Page 22: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/22.jpg)
The system without a legacy problem is the system that is not actively used
![Page 23: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/23.jpg)
Every mature business has a legacy problem
![Page 24: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/24.jpg)
Greenfield does not exist in universes where Excel is invented
1paraphrasing Alberto Brandolini
![Page 25: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/25.jpg)
Taking control of legacy
![Page 26: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/26.jpg)
A technical problem
![Page 27: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/27.jpg)
How do we get a legacy problem?
1. Users want the software to change
2. Developers want to change the software
3. Constantly
![Page 28: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/28.jpg)
People want change
![Page 29: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/29.jpg)
A technical problem
![Page 30: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/30.jpg)
Legacy is a human, not a technology
problem
![Page 31: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/31.jpg)
You don't deal with legacy by rewriting your software
![Page 32: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/32.jpg)
You deal with legacy by rewriting your
collaboration
![Page 33: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/33.jpg)
Deliberate Discovery
![Page 34: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/34.jpg)
Dealing with legacy in 6 steps
1. Technology Context
2. Business Context
3. Constraints
4. Risk Areas
5. Changing the way we change the software
6. Separating commodity logic from domain logic
![Page 35: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/35.jpg)
Step 1Technology Context
![Page 36: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/36.jpg)
Visualise the insight
![Page 37: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/37.jpg)
![Page 38: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/38.jpg)
Step 2Business Context
![Page 39: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/39.jpg)
Get access to analytics and business monitoring tools
![Page 40: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/40.jpg)
People controlling data are the people controlling the
direction of change
![Page 41: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/41.jpg)
Get access to stakeholders
![Page 42: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/42.jpg)
![Page 43: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/43.jpg)
Step 3Constraints
![Page 44: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/44.jpg)
Sit with operators
![Page 45: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/45.jpg)
Analyse customers and their journeys
![Page 46: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/46.jpg)
Research the bug tracker
![Page 47: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/47.jpg)
Step 4Map Risk Areas
![Page 48: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/48.jpg)
Highlight risk areas on the map using discovered
4 Real Data
4 Business Objectives
4 Usage Constraints
4 Technical Constraints
4 Bugs
![Page 49: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/49.jpg)
Step 5Change the way we change the
software
![Page 50: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/50.jpg)
"We must return products back to
stock during refund"
![Page 51: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/51.jpg)
5.1: Categorise the change
1. Is it a mission-critical change?
2. Is it a change in a mission-critical area?
3. Will this change affect any area of risk?
![Page 52: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/52.jpg)
5.2: Discover the current behaviour
1. What does this thing do?
2. What if it suddenly stops doing it?
3. How would you know if it doesn't work?
4. How would you know if it does?
![Page 53: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/53.jpg)
Feature: Returned items go back to stock In order to keep track of stock As a store owner I want to add items back to stock when they are returned
Scenario: Refunded items are returned to stock
Scenario: Replaced items are not returned to stock
![Page 54: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/54.jpg)
Feature: Returned items go back to stock In order to keep track of stock As a store owner I want to add items back to stock when they are returned
Scenario: Refunded items are returned to stock
Scenario: Replaced items are not returned to stock
@legacy Scenario: Item refunded with in-shop credits
@legacy Scenario: Item refunded to bank account
@legacy Scenario: Item refunded to PayPal account
![Page 55: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/55.jpg)
5.3: Protect the current behaviour
1. Cover @legacy behaviour in an end-to-end fashion
2. Make sure that scenarios are green
3. Refactor code to make isolated system-testing possible
4. Convert scenarios to isolated system-tests
5. Remove @legacy tag
![Page 56: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/56.jpg)
5.4: Make the change
1. Automate the new scenarios as isolated system-tests
2. Push the logic down to the unit level with unit-tests
3. Make unit-tests green
4. Make scenarios green
![Page 57: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/57.jpg)
![Page 58: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/58.jpg)
Step 6Separate commodity logic from
domain logic
![Page 59: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/59.jpg)
Separate commodity logic from domain logic
4 Not every sub-system needs to change
4 Different sub-systems will change at different cadence
4 The more aligned our changes are to our objectives, the smaller they would be
![Page 60: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/60.jpg)
Rewrites are rarely effective, because businesses rarely want to change the entire system
![Page 61: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/61.jpg)
A full-system rewrite is an admission of
defeat
![Page 62: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/62.jpg)
We're not stuck with unsustainable codebase
![Page 63: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/63.jpg)
We're stuck with unsustainable approach to it
![Page 64: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/64.jpg)
If we stop running from legacy as if it was a plague...
![Page 65: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/65.jpg)
... and start looking at it as a normal
phase in a system life
![Page 66: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/66.jpg)
Everything that is possible in greenfield becomes possible in
legacy
![Page 67: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/67.jpg)
![Page 68: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/68.jpg)
Behaviour Driven Development
![Page 69: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/69.jpg)
Behaviour Driven Development
in legacy
![Page 70: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/70.jpg)
Being effective
with legacy projects
![Page 71: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/71.jpg)
Delivering outcomes, not software
![Page 72: Being effective with legacy projects](https://reader036.vdocuments.site/reader036/viewer/2022062412/5870df5a1a28abcf288b4607/html5/thumbnails/72.jpg)
4 Rate talk: https://joind.in/talk/6b377
4 Join us: http://bit.ly/inviqa-careers
4 Get help: http://bit.ly/inviqa-contact