It is inevitable that at some point in your career as a developer you will inherit code developed by others. Trying to understand code developed by someone else can often lead to stress and frustration, but it doesn't have to. This talk will provide you with tools and techniques to help understand and begin working with code from other developers quickly and easily.
11. You are not smarter,
just different
Tuesday, June 8, 2010
Put yourself in the mind of the author.
Keep an open mind about implementations that are different from how you might do it.
Understand why they may have written code in the way they did.
14. Cause and Effect
Tuesday, June 8, 2010
What were the business needs that caused this code to be written?
What other factors were present when the code was written?
15. Find the dragons
Tuesday, June 8, 2010
What code was written to solve an immediate problem, but never refactored?
What code was written to old APIs?
What code was written in different styles by different developers?
19. Write tests where
there are none
Tuesday, June 8, 2010
Top down approach with Cucumber.
Bottom up approach with RSpec, Shoulda or plain Test::Unit.
If tests are already written then start
Regardless you’ll need both.
21. Reduce
Tuesday, June 8, 2010
Reduce the amount of code.
Remove unused methods and classes.
Version control is your friend.
22. Have a rollback strategy
Tuesday, June 8, 2010
You will misunderstand the purpose of some of the code.
Be able to rollback easily.
Version control is essential.
Make small changes.
23. Make small
changes
Tuesday, June 8, 2010
Small changes are easier to fix.
Small changes are easier to undo.