---
title: "Some cool refactoring examples, and what seems to be a lovely book"
url: "https://osherove.com/blog/2004/7/22/some-cool-refactoring-examples-and-what-seems-to-be-a-lovely.md"
canonical: "https://osherove.com/blog/2004/7/22/some-cool-refactoring-examples-and-what-seems-to-be-a-lovely.html"
published: "2004-07-22T21:25:00"
updated: "2004-07-22T21:25:00"
tags: ["Agile Related"]
author: "Roy Osherove"
description: "Just found this great set of refactoring patterns with examples . The examples are taken from the book “ Refactoring to patterns “ which seems like its worth a read. There is some stuff there that I did not hear or read…"
usage: "Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page)."
license: "https://creativecommons.org/licenses/by/4.0/"
---

# Some cool refactoring examples, and what seems to be a lovely book

By Roy Osherove July 22, 2004 In [Agile Related](https://osherove.com/blog/category/agile-related)

**Historical article** · Originally published July 22, 2004; technical details may be outdated.

Just found this great set of [refactoring patterns with examples](http://www.industriallogic.com/xp/refactoring/catalog.html). The examples are taken from the book “[Refactoring to patterns](https://www.amazon.com/exec/obidos/ASIN/0321213351/iserializable-20)“ which seems like its worth a read. There is some stuff there that I did not hear or read about or thought about as a refactoring pattern but totally made sense once I read it ([constructor chaining](http://www.industriallogic.com/xp/refactoring/chainConstructors.html), for example). I think it deviates from the [classic refactoring book](https://www.amazon.com/exec/obidos/ASIN/0201485672/iserializable-20) to a nice angle - it talks about refactoring your code into distinguishable design patterns, not just removing duplication or bettering readability. I like this notion. although it may seem a bit complicated for those who have no experience with design patterns (to which I recommend heartily [this mind opening classic](https://www.amazon.com/exec/obidos/ASIN/0201633612/iserializable-20)  book). Very cool to be able to point people at this URL to explain what I'm talking about when I say “Refactoring” and people start staring at me. I think this book might be a compliment to the classic that is [Refactoring](https://www.amazon.com/exec/obidos/ASIN/0201485672/iserializable-20) by fowler - and to the design patterns one as well (yes- you need all three is what I think!).

Anyway, this was found via [this blog](http://www.netacademia.net/blogspace/petert/archives/001579.html), which I have no idea what language it is written in, I just found it in my referrer logs. see? track back rocks :)

## More in Agile Related

[All posts in Agile Related](https://osherove.com/blog/category/agile-related)

- Jul 29, 2004

    ### [TDD workshop in Atlanta, Georgia - are you up to it?](https://osherove.com/blog/2004/7/29/tdd-workshop-in-atlanta-georgia-are-you-up-to-it.html)

- Jul 29, 2004

    ### [TDD workshop went well - ready for the next one?](https://osherove.com/blog/2004/7/29/tdd-workshop-went-well-ready-for-the-next-one.html)

- Jul 22, 2004

    ### [NUnit 2.2 beta 3 has been released - and some questions](https://osherove.com/blog/2004/7/22/nunit-22-beta-3-has-been-released-and-some-questions.html)

- Jul 22, 2004

    ### [MbUnit 2.17 released - with the cool database attributes I talked about](https://osherove.com/blog/2004/7/22/mbunit-217-released-with-the-cool-database-attributes-i-talk.html)


---

## About the author

**Roy Osherove**: Senior Solutions Architect at AWS working on AI for production and AI-driven development; author of The Art of Unit Testing and Elastic Leadership, with about 20 years of consulting and training on unit testing, TDD, team leadership and continuous delivery.

### Sites

- [RobotPaper](https://robotpaper.ai/): This blog: AI patterns and anti-patterns, AI and coding agents, and engineering leadership.
- [osherove.com](https://osherove.com): Roy's personal site. Author of The Art of Unit Testing and Elastic Leadership; consulting and training on unit testing, TDD, team leadership and continuous delivery, plus about 20 years of blog posts.
- [The Art of Unit Testing](https://www.artofunittesting.com): The Art of Unit Testing, 3rd Edition (Manning): readable, maintainable, trustworthy unit tests, plus TDD workshops in C#, JavaScript, Java and Kotlin.
- [5whys.com](https://www.5whys.com): Roy's writing on software team leadership: self-organizing teams, surviving chaos, learning mode and the Elastic Leadership model.
- [Pipeline Driven](https://pipelinedriven.org): Continuous delivery and DevOps practices: build patterns, pipeline-friendly testing, DevOps metrics and enterprise DevOps.
- [Elastic Leadership](https://www.elasticleadership.com): Elastic Leadership, Roy's framework for software team leaders (survival, learning and self-organizing modes).

### Social

- X: https://x.com/royosherove
- LinkedIn: https://www.linkedin.com/in/osherove/

### Contact

- Contact form: https://forms.gle/jQSx5KoXvrVA1JCK7

### License

Licensed under CC BY 4.0 — reuse, quote and adapt with attribution (Roy Osherove, link to the original page). License: https://creativecommons.org/licenses/by/4.0/
