Legacy code rehab.
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Legacy code rehab.

  • 346 views
Uploaded on

Presented at Chester Devs 06/02/2013

Presented at Chester Devs 06/02/2013

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
346
On Slideshare
343
From Embeds
3
Number of Embeds
1

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 3

https://twitter.com 3

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. L egacy Cod e : Rehab lanA Workshop with @johnnono
  • 2. Me● Spent a few years thinking about rewrites.● Not an expert/guru.● Written a load of crap.
  • 3. What is legacy?● Code without tests?● Old tech?● Not the latest thing?● Not invented here?
  • 4. Is lega cy so bad?Outside of software, how do we see legacy?
  • 5. getting aw ay with itTheres no Legacy is everywhere
  • 6. 2 choices Photo by John T PilotRebuild or Renovate
  • 7. Risks of R e-building● Estimates always wrong.● New bugs.● Secret knowledge in the code.● Lengthy code freeze.● Organisation needs to wait for new features.
  • 8. But Renovating?● The code is a mess.● You dont know where to start.● It has become poorly designed.● It is typically untested.
  • 9. Bot ch it then?● Just hack the change in.● Code will be worse.● Which leads to worse code.
  • 10. Right lets do it!● Scratch refactor● Tell the story of the system● Sketches● Characterization tests
  • 11. Cod e SampleTrivia Code basehttps://github.com/jbrains/trivia
  • 12. Scratch refactor● Start playing with the code.● Throw away the changes.
  • 13. Telling the story?● Just the essentials● Then move on to more granular bits● Rinse & repeat.
  • 14. Sketches● Feature sketches● Effect Sketches● Effect analysis
  • 15. C haracteriz ation tests● Fail● Pass● Sensing variables● Inheritance● change access modifier● Throwaway?
  • 16. New Feature
  • 17. Thanks● This session is all about understanding the impact of change.● Small safe steps.● Vices.
  • 18. Feedback Email : johnnonolan@gmail.com Twitter: @johnnonolan