THE PATH
THROUGH LEGACY
DELICATE BALANCE BETWEEN TOLERANCE AND PHOBIA
MAXIM NAM
Head of Frontend Development�Tele2 Kazakhstan/Altel Digital
OUR PROJECTS
OUR PROJECTS
4 main �mobile apps
OUR PROJECTS
10+ web apps
4 main �mobile apps
OUR PROJECTS
150+ microservices
4 main �mobile apps
10+ web apps
Ancient architecture?
PROLOGUE. LEGACY TODAY
Board �game saves?
PROLOGUE. LEGACY TODAY
3-year old �react project?
PROLOGUE. LEGACY TODAY
WHAT IS LEGACY CODE?
- Old code?
- Nope.
WHAT IS LEGACY CODE?
”WHY" we write code �that might end up as legacy?
WHAT IS LEGACY CODE?
Black box�&
Difficult �to extend
CHARACTERISTICS
No documentation
CHARACTERISTICS
- Black box;
- Difficult to extend;
CHARACTERISTICS
Deprecated packages/entire technology
&
Self-written unnecessary dependencies
- Black box;
- Difficult to extend;
- No documentation;
- Black box;
- Difficult to extend;
- No documentation;
- Deprecated packages/entire technology;
- Self-written unnecessary dependencies;
CHARACTERISTICS
No testing infrastructure�&�No standards at all
The answer is outside of the actual coding process and implementation aspect.
THE ANSWER OF ”WHY?”
THE ANSWER OF ”WHY?”
The answer is outside of the actual coding process and implementation aspect.
↓
Business side of things.
THE ANSWER OF ”WHY?”
The answer is outside of the actual coding process and implementation aspect.
↓
Business side of things.
↓
Write it fast and revisit later.
THE ANSWER OF ”WHY?”
The answer is outside of the actual coding process and implementation aspect.
↓
Business side of things.
↓
Write it fast and revisit later.
↓
The key is acknowledging the problem in time.
The old code might look ugly messy, but it works.
It is hard to read code and understand so we have the impulse to completely avoid it.
Preparation:
- Understanding of previous business logic and edge;
- Reading documentation.
CHAPTER 1: �REFACTOR VS REWRITE
All developers agree but few do.
Antipatterns:
- Keep everything in your head, hoping you remember someday;
- Let’s write a novel approach just for the sake of writing.
Explaining how and why in your repository documentation may be goal.
CHAPTER 2: DOCUMENTATION
All developers agree but few do.
Antipatterns:
- Keep everything in your head, hoping you remember someday;
- Let’s write a novel approach just for the sake of writing.
Explaining how and why in your repository documentation may be goal.
CHAPTER 2: DOCUMENTATION
All developers agree but few do.
Antipatterns:
- Keep everything in your head, hoping you remember someday;
- Let’s write a novel approach just for the sake of writing.
Explaining how and why in your repository documentation may be goal.
CHAPTER 2: DOCUMENTATION
A PIECE OF CODE MIGHT WORK BUT IT IS DEAD NOT USEFUL ENOUGH IF YOU CAN’T EXTEND IT.
CHAPTER 3: EXTENDIBILITY
Our codebase
CHAPTER 3: EXTENDIBILITY
A piece of code might work but it is dead not useful enough if you can’t extend it.
CODE ISOLATION IS NOT A PERMANENT SOLUTION.
Our codebase
CHAPTER 3: EXTENDIBILITY
Our codebase
A piece of code might work but it is dead not useful enough if you can’t extend it.
Code isolation is not a permanent solution.
HARD-TO-DELETE CODE DRIVES OUT EASY-TO-DELETE CODE OVER TIME.
The code you write today is old code by tomorrow
CHAPTER 4: PRACTICAL IMPLEMENTATION
- The code you write today is old code by tomorrow;
CHAPTER 4: PRACTICAL IMPLEMENTATION
How we write code and with what intention
- The code you write today is old code by tomorrow;
- How we write code and with what intention;
CHAPTER 4: PRACTICAL IMPLEMENTATION
We want to help future developers not to struggle with our codebase
- The code you write today is old code by tomorrow;
- How we write code and with what intention;
- We want to help future developers not to struggle with our codebase;
CHAPTER 4: PRACTICAL IMPLEMENTATION
It’s easier to fix code that is repeated than code that is abstracted in the wrong way
- The code you write today is old code by tomorrow;
- How we write code and with what intention;
- We want to help future developers not to struggle with our codebase;
- It’s easier to fix code that is repeated than code that is abstracted in the wrong way;
CHAPTER 4: PRACTICAL IMPLEMENTATION
Testing infrastructure
GENERAL TEST: �Anyone in your team can make changes throughout the codebase, newcomers can at least navigate.
�HEALTHY SIGN: �Your codebase doesn’t depend on one single person.
ETHICAL ASPECT: �Detatch your ego from the code.
CHAPTER 5: �AFTER EFFECT
Do not expect quick results
EPILOGUE
Incremental progress is key
EPILOGUE
- Do not expect quick results;
Well-documented updates
EPILOGUE
- Do not expect quick results;
- Incremental progress is key;
Focus on refactoring
EPILOGUE
- Do not expect quick results;
- Incremental progress is key;
- Well-documented updates;
Don’t attach yourself �to particular codebase
EPILOGUE
- Do not expect quick results;
- Incremental progress is key;
- Well-documented updates;
- Focus on refactoring;
Thx! See you!
Changing the rules, expanding opportunities
Technological like you
MAXIM NAM
Head of Frontend Development�Tele2 Kazakhstan/Altel Digital