7

I have just been through the following paper and I found it extremely useful: http://www.objectmentor.com/resources/articles/Clean_Code_Args.pdf

I am looking for similar papers/books/tutorials/etc. that provide step-by-step practice on refactoring and/or correct class design. I have read Fowler's “Refactoring”, but I was looking for more substantial examples.

1
  • 4
    Maybe better suited for Programmers or Code Review. Commented Mar 21, 2012 at 9:58

3 Answers 3

5

You probably won't find much resource about refactoring large examples step by step. Because you can never cover all types of example.

The reason Martin Fowler use small and easy example in "Refactoring", is because almost every large chunk of bad code are a combination of different bad smell. By learning how to recognize particular bad smell, you can fix the code gradually.

I will recommend you check Working Effectively with Legacy Code. It's a book that focus on the strategies to improve large legacy code. For class design, you probably want to read some books about design pattern.

Most important, try to apply things you learn in the book to your code.

Sign up to request clarification or add additional context in comments.

Comments

2

The proof of the pudding is in the eating. Apply the principles you've learnt to the codebases you're working on.

Comments

1

An interesting article with a large chunk of code can be found here:

  1. http://www.lagerweij.com/2011/05/28/code-cleaning-a-refactoring-example-in-50-easy-steps/
  2. http://www.lagerweij.com/2011/06/08/code-cleaning-how-tests-improve-code/
  3. https://gist.github.com/wouterla/5952cd86f3ba5f1bfab7

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.