Summary of Refactoring in 15 Tweets

The book Refactoring 2nd edition by Martin Fowler provides detailed descriptions of refactorings with a motivation for doing them, the mechanics, and an example. It teaches you how to improve the design and quality of code in small steps without changing external behavior.

I interviewed MartinFowler about the major changes in the 2nd edition of Refactoring, how to recognize code smells and refactor code, how code reviews and refactoring support each other, what tech leads can do to encourage refactoring, the benefits refactoring brings, using tools for refactoring, and mob programming.

I asked Kent Beck, co-author of the chapter Bad Smells in Code, about dealing with code smells.

Read the full interview on InfoQ: Q&A on the Book Refactoring – Second Edition.

15 quotes from Refactoring

Here’s a set of 15 quotes from the book Refactoring. I’m tweeting these quotes with #Refactoring.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
With refactoring, we can take a bad, even chaotic, design and rework it into well-structured code
If your refactoring introduces performance slow-downs, finish refactoring first and do performance tuning afterwards
Brevity is the soul of wit, but clarity is the soul of evolvable software
The true test of good code is how easy it is to change it
Before you start refactoring, make sure you have a solid suite of tests. These tests must be self-checking.
If all else is equal, more code is bad—but rarely is all else equal
The key to effective refactoring is recognizing that you go faster when you take tiny steps
If someone says their code was broken for a couple of days while they are refactoring, you can be pretty sure they were not refactoring
Without refactoring, the internal design—the architecture—of software tends to decay
Refactoring isn’t an activity that’s separated from programming—any more than you set aside time to write if statements
You have to refactor when you run into ugly code—but excellent code needs plenty of refactoring too
The decision to refactor or rewrite requires good judgment and experience
Some organizations do regular code reviews; those that don’t would do better if they did
If you want to refactor, you have to write tests


Code Quality Matters!

Refactoring is a technique used to continuously restructure your code when the architecture or design changes or needs to change. The purpose is to keep it maintainable. Refactoring should not change the external behavior of the product.

Martin Fowler’s 2nd edition of Refactoring defines what refactoring is and provides insights into the practice of refactoring. It also contains a catalog of refactorings which programmers can use to develop their skills. I highly recommend this book!

Debugging is a key skill to find bugs quickly and resolve them. In Effective Debugging, Diomidis Spinellis explains many useful debugging methods, strategies, techniques, and tools.

There are several ways to increase your coding capabilities. The Clean Coder by Bob Martin gives examples of how developers can exercise and sharpen their skills with coding dojos and doing katas. Another recommended reading on this topic is The Software Craftsman by Sandro Mancuso.

In my book What Drives Quality I explore how quality plays a role in all of the software development phases, it takes a deep dive into quality by listing the relevant factors of development activities that drive the quality of products.

Now available in paperback: BenLinders Amazon Bol.

Books that I have read and that I like are added to my recommended books. I provide book tips in my workshops and when I work with clients. This is one of the ways in which I share my experience.

Ben Linders

I help organizations with effective software development and management practices. Active member of several networks on Agile, Lean and Quality, and a frequent speaker and writer.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

×
×

Cart

Cart