Ebay legacy-code-retreat
Upcoming SlideShare
Loading in...5
×
 

Ebay legacy-code-retreat

on

  • 2,759 views

 

Statistics

Views

Total Views
2,759
Views on SlideShare
2,750
Embed Views
9

Actions

Likes
0
Downloads
3
Comments
0

1 Embed 9

http://www.linkedin.com 9

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ebay legacy-code-retreat Ebay legacy-code-retreat Presentation Transcript

  • Refactoring by example Konrad Malawski kmalawski@ebay.com @ the sprinters
  • Refactoring to Patterns • Internally available for free on safari: 
 http://techbus.safaribooksonline.com/book/ software-engineering-and-development/refactoring/ 0321213351/advance-praise-for-refactoring-topatterns/i?query=((Refactoring+to +Patterns))#snippet
  • Legacy Code Retreat • We’ll use an existing codebase • Try to understand it • Apply automatic refactorings • Test it
  • Legacy Code Retreat • github / kmalawski / legacy-code-retreat-java • git clone git@github.scm.corp.ebay.com:kmalawski/legacycode-retreat-java.git
  • Popular refactorings • Extract Method • Introduce Variable / Field / Constant / Parameter • iNline • Pull Up / Push Down • Introduce Interface • Move Class / Move Instance Method (F6)
  • Popular refactorings • Rename (Shift F6) • Extract Interface / Class • Introduce Parameter Object • Introduce delegate • Introduce “null object” / Optional / Option
  • Popular refactorings • Dependency Injection (NOT THE FRAMEWORK ”X”) • Introduce Adapter • Replace Conditionals with Strategy • Remove “Primitive Obsession” • Generify
  • When you’re not sure • F2 - go to next error / warning • Meta Shift A - grep all commands • Alt Enter - act on hints • Ctrl T - “refactor this”
  • Legacy Code Retreat • 10: 25 min coding • 20: 5 min retro • 30: goto 10