searchlore

Back to Resource

All Segments

Martin Fowler Reflects on Refactoring: Improving the Design of Existing Code

Martin Fowler Reflects on Refactoring: Improving the Design of Existing Code

44 segments available

In this special episode of Book Overflow, Martin Fowler joins Carter and Nathan to discuss his book Refactoring: Improving the Design of Existing Code. Join them as Martin shares why he wrote Refactoring, how the art of refactoring has changed, and how he views the book's legacy! https://martinfowler.com/ -- Books Mentioned in this Episode -- Note: As an Amazon Associate, we earn from qualifying purchases. ---------------------------------------------------------- Refactoring: Improving the Design of Existing Code by Martin Fowler and Kent Beck https://amzn.to/4enmuox (paid link) The Art of Agile Development, 2nd Edition by James Shore and Shane Warden https://amzn.to/47TiM3D (paid link) Make No Law: The Sullivan Case and the First Amendment by Anthony Lewis https://amzn.to/3zJ3K3O (paid link) ---------------- 00:00 Intro 01:58 Motivation for writing the book 09:45 Refactoring, Extreme Programming, and testing 19:17 Estimating, Unknowns, and Complexity 23:40 Trust and High Performing Teams 30:32 refactoring in the wild: imitate, assimilate, innovate, best practices and sensible defaults 43:39 Legacy of the book and rational for second edition 47:35 What are the role of books now? Evergreen content, Long-form content in a world of short-form content. 01:03:21 Book Recommendations 01:09:12 Closing Thoughts ---------------- Spotify: https://open.spotify.com/show/5kj6DLCEWR5nHShlSYJI5L Apple Podcasts: https://podcasts.apple.com/us/podcast/book-overflow/id1745257325 X: https://x.com/bookoverflowpod Carter on X: https://x.com/cartermorgan Nathan's Functionally Imperative: www.functionallyimperative.com ---------------- Book Overflow is a podcast for software engineers, by software engineers dedicated to improving our craft by reading the best technical books in the world. Join Carter Morgan and Nathan Toups as they read and discuss a new technical book each week! The full book schedule and links to every major podcast player can be found at https://www.bookoverflow.io

Segments Timeline

1
0:00 - 1:58
1:57 duration378 words

Avoiding Best Practices

In this segment, Martin Fowler discusses the term 'best practices' and why it can be misleading in software development. He emphasizes the importance of using 'sensible defaults' instead, highlighting the need for flexibility and adaptability in coding practices.

"I mean we actually avoid the thoughtworks we avoid the term best practices um because it's a very loaded term I mean why would you ever do anything other than the best practice I'm going to use some n..."

2
1:58 - 3:09
1:11 duration254 words

The Motivation Behind Refactoring

Martin Fowler reflects on his motivation for writing 'Refactoring' in the late 1990s. He describes the chaotic state of the software industry at that time and the need for a more iterative approach to software development, which inspired him to document effective refactoring techniques.

"much for joining us today it's great to have you here he it's uh fun to be on the podcast uh I'm glad to know I'm not entirely a fossil people still want to talk to me well I've uh I've had a lot of g..."

3
3:09 - 5:10
2:01 duration386 words

The Shift to Iterative Development

Fowler explains the transition from rigid programming practices to a more iterative approach in software development. He discusses the challenges of changing requirements and the necessity of adapting to these changes through refactoring and continuous integration.

"two-part answer to this we'd love to know why you were motivated to write it in 1999 maybe describe the computer science Industry back then but then also let us know why you felt the need to do a seco..."

4
5:10 - 7:00
1:50 duration318 words

Self-Testing Classes

In this segment, Martin shares a pivotal moment in his career when he learned about self-testing classes. He describes how this concept revolutionized his approach to coding, allowing him to confidently make changes to existing code without fear of breaking it.

"at the heart of the problem we knew we needed to go to a more iterative approach to writing software where we could actually build a bit get it into production see what happened and cycle it maybe doi..."

5
7:00 - 9:02
2:02 duration386 words

Tiny Changes, Big Impact

Fowler discusses the importance of making small, incremental changes to code rather than large, sweeping modifications. He illustrates how this approach, combined with continuous integration, can lead to significant improvements in software design and maintainability.

"concrete then I had the opportunity to be on the sefre project Chrysler comprehensive compensation with Kent Beck and this was a project that really launched a lot of the kinds of programming styles t..."

6
9:02 - 10:35
1:33 duration313 words

The Legacy of Refactoring

Martin Fowler reflects on the legacy of his book 'Refactoring' and its impact on the software development community. He emphasizes the importance of clear coding practices and the role of refactoring in modern software engineering.

"everybody about this I wanted to say hey you've got to know about this stuff and they would say so where do I go to for information and I go well there's nothing there and I talked to Kent and he was ..."

7
10:35 - 12:55
2:20 duration498 words

Unit Testing as a Safety Net

In this segment, Fowler discusses the value of unit testing in the context of refactoring. He explains how unit tests serve as a safety net, allowing developers to make changes with confidence and ensuring that existing functionality remains intact.

"um well you don't need to be scared about changing your code if you've set up the preconditions absolutely absolutely and that's that's part of the thing that's always hard to express to people it it ..."

8
12:55 - 14:09
1:14 duration251 words

Refactoring Mindset

Fowler shares insights on developing a refactoring mindset among developers. He discusses the importance of viewing refactoring as a continuous process and how it can lead to better software design and engineering practices.

"imaginative at coming up with bugs in I program trust me on this and and that's that's uh it's great thing so did did I review do refactoring at all before reading the book not in the way you recommen..."

9
14:15 - 15:02
0:47 duration139 words

Open Source and Confidence in Refactoring

The speaker discusses their extensive use of refactoring in personal open-source projects, where high test coverage allows for confident changes. They explain how having tests in place enables significant redesigns without altering external function signatures, showcasing the importance of testing in the refactoring process.

"Nan who you on that um so where I've used it extensively actually is on personal open source projects I think partially because you could see my code and so I thought just out of respect I should have..."

10
15:02 - 16:23
1:21 duration241 words

The Vocabulary of Refactoring

Reflecting on their journey, the speaker reveals how reading 'Refactoring' provided them with the vocabulary and framework to understand their instinctive practices in software development. They discuss the influence of their background in DevOps and how the book clarified the underlying philosophy of their behaviors.

"infrastructure like I I've mentioned this before but go is my favorite programming language and test is testing is a first class citizen uh it also compiles really quickly so it's really like ergonomi..."

11
16:23 - 17:52
1:29 duration296 words

Refactoring's Impact on Workflow

The conversation shifts to how reading 'Refactoring' changed the speaker's approach to their workflow. They share experiences of advocating for proper testing and refactoring practices within teams, emphasizing the importance of avoiding technical debt and maintaining code quality in the face of external pressures.

"vocabulary for it until I read refactoring though which it was kind of interesting it was like a lot of like these all F felt correct I kind of I was from the devops world so we did a lot of test Auto..."

12
17:52 - 19:00
1:07 duration276 words

Navigating Software Complexity

The speaker discusses the challenges of estimating software projects and the inherent complexities of software engineering. They highlight the unpredictable nature of software development and the necessity of adapting to changing requirements, drawing parallels to their wife's experiences in learning programming.

"know what bugs are getting introduced in the future right so I will and it it did directly influence how I do it now and I think I even shared on the podcast a story where I was working with an Apache..."

13
19:00 - 20:40
1:39 duration294 words

The Feedback Loop of Software Development

In this segment, the speaker elaborates on the feedback loop inherent in software development, where initial assumptions about features often change once the software is in use. They share anecdotes about project experiences that illustrate the importance of iterative development and the need for flexibility in project planning.

"refactoring and I think before I would have just said well it be nice to change this but why risk it yeah because the it's the critical code at the center of the business which is the most important s..."

14
20:40 - 22:40
2:00 duration378 words

Sensing and Responding to Change

The discussion focuses on the necessity of a sense-and-respond approach in software engineering, especially when dealing with unknowns. The speaker emphasizes the role of extreme programming practices in facilitating this adaptability, highlighting refactoring as a crucial component of this methodology.

"processes because there's a feedback loop going on once you've got the computer and suddenly you realize oh this thing that was hard before now becomes easy um and I have to reconfigure my way of work..."

15
22:40 - 25:02
2:22 duration427 words

Building Trust in High-Performing Teams

The speaker reflects on their experiences in a high-functioning fintech team, discussing the importance of trust and collaboration in agile environments. They share insights on how effective communication and shared practices foster a culture of accountability and innovation, essential for successful software development.

"there are other processes that do that there are plenty of things in life where you do have to do this sense response where the unknowns are just too much out there and you just have to do a little bi..."

16
25:02 - 26:31
1:29 duration311 words

Trust as the Kryptonite of Agile

In this segment, Fowler elaborates on how the absence of trust can undermine agile methodologies. He draws parallels between trust in software teams and trust in broader societal contexts, such as food safety. Fowler argues that building trust is essential for reducing friction in team dynamics and enhancing productivity.

"lot of us worked independently we typically worked in pairs off independently um but we had lots of things like these social contracts where we would make sure that you know we knew that if we indepen..."

17
26:31 - 27:07
0:36 duration142 words

Building Trust Through Transparency

Fowler highlights the importance of transparency in fostering trust within software teams. He explains how open access to code and collaborative practices can create an environment where team members feel safe to trust one another. This transparency is crucial for effective agile practices and successful project outcomes.

"was the case I I read a lovely book a while ago that talked about the origins of food safety in America in the late 1800s because it was quite common in those days that you know when the milk started ..."

18
27:07 - 28:04
0:57 duration189 words

The Role of Integrity in Team Dynamics

Fowler discusses how hiring practices focused on integrity contribute to building trust within teams. He reflects on his experiences at Fort Works, where the emphasis on hiring trustworthy individuals reduced the need for corporate controls and allowed for a more fluid and effective working environment.

"can remove a lot of friction from the process um and and that has happened that's actually part of the challenge of our broader civilization is we're building up ways in which we can trust people we c..."

19
28:04 - 29:02
0:57 duration190 words

Trust and Extreme Programming

In this segment, Fowler connects the concept of trust to extreme programming practices. He explores how a high level of trust among team members can lead to more innovative and efficient workflows, allowing teams to operate with greater speed and flexibility.

"and that's and that then it says and important things about the kind of people you work with at at Fort works one of the things that Drew me to the company back 20 years ago when I joined was they rea..."

20
29:02 - 30:11
1:09 duration231 words

Creating a Safe Environment for Trust

Fowler emphasizes the need for a safe environment to cultivate trust among team members. He discusses how transparency in code and collaborative practices can reinforce trust, making it easier for teams to work together effectively and navigate challenges.

"um I mean where you know when I think of um you know an interesting example if I think back to that C3 project a large part of what built the trust was having a group of people that ended up self- sel..."

21
30:11 - 31:01
0:50 duration147 words

Refactoring: A Holistic Approach

Fowler shares insights on the holistic nature of refactoring, emphasizing the importance of testing during the process. He reflects on how many engineers understand refactoring as merely improving code without recognizing the critical role of tests in ensuring safe changes.

"help but I mean then we're talking much more sociological area that I'm not an expert in right in terms of building shifts more widely but I can certainly say that where I've seen projects with diffic..."

22
31:01 - 32:19
1:17 duration227 words

The Evolution of Refactoring Terminology

In this segment, Fowler discusses the origins of the term 'refactoring' and its evolution within the software development community. He explains how the term has become widely recognized among programmers and its significance in improving code maintainability.

"your book is just the roughly authoritative Source on it but you had heard of the term refactoring before the term had been around for quite a few years beforehand there's a post on my website called ..."

23
32:19 - 33:00
0:40 duration122 words

Testing as a Foundation for Refactoring

Fowler highlights the necessity of testing as a foundation for effective refactoring. He shares his experiences working with talented engineers and how the importance of testing in the refactoring process is often overlooked, particularly among less experienced developers.

"much out of that group and the small talk Community um that that led to the term well so to answer your question I have the term refactoring I think if I said that to any programmer I've ever worked w..."

24
33:00 - 34:43
1:43 duration319 words

Transitioning from Cowboy Code to Structured Practices

Fowler reflects on his experiences in early-stage startups, where transitioning from unstructured 'Cowboy Code' to more mature coding practices presented numerous refactoring opportunities. He discusses the challenges and benefits of implementing structured coding practices in a fast-paced environment.

"and so I I think that's what surprised me when reading this book because despite having worked with lots and lots of great Engineers over the course of my career not I have never heard someone kind of..."

25
34:43 - 36:01
1:17 duration235 words

The Importance of Dependency Injection

In this segment, Fowler discusses the role of dependency injection in improving code structure and facilitating refactoring. He explains how this pattern allows for greater flexibility in testing and deployment processes, ultimately leading to more reliable software.

"opportunities uh again going back to that fintech company uh we had a fundamental uh initiative based on um introducing inversion of control which made it a lot easier for our devops um deployment pro..."

26
36:01 - 37:09
1:07 duration231 words

Understanding Best Practices in Software Development

Fowler explores the concept of best practices in software development, emphasizing the importance of understanding the underlying philosophy behind these practices. He discusses how knowledge of best practices can enhance the effectiveness of refactoring and overall code quality.

"example where a lot of times early on you might just like spin up a database or have it access to certain things which is you know disastrous when you actually want decoupled testing patterns um and s..."

27
36:49 - 38:12
1:23 duration292 words

The Importance of Unit Tests in Refactoring

In this segment, the discussion revolves around the critical role of unit tests in the refactoring process. Martin Fowler emphasizes that while many developers acknowledge the necessity of unit tests, they often overlook their true purpose: enabling safe code refactoring. This segment highlights the common misconception that unit tests are merely a safety net before deployment, rather than a fundamental tool for maintaining code quality during refactoring.

"and then realized this was an accident right and those are the those are the scariest ones because you end up getting these weird uh what is it conance of you know timing or other weird things that wo..."

28
38:12 - 39:35
1:22 duration300 words

Understanding Best Practices vs. Sensible Defaults

Martin Fowler and his co-hosts delve into the distinction between 'best practices' and 'sensible defaults' in software development. They discuss how the term 'best practices' can be misleading, as it implies a one-size-fits-all approach. Instead, they advocate for 'sensible defaults' that allow for flexibility based on context, encouraging developers to understand the reasoning behind practices rather than blindly following them.

"interesting because I think a lot of people kind of hide behind like oh this is a best practice and I think what's funny about that is a lot of times when people do say this is a best practice they're..."

29
39:35 - 41:14
1:39 duration334 words

The Evolution of Learning in Programming

In this insightful segment, the conversation shifts to the evolution of learning in programming. Martin Fowler references Clark Terry's philosophy of 'imitate, assimilate, innovate' to illustrate how developers progress from following rules to understanding the underlying principles. This segment emphasizes the importance of questioning established practices and adapting them to fit specific contexts, fostering a deeper understanding of programming.

"conclusions yeah that makes sense I mean there there's a a common pattern you see in when people talk about learning where early on you kind of just follow rules relatively um straightforward way um a..."

30
41:14 - 42:58
1:44 duration344 words

The Role of Version Control in Modern Development

Martin Fowler discusses the essential role of version control in software development, highlighting it as a fundamental practice that should be present in every project. He reflects on how version control has become more accessible and emphasizes its importance in maintaining project integrity. This segment underscores the necessity of version control as a sensible default in the programming landscape.

"important part of patent's thinking of course is that the idea of a patent was only an appropriate solution given a particular context so you had to understand the context in order to decide whether i..."

31
42:58 - 45:00
2:02 duration370 words

Refactoring's Legacy and Industry Impact

In this segment, Martin Fowler reflects on the legacy of his book 'Refactoring' and its impact on the industry. He expresses disappointment over the misconception that refactoring can occur without tests and shares insights on how the book has shaped programming practices. Fowler discusses the importance of understanding the principles of refactoring and the challenges faced by developers who lack experience in a well-functioning team environment.

"wouldn't want to use Version Control finish anything these days I mean there was a time when setting up a version centralized server and all the rest of it was actually a fair bit of work but now it's..."

32
45:00 - 47:32
2:31 duration507 words

The Evergreen Nature of Refactoring

Martin Fowler articulates the enduring relevance of his book 'Refactoring' in the programming community. He discusses its applicability across various contexts and the necessity for programmers to engage with its concepts. This segment highlights the book's status as a foundational text for developers, emphasizing its role in fostering a deeper understanding of code quality and maintenance.

"experience um and but on the other hand what best can you do I mean I I hope I wrote as clear a description as I could in the book the fact that there haven't been really any competitive books that ha..."

33
47:32 - 50:47
3:15 duration675 words

Books vs. Short-Form Content in Developer Education

The conversation shifts to the role of books in educating developers in an era dominated by short-form content. Martin Fowler and his co-hosts discuss the depth and structure that books provide compared to quick online resources. They emphasize the value of taking time to explore complex ideas thoroughly, contrasting it with the fleeting nature of short-form content that often lacks depth and context.

"is very impressive so actually that that leads to a slightly broader question so to what do you see of the role of books in educating developers compared to other resources like things on the web or v..."

34
51:01 - 52:01
1:00 duration208 words

The Value of Engaging with Ideas

The discussion emphasizes the importance of grappling with ideas over time, particularly in the context of software engineering. The speaker shares insights on how reading can lead to a deeper understanding of concepts like refactoring, illustrating that initial agreement with an idea may not equate to true comprehension.

"uplifted Twitter I feel like garbage um and then books with for software engineers in general um because it was something we had debated kind of when we were starting this podcast is you know and as a..."

35
52:01 - 53:10
1:08 duration245 words

The Shift from Books to Online Content

In this segment, the speaker discusses the transition from traditional book writing to focusing on online articles. They highlight the benefits of shorter, more focused content that can still provide depth, advocating for a balance between the brevity of online articles and the thoroughness of books.

"there are just so many books we've read where even if they're I think again there are ideas that if they were scroll by in my Twitter feed I say got it I agree with that but then after engaging with i..."

36
53:10 - 54:15
1:05 duration208 words

Creating Meaningful Long-Form Content

The conversation explores the potential for creating valuable long-form content that is concise yet comprehensive. The speaker shares examples of articles that effectively cover important topics without unnecessary padding, advocating for a shift in how technical content is produced and consumed.

"important that I find the people who are still on do doing the day-to-day and help them express what they know and they learn right but I think also there is a ground that is a kind of a middle ground..."

37
54:15 - 55:22
1:06 duration236 words

Designing Books for Effective Learning

The speaker reflects on their approach to writing books, emphasizing the importance of presenting key information early to engage readers. They discuss the challenge of balancing depth with accessibility, advocating for shorter books that still deliver substantial value to the reader.

"the ground in the right amount of level and then says okay we've got this area covered um I wrote around the same time I wrote a an article on branching pattern I mean how how to deal with software br..."

38
55:22 - 56:59
1:36 duration344 words

The Case for Shorter, Timeless Articles

This segment discusses the potential for creating shorter articles that maintain relevance over time. The speaker argues for the value of concise, well-structured content that can stand the test of time, contrasting it with the often fleeting nature of traditional book publishing.

"part of how I design my books um but I think we can actually do that because with a book publishes it's very hard to get them to think in smaller sizes I was very lucky that one of my early most succe..."

39
56:59 - 1:00:01
3:02 duration634 words

Encouraging Substantive Technical Discussions

The conversation wraps up with a focus on the podcast's mission to foster deeper technical discussions. The speaker highlights the importance of engaging with substantial content rather than superficial trends, encouraging listeners to seek out meaningful material that contributes to their professional development.

"still valid in 10 years time put that out there right and I think there's a lot of room for that kind of thing and that's hard to do with books but still needs to be written done with words I think I ..."

40
1:00:01 - 1:02:04
2:03 duration403 words

The Future of Technical Reading

In this closing segment, the speaker reflects on the evolving landscape of technical reading and the importance of engaging with evergreen content. They encourage listeners to prioritize long-form articles and books that provide lasting insights, reinforcing the value of thoughtful engagement with complex ideas.

"a lot of let's talk about the latest controversy of the week programming podcasts right and there's even a lot of like interview other programmer podcasts um but there there aren't a ton of podcasts w..."

41
1:01:52 - 1:03:10
1:18 duration278 words

Recommendations for Engaging Content

Martin Fowler shares his thoughts on the types of content that can inspire programmers to think deeply. He suggests looking for well-structured, long-form articles that address enduring topics. The discussion also touches on the potential for covering notable essays or blog posts in future podcast episodes, especially as one of the hosts prepares for a challenging academic course.

"listen yeah and I I books do encourage that um but but I think there are good places on the web I try to be one of them I think I'm not only one that also tries to do that and and one of the things I ..."

42
1:03:10 - 1:04:54
1:44 duration325 words

Book Recommendations from Martin Fowler

Martin Fowler recommends two books: 'The Art of Agile Development' by James Shore, which he considers essential for understanding software development practices, and 'Make No Law' by Anthony Lewis, which explores the Sullivan case and its implications for freedom of speech. Fowler emphasizes the practical insights from these books and their relevance to both software development and broader societal issues.

"opinion on uh some of what you think are the best essays or blog posts to cover because uh we've discussed that as doing that on the podcast well I mean Martin we thank you so much for coming on I mea..."

43
1:04:54 - 1:07:44
2:50 duration487 words

The Sullivan Case and Its Implications

In this segment, Martin Fowler delves into the historical significance of the Sullivan case, a landmark legal battle that shaped First Amendment rights in the United States. He draws parallels between legal work and software development, highlighting the complexities of both fields and the importance of understanding the underlying principles that govern them.

"process onof soft ware engineering at the moment so I strongly recommend it um to you and your offers uh so you and your listeners um to go for so that's my that's my down the-middle software developm..."

44
1:07:44 - 1:09:51
2:06 duration396 words

Closing Thoughts and Future Engagement

As the podcast wraps up, the hosts express their gratitude to Martin Fowler for his insights and recommendations. They discuss the importance of quality content in the podcasting space and the need for deeper engagement with ideas. The segment concludes with a reminder of the resources shared during the episode and an invitation for listeners to explore them further.

"or more commonly whether it's lawyers writing a contract for some commercial agreement that we come across all the time because what are you doing when you're writing these agreements you're trying to..."