• Save
Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconference 2013, Bucharest
Upcoming SlideShare
Loading in...5
×
 

Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconference 2013, Bucharest

on

  • 3,482 views

Check out the video of the presentation: http://www.youtube.com/watch?v=WpKb1XqSiUs

Check out the video of the presentation: http://www.youtube.com/watch?v=WpKb1XqSiUs

Statistics

Views

Total Views
3,482
Views on SlideShare
810
Embed Views
2,672

Actions

Likes
0
Downloads
0
Comments
0

9 Embeds 2,672

http://2013.itakeunconf.com 1185
http://laurent.bristiel.com 836
http://itakeunconf.com 632
http://2014.itakeunconf.com 12
http://www.365dailyjournal.com 3
http://feedly.com 1
http://webcache.googleusercontent.com 1
http://translate.googleusercontent.com 1
http://www.feedspot.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

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

Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconference 2013, Bucharest Sandro Mancuso – Testing and refactoring legacy code @ I T.A.K.E. Unconference 2013, Bucharest Presentation Transcript

  • Testing and Refactoring Legacy Code Sandro Mancuso @sandromancuso craftedsw.blogspot.com
  • What is this session about?
  • Business Requirements Imagine a social networking website for travellers • You need to be logged in to see the content • You need to be a friend to see someone else’s trips
  • Legacy Code Rules • You cannot change production code if not covered by tests – Just automated refactoring (via IDE) is allowed, in case it is needed for writing a test
  • Show me the code
  • Start refactoring from deepest to shortest branch Start testing from shortest to deepest branch Working with Legacy Code Tips
  • Trip Service - Problems TripService +findTripsByUser(User) : List<Trip> <<Singleton>> UserSession +getInstance() : UserSession +getLoggedUser() : User TripDAO +findTripsByUser(User) : List<Trip>
  • Let’s write some code
  • Start refactoring from deepest to shortest branch Start testing from shortest to deepest branch Working with Legacy Code Tips
  • Craftsmen at work • Write readable and maintainable code and tests – Code must express business rules • Strive for simplicity • Know your tools well (i.e. frameworks, shortcuts) • Work in small and safe increments – Commit often • Embrace changes, be brave • Boy scout rule / No broken windows
  • Thanks Sandro Mancuso @sandromancuso craftedsw.blogspot.com https://github.com/sandromancuso/trip-service-kata leanpub.com/socra