2. Me
Adi Bolboacă
Programmer
Organizational & Technical
Trainer & Coach www.mozaicworks.com
3. Legacy code scenario
Current situation vs Better situation
Not knowing what the actual code does
Vs
Gradually understanding the code and
changing it to the minimum
www.mozaicworks.com
4. Legacy code scenario
Reasons why to change existing code:
Fix a bug
Add a feature
Have automated tests for the system core
www.mozaicworks.com
5. Legacy code scenario
Reasons why not to change existing
code:
It looks ugly
I would like to see nicer code
I want to update to newest framework
...
www.mozaicworks.com
6. Current situation
You need to add some features
to an existing old project www.mozaicworks.com
7. Current situation
They tell you that you have a very
short time to do it www.mozaicworks.com
24. Better situation
Your company wins money and
respect from your customer.
Your customer wins money and has
trust in you.
www.mozaicworks.com
25. The problem: Legacy code is fear
Our unknowns are making us afraid
Automating tests minimizes the unknowns
By automating tests we can increase
confidence
www.mozaicworks.com
27. Find the known unknowns of the
team
Talk with the team
Find what they do not know: domain
knowledge, programming languages, unit
testing, acceptance testing, frameworks,
etc
www.mozaicworks.com
28. Make small scale experiments
Use a smaller problem at first
Learn how to write charaterization tests
for that problem
Use coding dojos and mob programming
to practice together
www.mozaicworks.com
29. The littany against fear
I must not fear.
Fear is the mind-killer.
Fear is the little-death that brings total obliteration.
I will face my fear.
I will permit it to pass over me and through me.
And when it has gone past I will turn the inner eye to
see its path.
Where the fear has gone there will be nothing.... only I
will remain
Dune by Frank Herbert
www.mozaicworks.com
30. Solve the legacy code fear: invest
Invest in the future business agility of your
company
www.mozaicworks.com
31. Solve the legacy code fear: learn
Find the unknowns of the team
Make a medium-term learning program
Make small scale experiments
Learn
Extend to bigger scale experiments
Learn
Do a small change request in production
Learn
www.mozaicworks.com
32. What's next?
Read the Working Effectively with Legacy
code book by Michael Feathers
Find a good trainer to help the team learn
Build learning program with team&trainer
Learn from each experience
www.mozaicworks.com
34. Thank you!
Working Fast and SAFE with Existing Product Inception
Code retreat
www.mozaicworks.com
See the slides at
http://www.slideshare.net/adibolb
35. Extend your mentoring & training
capacity
Accelerate learning through
communities of practice
Grow your functional leaders and top
talents
http://www.mozaicworks.com
adrian.bolboaca@mozaicworks.com
@adibolb