Legacycodeisfearadibolboaca 141120063356-conversion-gate01

download Legacycodeisfearadibolboaca 141120063356-conversion-gate01

If you can't read please download the document

description

CodeCampIasi25Oct2014

Transcript of Legacycodeisfearadibolboaca 141120063356-conversion-gate01

  • 1. Legacy Code is Fearwww.mozaicworks.com

2. MeAdi BolboacProgrammerOrganizational & TechnicalTrainer & Coach www.mozaicworks.com 3. Legacy code scenarioCurrent situation vs Better situationNot knowing what the actual code doesVsGradually understanding the code andchanging it to the minimumwww.mozaicworks.com 4. Legacy code scenarioReasons why to change existing code:Fix a bugAdd a featureHave automated tests for the system corewww.mozaicworks.com 5. Legacy code scenarioReasons why not to change existingcode:It looks uglyI would like to see nicer codeI want to update to newest framework...www.mozaicworks.com 6. Current situationYou need to add some featuresto an existing old project www.mozaicworks.com 7. Current situationThey tell you that you have a veryshort time to do it www.mozaicworks.com 8. Current situationYou are afraid to change thesystem www.mozaicworks.com 9. Current situationThe time feels waaaaay to shortwww.mozaicworks.com 10. Current situationAnd you tell your manager: Icannot do itwww.mozaicworks.com 11. Current situationBut the manager says...www.mozaicworks.com 12. Current situationIt takes double the time you saidwww.mozaicworks.com 13. Current situationYour company loses money.Your customer loses money. www.mozaicworks.com 14. Current situationEveryone is stressedwww.mozaicworks.com 15. Better situationSomeone signs a contract to addsome features to an existing oldproject www.mozaicworks.com 16. Better situationYour team starts writingcharacterization tests tounderstand the change www.mozaicworks.com 17. Better situationYour team writes end-to-endtests to understand the externaldependencieswww.mozaicworks.com 18. Better situationYour team splits the end-to-endtests into integration tests andunit testswww.mozaicworks.com 19. Better situationYour team starts adding more unittests around the area that needsto be modifiedwww.mozaicworks.com 20. Better situationEvery member of the team is usingthe refactoring skills to improvethe designwww.mozaicworks.com 21. Better situationYour team adds the new feature.It is fully test automated.www.mozaicworks.com 22. Better situationYour testers make the finalexploratory and manual testswww.mozaicworks.com 23. Better situationThe team delivers on time.www.mozaicworks.com 24. Better situationYour company wins money andrespect from your customer.Your customer wins money and hastrust in you.www.mozaicworks.com 25. The problem: Legacy code is fearOur unknowns are making us afraidAutomating tests minimizes the unknownsBy automating tests we can increaseconfidencewww.mozaicworks.com 26. Very niceBut how to do this?www.mozaicworks.com 27. Find the known unknowns of theteamTalk with the teamFind what they do not know: domainknowledge, programming languages, unittesting, acceptance testing, frameworks,etcwww.mozaicworks.com 28. Make small scale experimentsUse a smaller problem at firstLearn how to write charaterization testsfor that problemUse coding dojos and mob programmingto practice togetherwww.mozaicworks.com 29. The littany against fearI 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 tosee its path.Where the fear has gone there will be nothing.... only Iwill remainDune by Frank Herbertwww.mozaicworks.com 30. Solve the legacy code fear: investInvest in the future business agility of yourcompanywww.mozaicworks.com 31. Solve the legacy code fear: learnFind the unknowns of the teamMake a medium-term learning programMake small scale experimentsLearnExtend to bigger scale experimentsLearnDo a small change request in productionLearnwww.mozaicworks.com 32. What's next?Read the Working Effectively with Legacycode book by Michael FeathersFind a good trainer to help the team learnBuild learning program with team&trainerLearn from each experiencewww.mozaicworks.com 33. Questions?www.mozaicworks.com 34. Thank you!Working Fast and SAFE with Existing Product InceptionCode retreatwww.mozaicworks.comSee the slides athttp://www.slideshare.net/adibolb 35. Extend your mentoring & trainingcapacityAccelerate learning throughcommunities of practiceGrow your functional leaders and toptalentshttp://[email protected]@adibolb 36. Referenceshttp://upload.wikimedia.org/wikipedia/commons/7/7f/Snake_warning_sign.jpghttp://upload.wikimedia.org/wikipedia/commons/4/44/CatLolCatExample.jpghttp://upload.wikimedia.org/wikipedia/commons/8/88/I_IZ_SERIUS_ADMNIM_THIZ_IZ_SERIUS_BIZNIS_lolcat.jpghttp://pixabay.com/p-160097/?no_redirecthttp://www.damemagazine.com/sites/default/files/styles/feature_wide/public/field/image/biological-clock.jpg?itok=http://fc01.deviantart.net/fs71/i/2012/149/6/9/no__9gag__by_hujikari-d51hu4l.jpghttp://upload.wikimedia.org/wikipedia/commons/1/12/We_Can_Do_It!.jpghttp://upload.wikimedia.org/wikipedia/commons/2/25/Dive_hand_signal_Descend.pnghttp://pixabay.com/go/?t=/static/uploads/photo/2012/04/18/13/01/sign-36968_150.png%3Fattachmenthttp://pixabay.com/static/uploads/photo/2014/06/03/19/38/plate-361516_640.jpghttp://upload.wikimedia.org/wikipedia/commons/0/0c/Dive_hand_signal_OK_1.pngwww.mozaicworks.com