SlideShare a Scribd company logo
1 of 31
Download to read offline
Inheriting Code
                            Anthony Eden




Tuesday, June 8, 2010
Who are you?




Tuesday, June 8, 2010
Explorer



Tuesday, June 8, 2010

You’ll need to be willing to travel down uncharted paths and create a map to find your way
out.
Historian



Tuesday, June 8, 2010

You’ll need to understand what got the code here.
Forensic Analyst



Tuesday, June 8, 2010

You’ll need to understand the motives by looking at the crime scene.
Psychic



Tuesday, June 8, 2010

You’ll need to read minds.
Sadist



Tuesday, June 8, 2010

You’ll need to be able to hurt the code.
Masochist
Tuesday, June 8, 2010

You’ll need to be able to withstand the pain that the code causes you.
Prepare



Tuesday, June 8, 2010

Adjust your mode of thinking.
Assume
                        nothing



Tuesday, June 8, 2010
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.
Learn



Tuesday, June 8, 2010
Read

Tuesday, June 8, 2010

Read the code
Read the documentation
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?
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?
Act



Tuesday, June 8, 2010
Resolve Dependencies
Tuesday, June 8, 2010
Run the test suite



Tuesday, June 8, 2010
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.
Simplify complex code




Tuesday, June 8, 2010

When a test is written you can refactor it.
Reduce




Tuesday, June 8, 2010

Reduce the amount of code.
Remove unused methods and classes.
Version control is your friend.
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.
Make small
         changes




Tuesday, June 8, 2010

Small changes are easier to fix.
Small changes are easier to undo.
Compartmentalize
Tuesday, June 8, 2010

Break down monolithic code into smaller chunks.
Break down large features into smaller ones.
Protect
                                               the
                                              data


Tuesday, June 8, 2010

Along with code you’ll be inheriting data.
Write for maintainability
Tuesday, June 8, 2010

New features are always tested.
Follow conventions




Tuesday, June 8, 2010

Rails conventions are your friend.
Deploy Early,
     Deploy Often




Tuesday, June 8, 2010
Build a
          better
          legacy


Tuesday, June 8, 2010
Share knowledge




Tuesday, June 8, 2010

Pairing helps tremendously here
Perform code reviews
http://www.flickr.com/photos/natedreger/4272271989/
                              http://www.flickr.com/photos/atelier_tee/212176187/
                                http://www.flickr.com/photos/h-k-d/3617751660/
                              http://www.flickr.com/photos/vogelium/2623770180/
                          http://www.flickr.com/photos/9619972@N08/2636808004/
                            http://www.flickr.com/photos/emeraldrose/3587025487/
                              http://www.flickr.com/photos/mcgraths/3248483447/
                          http://www.flickr.com/photos/inhalingsounds/4444522392/
                            http://www.flickr.com/photos/rossinabossio/289756071/
                                 http://www.flickr.com/photos/wili/2628869994/
                           http://www.flickr.com/photos/fofurasfelinas/2549402702/
                             http://www.flickr.com/photos/ironrodart/4154904299/
                              http://www.flickr.com/photos/myrmician/228790898/
                         http://www.flickr.com/photos/29487767@N02/3644730871/
                            http://www.flickr.com/photos/teacherafael/2038442136/
                               http://www.flickr.com/photos/gamene/4015192611/
                        http://www.flickr.com/photos/shewatchedthesky/2835193235/
                               http://www.flickr.com/photos/myreflex/180524429/
                                 http://www.flickr.com/photos/tzofia/202684786/
                          http://www.flickr.com/photos/capedcrusader/3713232485/
                                 http://www.flickr.com/photos/jaxxon/93296381/
                                  http://www.flickr.com/photos/jbird/19650368/
                             http://www.flickr.com/photos/joeharper/3872936498/
                           http://www.flickr.com/photos/bassclarinetist/4448830860/
                        http://www.flickr.com/photos/winterofdiscontent/3301816514/
                         http://www.flickr.com/photos/74274915@N00/3554610230/
                               http://www.flickr.com/photos/tal_axl/4297212753/
                                http://www.flickr.com/photos/essjay/2397379457/



Tuesday, June 8, 2010

More Related Content

Viewers also liked

Technical presen
Technical presenTechnical presen
Technical presenyuta090
 
Website validation
Website validationWebsite validation
Website validationmdabate
 
كتاب سلامة الاغذية للاطفال
كتاب سلامة الاغذية للاطفالكتاب سلامة الاغذية للاطفال
كتاب سلامة الاغذية للاطفالmansour dalgamouni
 
Meeting in Bulgaria - Troyan 24th may 2011
Meeting in Bulgaria - Troyan 24th may 2011Meeting in Bulgaria - Troyan 24th may 2011
Meeting in Bulgaria - Troyan 24th may 2011mary patta
 
Bow tie concepts training solutions
Bow tie concepts training solutionsBow tie concepts training solutions
Bow tie concepts training solutionsJ.K.M Nair
 

Viewers also liked (6)

Technical presen
Technical presenTechnical presen
Technical presen
 
Website validation
Website validationWebsite validation
Website validation
 
Gl sourcing
Gl sourcingGl sourcing
Gl sourcing
 
كتاب سلامة الاغذية للاطفال
كتاب سلامة الاغذية للاطفالكتاب سلامة الاغذية للاطفال
كتاب سلامة الاغذية للاطفال
 
Meeting in Bulgaria - Troyan 24th may 2011
Meeting in Bulgaria - Troyan 24th may 2011Meeting in Bulgaria - Troyan 24th may 2011
Meeting in Bulgaria - Troyan 24th may 2011
 
Bow tie concepts training solutions
Bow tie concepts training solutionsBow tie concepts training solutions
Bow tie concepts training solutions
 

Similar to Inheriting Code

What do we keep and what do we throw away?
What do we keep and what do we throw away?What do we keep and what do we throw away?
What do we keep and what do we throw away?Dean Shareski
 
IGNITE MySQL - Backups Don't Make Me Money
IGNITE MySQL - Backups Don't Make Me MoneyIGNITE MySQL - Backups Don't Make Me Money
IGNITE MySQL - Backups Don't Make Me Moneysarahnovotny
 
Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Skills Matter
 
What all that beta talk means for brands
What all that beta talk means for brandsWhat all that beta talk means for brands
What all that beta talk means for brandsAndy Whitlock
 
Findability in the Flow: Discovery through Linking
Findability in the Flow: Discovery through LinkingFindability in the Flow: Discovery through Linking
Findability in the Flow: Discovery through LinkingMark Matienzo
 
Mobile Strategy & Product Dev. - iRush
Mobile Strategy & Product Dev. - iRushMobile Strategy & Product Dev. - iRush
Mobile Strategy & Product Dev. - iRushAndrew Donoho
 
Rating system for determining whether to accept or reject objection raised by...
Rating system for determining whether to accept or reject objection raised by...Rating system for determining whether to accept or reject objection raised by...
Rating system for determining whether to accept or reject objection raised by...Tal Lavian Ph.D.
 
What Do We Keep and What Do We Throw Away
What Do We Keep and What Do We Throw AwayWhat Do We Keep and What Do We Throw Away
What Do We Keep and What Do We Throw AwayDean Shareski
 
User Experience and Agile Software Development
User Experience and Agile Software DevelopmentUser Experience and Agile Software Development
User Experience and Agile Software DevelopmentZee Spencer
 
Geniuses are made not born 2
Geniuses are made not born 2Geniuses are made not born 2
Geniuses are made not born 2Ahmed Soliman
 
Libraries + Semantic Web = ?
Libraries + Semantic Web = ?Libraries + Semantic Web = ?
Libraries + Semantic Web = ?Richard Wallis
 
5. fmp pre production
5. fmp pre production5. fmp pre production
5. fmp pre productionedan burrows
 
9.7 Things Every Programmer Should Know About User Experience
9.7 Things Every Programmer Should Know About User Experience9.7 Things Every Programmer Should Know About User Experience
9.7 Things Every Programmer Should Know About User ExperienceBurr Sutter
 
The Platypus Problem
The Platypus ProblemThe Platypus Problem
The Platypus ProblemJeff Eaton
 
Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...
Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...
Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...Victoria Schiffer
 
Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010Zi Bin Cheah
 
Growing and Fostering Software Craftsmanship
Growing and Fostering Software CraftsmanshipGrowing and Fostering Software Craftsmanship
Growing and Fostering Software CraftsmanshipCory Foy
 
Star Wars, SEO Mistakes, And Why Nothing Is Ever Your Fault
Star Wars, SEO Mistakes, And Why Nothing Is Ever Your FaultStar Wars, SEO Mistakes, And Why Nothing Is Ever Your Fault
Star Wars, SEO Mistakes, And Why Nothing Is Ever Your FaultWayne Barker
 

Similar to Inheriting Code (20)

HTML5 offline
HTML5 offlineHTML5 offline
HTML5 offline
 
What do we keep and what do we throw away?
What do we keep and what do we throw away?What do we keep and what do we throw away?
What do we keep and what do we throw away?
 
IGNITE MySQL - Backups Don't Make Me Money
IGNITE MySQL - Backups Don't Make Me MoneyIGNITE MySQL - Backups Don't Make Me Money
IGNITE MySQL - Backups Don't Make Me Money
 
Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06Html5 apps nikolaionken-08-06
Html5 apps nikolaionken-08-06
 
What all that beta talk means for brands
What all that beta talk means for brandsWhat all that beta talk means for brands
What all that beta talk means for brands
 
Findability in the Flow: Discovery through Linking
Findability in the Flow: Discovery through LinkingFindability in the Flow: Discovery through Linking
Findability in the Flow: Discovery through Linking
 
Mobile Strategy & Product Dev. - iRush
Mobile Strategy & Product Dev. - iRushMobile Strategy & Product Dev. - iRush
Mobile Strategy & Product Dev. - iRush
 
Rating system for determining whether to accept or reject objection raised by...
Rating system for determining whether to accept or reject objection raised by...Rating system for determining whether to accept or reject objection raised by...
Rating system for determining whether to accept or reject objection raised by...
 
What Do We Keep and What Do We Throw Away
What Do We Keep and What Do We Throw AwayWhat Do We Keep and What Do We Throw Away
What Do We Keep and What Do We Throw Away
 
User Experience and Agile Software Development
User Experience and Agile Software DevelopmentUser Experience and Agile Software Development
User Experience and Agile Software Development
 
Geniuses are made not born 2
Geniuses are made not born 2Geniuses are made not born 2
Geniuses are made not born 2
 
Facespot
FacespotFacespot
Facespot
 
Libraries + Semantic Web = ?
Libraries + Semantic Web = ?Libraries + Semantic Web = ?
Libraries + Semantic Web = ?
 
5. fmp pre production
5. fmp pre production5. fmp pre production
5. fmp pre production
 
9.7 Things Every Programmer Should Know About User Experience
9.7 Things Every Programmer Should Know About User Experience9.7 Things Every Programmer Should Know About User Experience
9.7 Things Every Programmer Should Know About User Experience
 
The Platypus Problem
The Platypus ProblemThe Platypus Problem
The Platypus Problem
 
Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...
Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...
Coaching for Life aka "Agile Coaching? Sure thing! What about Life Coaching i...
 
Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010Html5/CSS3 in shanghai 2010
Html5/CSS3 in shanghai 2010
 
Growing and Fostering Software Craftsmanship
Growing and Fostering Software CraftsmanshipGrowing and Fostering Software Craftsmanship
Growing and Fostering Software Craftsmanship
 
Star Wars, SEO Mistakes, And Why Nothing Is Ever Your Fault
Star Wars, SEO Mistakes, And Why Nothing Is Ever Your FaultStar Wars, SEO Mistakes, And Why Nothing Is Ever Your Fault
Star Wars, SEO Mistakes, And Why Nothing Is Ever Your Fault
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Inheriting Code

  • 1. Inheriting Code Anthony Eden Tuesday, June 8, 2010
  • 2. Who are you? Tuesday, June 8, 2010
  • 3. Explorer Tuesday, June 8, 2010 You’ll need to be willing to travel down uncharted paths and create a map to find your way out.
  • 4. Historian Tuesday, June 8, 2010 You’ll need to understand what got the code here.
  • 5. Forensic Analyst Tuesday, June 8, 2010 You’ll need to understand the motives by looking at the crime scene.
  • 6. Psychic Tuesday, June 8, 2010 You’ll need to read minds.
  • 7. Sadist Tuesday, June 8, 2010 You’ll need to be able to hurt the code.
  • 8. Masochist Tuesday, June 8, 2010 You’ll need to be able to withstand the pain that the code causes you.
  • 9. Prepare Tuesday, June 8, 2010 Adjust your mode of thinking.
  • 10. Assume nothing Tuesday, June 8, 2010
  • 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.
  • 13. Read Tuesday, June 8, 2010 Read the code Read the documentation
  • 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?
  • 18. Run the test suite Tuesday, June 8, 2010
  • 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.
  • 20. Simplify complex code Tuesday, June 8, 2010 When a test is written you can refactor it.
  • 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.
  • 24. Compartmentalize Tuesday, June 8, 2010 Break down monolithic code into smaller chunks. Break down large features into smaller ones.
  • 25. Protect the data Tuesday, June 8, 2010 Along with code you’ll be inheriting data.
  • 26. Write for maintainability Tuesday, June 8, 2010 New features are always tested.
  • 27. Follow conventions Tuesday, June 8, 2010 Rails conventions are your friend.
  • 28. Deploy Early, Deploy Often Tuesday, June 8, 2010
  • 29. Build a better legacy Tuesday, June 8, 2010
  • 30. Share knowledge Tuesday, June 8, 2010 Pairing helps tremendously here Perform code reviews
  • 31. http://www.flickr.com/photos/natedreger/4272271989/ http://www.flickr.com/photos/atelier_tee/212176187/ http://www.flickr.com/photos/h-k-d/3617751660/ http://www.flickr.com/photos/vogelium/2623770180/ http://www.flickr.com/photos/9619972@N08/2636808004/ http://www.flickr.com/photos/emeraldrose/3587025487/ http://www.flickr.com/photos/mcgraths/3248483447/ http://www.flickr.com/photos/inhalingsounds/4444522392/ http://www.flickr.com/photos/rossinabossio/289756071/ http://www.flickr.com/photos/wili/2628869994/ http://www.flickr.com/photos/fofurasfelinas/2549402702/ http://www.flickr.com/photos/ironrodart/4154904299/ http://www.flickr.com/photos/myrmician/228790898/ http://www.flickr.com/photos/29487767@N02/3644730871/ http://www.flickr.com/photos/teacherafael/2038442136/ http://www.flickr.com/photos/gamene/4015192611/ http://www.flickr.com/photos/shewatchedthesky/2835193235/ http://www.flickr.com/photos/myreflex/180524429/ http://www.flickr.com/photos/tzofia/202684786/ http://www.flickr.com/photos/capedcrusader/3713232485/ http://www.flickr.com/photos/jaxxon/93296381/ http://www.flickr.com/photos/jbird/19650368/ http://www.flickr.com/photos/joeharper/3872936498/ http://www.flickr.com/photos/bassclarinetist/4448830860/ http://www.flickr.com/photos/winterofdiscontent/3301816514/ http://www.flickr.com/photos/74274915@N00/3554610230/ http://www.flickr.com/photos/tal_axl/4297212753/ http://www.flickr.com/photos/essjay/2397379457/ Tuesday, June 8, 2010