0
Fighting code smells
Patterns to keep your code DRY
Code smells
• Warning signs in the code which indicate
weaknesses in design.
=> slow down development and increase risk of...
Code smells
• Duplicated Code
Code smells
• Long Method
Code smells
• Feature Envy
Code smells
• Data clumps
Code smells
• Message chains
Code smells
• Divergent change
Refactoring Patterns
• Extract Method
• Pull up Method
• Form Template Method
• Replace Method with Method Object
• Extrac...
Refactoring Patterns
• Demo: http://goo.gl/zpouEN
Read more…
• Refactoring: Improving Design of Existing Code - by
Martin Flower
• Refactoring: Ruby Edition - by Jay Fields...
About @Vinh Bachsy
• Author: Vinh Bachsy @: bsdvinhuit@gmail.com
• You can follow me at:
• https://plus.google.com/+VinhBa...
Upcoming SlideShare
Loading in...5
×

Fighting code smells

355

Published on

Follow us on :
Facebook: https://www.facebook.com/siliconstraitssaigon
Website: http://www.siliconstraits.vn/
Blog: http://blog.siliconstraits.vn/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
355
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Fighting code smells"

  1. 1. Fighting code smells Patterns to keep your code DRY
  2. 2. Code smells • Warning signs in the code which indicate weaknesses in design. => slow down development and increase risk of bugs in future.
  3. 3. Code smells • Duplicated Code
  4. 4. Code smells • Long Method
  5. 5. Code smells • Feature Envy
  6. 6. Code smells • Data clumps
  7. 7. Code smells • Message chains
  8. 8. Code smells • Divergent change
  9. 9. Refactoring Patterns • Extract Method • Pull up Method • Form Template Method • Replace Method with Method Object • Extract Class
  10. 10. Refactoring Patterns • Demo: http://goo.gl/zpouEN
  11. 11. Read more… • Refactoring: Improving Design of Existing Code - by Martin Flower • Refactoring: Ruby Edition - by Jay Fields, Shane Harvie, Martin Flower and Kent Beck • http://ghendry.net/refactor.html • http://sourcemaking.com/refactoring • Reek: Code smells detector - https://github.com/ troessner/reek
  12. 12. About @Vinh Bachsy • Author: Vinh Bachsy @: bsdvinhuit@gmail.com • You can follow me at: • https://plus.google.com/+VinhBachsy • https://www.facebook.com/vinh.bachsy • And the Saigon.rb Meetup: • http://www.meetup.com/saigon-rb/ • https://www.facebook.com/saigonrb
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×