• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Revisiting Refactoring
 

Revisiting Refactoring

on

  • 1,286 views

A tour de force of Refactoring, Refuctoring, Code Smells, and Code Smiles

A tour de force of Refactoring, Refuctoring, Code Smells, and Code Smiles

Statistics

Views

Total Views
1,286
Views on SlideShare
1,283
Embed Views
3

Actions

Likes
0
Downloads
9
Comments
0

2 Embeds 3

http://www.slideshare.net 2
http://localhost:7249 1

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

    Revisiting Refactoring Revisiting Refactoring Presentation Transcript

    • Revisiting Refactoring Learning From the Past Improving the Future
    • What We Will Cover
      • What is a Refactor
      • What is a Refuctor
      • What are Code Smells
      • What are Code Smiles
      • How does this change what we do
    • Defining Refactoring
      • Code refactoring is the process of changing a computer program's internal structure without modifying its external functional behavior or existing functionality
      • improve internal non-functional properties of the software
      • improve code readability
      • to simplify code
    • A List of Refactors
      • http://www.refactoring.com/catalog/
    • Observations About Refactoring
      • Refactoring improves the design of software
      • – without refactoring, a design will “decay” as people make changes to a software system
      • • Refactoring makes software easier to understand
      • – because structure is improved, duplicated code is eliminated, etc.
      • • Refactoring promotes a deep understanding of the code at hand by tearing it apart and putting it back together again
    • What We Will Cover
      • What is a Refactor
      • What is a Refuctor
      • What are Code Smells
      • What are Code Smiles
      • How does this change what we do
    • Defining Refuctoring
      • Refuctoring is the process of taking a well-designed piece of code and, through a series of small, reversible changes, making it completely unmaintainable by anybody except yourself.
      • Often occurs when refactoring is not disciplined
      • Occurs when changes are made at the last minute
    • A Sampling of Refuctors
      • Inconsistent Naming Conventions
      • Module Gravity Well
      • Useless prefixes / suffixes “Pig Latin”
      • Reusing names
      • Often introduced accidentally in a rush
    • What We Will Cover
      • What is a Refactor
      • What is a Refuctor
      • What are Code Smells
      • What are Code Smiles
      • How does this change what we do
    • Defining Code Smells
      • A Code Smell is a hint that something has gone wrong somewhere in your code
      • A Code Smell is a hint that something might be wrong, not a certainty.
      • Calling something a CodeSmell is not an attack; it's simply a sign that a closer look is warranted.
    • A List of Code Smells
      • Duplicate Code
      • Large Method
      • Marge Class
      • Inappropriate Intimacy
      • Feature Envy
      • Switch Statements
      • Comments
    • Observations About Code Smells
      • Smells are guidelines
      • Smells should not be dogmatic
      • Smells should introduce a sense of humor to code reviews
      • Code smells have associated Refactors to address specific smells
    • What We Will Cover
      • What is a Refactor
      • What is a Refuctor
      • What are Code Smells
      • What are Code Smiles
      • How does this change what we do
    • Defining Code Smiles
      • A code "smile" is some aspect of the code that makes other developers smile when they have to maintain it.
      • Code Smiles add up to code that is easily maintained
    • A List of Code Smiles
      • Common sense naming conventions
      • Cohesive and loosely coupled modules
      • Elegant abstractions
      • Lack of duplication
      • A close resemblance to the application domain
    • Observations About Code Smiles
      • Code smiles do not happen by accident
      • Code full of Smiles can deteriorate without careful attention
      • Code smiles may also require supporting documentation or one on one training
    • What We Will Cover
      • What is a Refactor
      • What is a Refuctor
      • What are Code Smells
      • What are Code Smiles
      • How does this change what we do
    • Defining Prefactoring
      • Simple steps to take to prevent common problems before they arise
      • Conduct “Lessons Learned” meetings from previous projects
      • Identify common problems
      • Take steps at every stage to avoid issues known to cause problems in the past
    • Towards a Catalog of Prefactors
      • Identify a recurring issue
      • Define a preventative measure
      • Verify that the prevention is being followed
      • Verify that the recurring issue is reduced
      • Refine the preventative measure
    • Sample Prefactoring
      • Inappropriate Intimacy
      • Object model not resembling Business Model
      • Separation By Interfaces
      • Read code aloud to customers
    • Where to get More Information
      • http ://www.refactoring.com/catalog/index.html
      • http://www.waterfall2006.com/gorman.html
      • http://www.simple-talk.com/dotnet/.net-framework/code-deodorants-for-code-smells/
      • http://www.simple-talk.com/author/nick-harrison/