Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Working with
legacy code
GUNNAR PEIPMAN, ASP.NET/IIS MVP
About me
 Name: Gunnar Peipman
 Job: Chief Everything Officer
 Company: Peipman Consult Ltd
 Hobbies: Coding, reading,...
Agenda
 What is legacy code and where it comes from?
 How to fight back?
 Tools and techniques
 Examples
 Questions a...
Essentials of legacy code
What is legacy code?
 The code we already released to users
 Code covered with no tests
 Messy code
LEGACY CODE
messyconfusing
bad dependencies
hard to read spaghetti
untestable
ugly
don‘t touch it
in production
undocument...
Where legacy code comes from?
 Death march projects
 Unskilled developers
 Impossible dead-lines
 Bleeding-edge techno...
Dynamics of legacy code
All problems happen every day with
small steps under our own eyes
War plan
How to fight back?
 Write readable code
 Write testable code
 Refactor
 Avoid hacks
 Look how others have solved simi...
Process for single developers
Find mess
Investigate
RefactorRedesign
Validate
Process for teams
Code
review
Detect
problems
Agree on
solutions
Redesign
code
Validate
Winning the battle
Refactoring
 Refactoring - making changes that doesn’t
change code functionality
 Different tools provided by IDE-s
Patterns
 Design patterns
 Unit testing patterns
 Analysis patterns
 Enterprise applications architecture patterns
 E...
Testing
 Unit tests
 Integration tests
 Stress tests
 Performance tests
 User Interface tests
 Database tests
 Acce...
Quality assurance
 Automated and manual testing
 Code reviews
 Paired programming
 Set up goals for developers
Examples
Thank you!
Q&A
Upcoming SlideShare
Loading in …5
×

Working with legacy code

2,140 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Working with legacy code

  1. 1. Working with legacy code GUNNAR PEIPMAN, ASP.NET/IIS MVP
  2. 2. About me  Name: Gunnar Peipman  Job: Chief Everything Officer  Company: Peipman Consult Ltd  Hobbies: Coding, reading, travelling, beers  In family: boyfriend, step father and father  Animals: white fluffy bunny  Me & MS: ASP.NET/IIS MVP, blogger, speaker  Community: ENETA (www.eneta.ee)  http://weblogs.asp.net/gunnarpeipman/  E-mail: me@gunnarpeipman.com
  3. 3. Agenda  What is legacy code and where it comes from?  How to fight back?  Tools and techniques  Examples  Questions and answers
  4. 4. Essentials of legacy code
  5. 5. What is legacy code?  The code we already released to users  Code covered with no tests  Messy code
  6. 6. LEGACY CODE messyconfusing bad dependencies hard to read spaghetti untestable ugly don‘t touch it in production undocumented tricky problematic just works
  7. 7. Where legacy code comes from?  Death march projects  Unskilled developers  Impossible dead-lines  Bleeding-edge technologies  Complex technologies  Silver-bullet tools  Digital slavery
  8. 8. Dynamics of legacy code All problems happen every day with small steps under our own eyes
  9. 9. War plan
  10. 10. How to fight back?  Write readable code  Write testable code  Refactor  Avoid hacks  Look how others have solved similar problems  Study different patterns  Improve your coding skills  If you find mess then clean it up
  11. 11. Process for single developers Find mess Investigate RefactorRedesign Validate
  12. 12. Process for teams Code review Detect problems Agree on solutions Redesign code Validate
  13. 13. Winning the battle
  14. 14. Refactoring  Refactoring - making changes that doesn’t change code functionality  Different tools provided by IDE-s
  15. 15. Patterns  Design patterns  Unit testing patterns  Analysis patterns  Enterprise applications architecture patterns  Enterprise integration patterns  SOA patterns  Universal data models
  16. 16. Testing  Unit tests  Integration tests  Stress tests  Performance tests  User Interface tests  Database tests  Acceptance tests  Tracer bullet tests
  17. 17. Quality assurance  Automated and manual testing  Code reviews  Paired programming  Set up goals for developers
  18. 18. Examples
  19. 19. Thank you!
  20. 20. Q&A

×