The Pragmatic Programmer: From Journeyman to Master
Quotes from the Book
If it hurts, do it more frequently, and bring the pain forward.
The earlier you catch defects, the cheaper they are to fix.
Every change that is made to an application’s configuration, source code, environment, or data, triggers the creation of a new instance of the pipeline. One of the first steps in the pipeline is to create binaries and installers. The rest of the pipeline runs a series of tests on the binaries to prove that they can be released. Each test that the release candidate passes gives us more confidence that this particular combination of binary code, configuration information, environment, and data will work. If the release candidate passes all the tests, it can be released. The deployment pipeline has its foundations in the process of continuous integration and is in essence the principle of continuous integration taken to its logical conclusion. The aim of the deployment pipeline is threefold. First, it makes every part of the process of building, deploying, testing, and releasing software visible to everybody involved, aiding collaboration. Second, it improves feedback so that problems are identified, and so resolved, as early in the process as possible. Finally, it enables teams to deploy and release any version of their software to any environment at will through a fully automated process.
In software, when something is painful, the way to reduce the pain is to do it more frequently, not less.
Asking experts to do boring and repetitive, and yet technically demanding tasks is the most certain way of ensuring human error that we can think of, short of sleep deprivation, or inebriation.
Indeed, there is a school of thought that any work on a branch is, in the lean sense, waste—inventory that is not being pulled into the finished product.
There should be two tasks for a human being to perform to deploy software into a development, test, or production environment: to pick the version and environment and to press the “deploy” button.
So, when should you think about automating a process? The simplest answer is, “When you have to do it a second time.” The third time you do something, it should be done using an automated process. This fine-grained incremental approach rapidly creates a system for automating the repeated parts of your development, build, test, and deployment process.
Releasing software is too often an art; it should be an engineering discipline.
Acceptance testing relies on the ability to execute automated tests in a productionlike environment. However, a vital property of such a test environment is that it is able to successfully support automated testing. Automated acceptance testing is not the same as user acceptance testing. One of the differences is that automated acceptance tests should not run in an environment that includes integration to all external systems. Instead, your acceptance testing should be focused on providing a controllable environment in which the system under test can be run. “Controllable” in this context means that you are able to create the correct initial state for our tests. Integrating with real external systems removes our ability to do this.
In many organizations where automated functional testing is done at all, a common practice is to have a separate team dedicated to the production and maintenance of the test suite. As described at length in Chapter 4, “Implementing a Testing Strategy,” this is a bad idea. The most problematic outcome is that the developers don’t feel as if they own the acceptance tests. As a result, they tend not to pay attention to the failure of this stage of the deployment pipeline, which leads to it being broken for long periods of time. Acceptance tests written without developer involvement also tend to be tightly coupled to the UI and thus brittle and badly factored, because the testers don’t have any insight into the UI’s underlying design and lack the skills to create abstraction layers or run acceptance tests against a public API.
Although it’s obviously unreasonable to check your operating system into version control,
Developer: “Oh, we changed the way deployment works. You need to copy this new set of files over and set permission x.” Or worse, “That’s strange, let me take a look... ” followed by hours of working out what has changed and how to get it deployed. Automation
At an abstract level, a deployment pipeline is an automated manifestation of your process for getting software from version control into the hands of your users.
Throughput is the number of transactions a system can process in a given timespan. It
It is worth emphasizing that branching by feature is really the antithesis of continuous integration, and all of our advice on how to make it work is only about ensuring that the pain isn’t too horrible come merge time.
Our proposal is not a technical solution but a practice: Always commit to trunk, and do it at least once a day. If this seems incompatible with making far-reaching changes to your code, then we humbly submit that perhaps you haven’t tried hard enough.
integrating infrequently, which only makes it worse. In software, when something is painful, the way to reduce the pain is to do it more frequently, not less.
Figure 5.1 A simple value stream map for a product
The most important practice for continuous integration to work properly is frequent check-ins to trunk or mainline. You should be checking in your code at least a couple of times a day.
This principle is really a statement of our aim in writing this book: Releasing software should be easy. It should be easy because you have tested every single part of the release process hundreds of times before. It should be as simple as pressing a button. The repeatability and reliability derive from two principles: automate almost everything, and keep everything you need to build, deploy, test, and release your application in version control.
It is essential for the smooth running of the delivery process to fly people back and forth periodically, so that each local group has personal contact with members from other groups.
There are various incremental improvements to the way software is delivered which will yield immediate benefits, such as teaching developers to write production-ready software, running CI on production-like systems, and instituting cross-functional teams.
aim is to make the delivery of software from the hands of developers into production a reliable, predictable, visible, and largely automated process with well-understood, quantifiable risks. Using the approach that we describe in this book, it is possible to go from having an idea to delivering working code that implements it into production in a matter of minutes or hours, while at the same time improving the quality of the software thus delivered. The vast majority of the cost associated with delivering successful software is incurred after the first release. This is the cost of support, maintenance, adding new features, and fixing defects. This is especially true of software delivered via iterative processes, where the first release contains the minimum amount of functionality providing value to the customer. Hence the title of this book, Continuous Delivery, which is taken from the first principle of the Agile Manifesto: “Our highest priority is to satisfy the customer through early and continuous delivery of valuable software
Watch on YouTube
About Jez Humble
About the book
Winner of the 2011 Jolt Excellence Award!Getting software released to users is often a painful, risky, and time-consuming process. This groundbreaking new book sets out the principles and technical practices that enable rapid, incremental delivery of high quality, valuable new functionality to users. Through automation of the build, deployment, and testing process, and improved collaboration between developers, testers, and operations, delivery teams can get changes released in a matter of hours-- sometimes even minutes-no matter what the size of a project or the complexity of its code base. Jez Humble and David Farley begin by presenting the foundations of a rapid, reliable, low-risk delivery process. Next, they introduce the "deployment pipeline," an automated process for managing all changes, from check-in to release. Finally, they discuss the "ecosystem" needed to support continuous
Book details
- First published
- 2010
- Author
- Jez Humble
- Genre
- Nonfiction
- Goodreads rating
- 4.20 (3k ratings)
Keep reading
The Pragmatic Programmer: From Journeyman to Master
Accelerate: Building and Scaling High Performing Technology Organizations
Software Engineering at Google: Lessons Learned from Programming Over Time
Code Complete
Getting Real: The Smarter, Faster, Easier Way to Build a Web Application
The Goal: A Process of Ongoing Improvement
Managing Humans: Biting and Humorous Tales of a Software Engineering Manager
Domain-Driven Design: Tackling Complexity in the Heart of Software
Running Lean: Iterate from Plan A to a Plan That Works
Pragmatic Thinking and Learning: Refactor Your Wetware
Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability
Lean Analytics: Use Data to Build a Better Startup Faster
Right Kind of Wrong: The Science of Failing Well
The PARA Method: Simplify, Organize, and Master Your Digital Life
Peopleware: Productive Projects and Teams
The Lean Startup
A World Without Email: Reimagining Work in an Age of Communication Overload
Hackers & Painters: Big Ideas from the Computer Age
Amp It Up: Leading for Hypergrowth by Raising Expectations, Increasing Urgency, and Elevating Intensity
Making Ideas Happen: Overcoming the Obstacles Between Vision and Reality
Founders at Work: Stories of Startups' Early Days
Rework
Hooked: How to Build Habit-Forming Products
In the Beginning...Was the Command Line
Measure What Matters
Algorithms to Live By: The Computer Science of Human Decisions
The Design of Everyday Things
Effective Java Programming Language Guide
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers―Straight Talk on the Challenges of Entrepreneurship
Thinking In Systems: A Primer
The Effective Executive: The Definitive Guide to Getting the Right Things Done
Humble Pi: A Comedy of Maths Errors
Adapt: Why Success Always Starts with Failure
The 12 Week Year
Getting Things Done: The Art of Stress-Free Productivity
Early Retirement Extreme: A Philosophical and Practical Guide to Financial Independence
Invent and Wander: The Collected Writings of Jeff Bezos
Structure and Interpretation of Computer Programs (MIT Electrical Engineering and Computer Science)
The Startup of You: Adapt to the Future, Invest in Yourself, and Transform Your Career
Blue Ocean Strategy: How to Create Uncontested Market Space and Make the Competition Irrelevant
The $100 Startup: Reinvent the Way You Make a Living, Do What You Love, and Create a New Future
Slow Productivity: The Lost Art of Accomplishment Without Burnout
The Fifth Discipline: The Art & Practice of The Learning Organization
Great by Choice: Uncertainty, Chaos, and Luck—Why Some Thrive Despite Them All
Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
Black Box Thinking: Why Some People Never Learn from Their Mistakes - But Some Do
The Accidental Creative: How to Be Brilliant at a Moment's Notice
Creativity, Inc.: Overcoming the Unseen Forces That Stand in the Way of True Inspiration
Zero to One: Notes on Startups, or How to Build the Future
Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones
The Innovator's Solution: Creating and Sustaining Successful Growth
The Soul of a New Machine
Things a Little Bird Told Me: Confessions of the Creative Mind
The Art of the Start: The Time-Tested, Battle-Hardened Guide for Anyone Starting Anything
Peak: Secrets from the New Science of Expertise
The 1-Page Marketing Plan: Get New Customers, Make More Money, And Stand out From The Crowd
Pour Your Heart Into It: How Starbucks Built a Company One Cup at a Time
HBR's 10 Must Reads on Strategy
The E-myth Revisited

