Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Maude Lemaire

Rating No ratings yet

Making significant changes to large, complex codebases is a daunting task--one that's nearly impossible to do successfully unless you have the right team, tools, and mindset. If your application is in need of a substantial overhaul and you're unsure how to go about implementing those changes in a sustainable way, then this book is for you. Software engineer Maude Lemaire walks you through the entire refactoring process from start to finish. You'll learn from her experience driving performance and refactoring efforts at Slack during a period of critical growth, including two case studies illustrating the impact these techniques can have in the real world. This book will help you achieve a newfound ability to productively introduce important changes in your codebase. • Understand how code degrades and why some degradation is inevitable • Quantify and qualify the state of your codebase before refactoring • Draft a well-scoped execution plan with strategic milestones • Win support from engineering leadership • Build and coordinate a team best suited for the project • Communicate effectively inside and outside your team • Adopt best practices for successfully executing the refactor

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical playbook for engineers and tech leads who must modernize large, tangled codebases without breaking production or losing their team. If your application needs a substantial overhaul and you want a sustainable, well-communicated path rather than a heroic rewrite, this book is for you. 【Book Arc】 - **Opening (~0%–10%)**: Defines refactoring versus "refactoring at scale," using examples like Healthcare.gov to show why multimillion-line systems demand a different mindset, and previews the book's four-part structure. - **Early (~10%–30%)**: Explains how code degrades—through requirement shifts, defensive programming, and persistent disorganization—and why some decay is inevitable, while arguing that refactoring pays off in extendability, bug isolation, and performance. - **Middle (~30%–55%)**: Moves from diagnosis to measurement: how to quantify and qualify your codebase's state before committing to a refactor, and how to scope changes so they can actually be finished. - **Late (~55%–80%)**: Covers the human and organizational work—drafting an execution plan with strategic milestones, winning leadership support, assembling the right team, and communicating inside and outside the team. - **Ending (~80%–100%)**: Focuses on execution best practices, maintaining momentum, making the refactor stick through education and progressive linting, and closes with two Slack case studies (redundant database schemas and a second large-scale effort) that illustrate the full method in practice. 【Key Takeaways】 - **Refactoring at scale is a distinct discipline** (Opening): It affects a substantial surface area—often a million-plus lines of code—so breadth, coordination, and measurable improvement matter more than local code cleanliness. - **Code degradation is partly inevitable** (Early): Requirement shifts, defensive programming, and accumulated disorganization erode codebases over time; understanding these forces helps you decide when intervention is worth it. - **Refactoring serves concrete business goals** (Early): It can make code more extendable, isolate and prevent bugs, and unlock performance work—arguments that help justify the effort beyond aesthetics. - **Incomplete refactors are worse than none** (Early): A half-finished refactor leaves semi-permanent disorder that confuses future developers; scope down so you can comfortably reach the finish line. - **Measure before you move** (Middle): Quantify and qualify the codebase's state so you can set a baseline, track progress, and avoid blind rewrites. - **Plan with strategic milestones** (Late): A well-scoped execution plan with clear milestones keeps a large effort tractable and communicates progress to stakeholders. - **Leadership support and team design are load-bearing** (Late): Winning engineering leadership and assembling the right team are prerequisites, not afterthoughts, for a successful large-scale refactor. - **Adoption requires education and reinforcement** (Ending): Active and passive education, progressive linting, code analysis tools, and gates-versus-guardrails thinking help changes stick after the project ends. 【Reading Tips】 - Read Part I closely for the conceptual foundation—especially the distinction between ordinary refactoring and refactoring at scale—then skim the dry-cleaning and small-code examples if you already grasp the point. - Treat the middle chapters on measurement and planning as the operational core; these are where you'll likely take notes and build your own checklist. - Don't skip the Slack case studies at the end; read them after the method chapters so you can map each lesson back to the framework. - Pay attention to the communication and motivation material—it's easy to undervalue, but the book treats it as central to finishing large refactors. - If you're mid-project, jump directly to the chapters on execution, momentum, and making changes stick rather than reading linearly. 【Coverage Limits】 This guide is synthesized from stratified excerpts and the book's table of contents; some chapter-level detail, especially in Parts II–III, is only partially covered by the excerpts. Specific figures, internal Slack metrics, and the full second case study are not fully represented here.
Page 5
6 Why Should You Care About Refactoring? 8 Benefits of Refactoring 9 Developer Productivity 9 Identifying Bugs 10 Risks of Refactoring 11 Serious Regressions...
View in text
Excerpt 2
er receipts are also inconvenient when the owners calculate their earnings at the end of each month; they have to match up all transactions (both credit card...
View in text
Excerpt 3
son to refactor; some assert that a system’s performance is innately part of its behavior and therefore altering it in some way alters the behavior. I disagr...
View in text
Excerpt 4
// do GIF things Requirement Shifts | 35 } return; } We can then update addUserToGroup to use our new helper function, drastically sim‐ plifying the logic, a...
View in text
Excerpt 5
y is unavoidable simply due to com‐ plicated business logic. You have to make each of these checks and iterations to ensure that your application is doing wh...
View in text
Excerpt 6
e in continuously updating it throughout the whole process. Everyone takes a different approach to building out an execution plan. Whether your team calls th...
View in text
Excerpt 7
any differ‐ ences being logged between the two result sets. Track down and fix any potential bugs in the new implementation causing those discrepancies. Repe...
View in text
Excerpt 8
stributed to friends over the last six months. I’d recently started building websites to make a bit of money on the side and knew I could afford to b
View in text
Tags
AI categories
SoftwareProgrammingDevOps
ISBN: 1492075531
Publisher: O'Reilly Media
Publish Year: 2020
Language: English
Pages: 246
File Format: PDF
File Size: 11.6 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…