Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Code Smells and Refactoring

287 views

Published on

One of the main contributor to keeping business easy to respond to change is maintainable software. On the opposite, it is possible to cripple the business by creating unmaintainable software. Like a garden, the nature of software development tends to decay code that requires an increasing amount of time to understand the code than writing it. What can we do? This talk shares the impact of unmaintainable software and how to deal with it through the developer skill of code smells & refactoring.

Published in: Technology
  • Be the first to comment

Code Smells and Refactoring

  1. 1. Code Smells and Refactoring stanly@odd-e.com @stanlylau
  2. 2. Stanly Lau Lives in Singapore Software development coach / mentor Lead Agile Singapore community
  3. 3. I’m Stanly • Lives in Singapore • Agile coach, SW developer • Worked in small to large companies • Experienced in Insurance, Mobile Safety, Education, Logistics and Banking • Java, .Net, JavaScript, Objective-C
  4. 4. I’m Stanly • Lives in Singapore • Agile coach, SW developer • Worked in small to large companies • Experienced in Insurance, Mobile Safety, Education, Logistics and Banking • Java, .Net, JavaScript, Objective-C Agile Singapore 2016 Conference https://www.facebook.com/AgileSingapore
  5. 5. Martin Fowler Author of Refactoring, Enterprise Architecture Patterns and more… https://www.facebook.com/AgileSingapore
  6. 6. Software maintainability http://www.marketingfirepower.info/the-minefield-you-didn’t-know-you-were-in
  7. 7. Seeing system dynamics: Casual Loop Diagram bank balance earned interest Reinforcing loop feature velocity #defects Balancing loop
  8. 8. The nature of software development Learning this nature and dealing with it helps to increase flexibility. amount of bad code # bugs time spent on fixing bugs panicquick hacks motivation of developers refactoring amount of code smells indicates opportunity for
  9. 9. What is Code Smell? “a code smell is a surface indication that usually corresponds to a deeper problem in the system” Martin Fowler Duplicated Code Magic Number Feature Envy Primitive Obsession Long Method Comments
  10. 10. What is Refactoring? “…is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.” Martin Fowler Extract Local Variable Extract Class Introduce Local Variable Rename Move Method Extract Method
  11. 11. Demo
  12. 12. Some Recommended Readings
  13. 13. Thank you stanly@odd-e.com

×