Pragmatic Thinking and Learning: Refactor Your Wetware
Quotes from the Book
The greatest of all weaknesses is the fear of appearing weak.
Don't be a slave to history. Don't let existing code dictate future code. All code can be replaced if it is no longer appropriate. Even within one program, don't let what you've already done constrain what you do next -- be ready to refactor... This decision may impact the project schedule. The assumption is that the impact will be less than the cost of /not/ making the change.
You Can't Write Perfect Software. Did that hurt? It shouldn't. Accept it as an axiom of life. Embrace it. Celebrate it. Because perfect software doesn't exist. No one in the brief history of computing has ever written a piece of perfect software. It's unlikely that you'll be the first. And unless you accept this as a fact, you'll end up wasting time and energy chasing an impossible dream.
An investment in knowledge always pays the best interest.
Tools amplify your talent. The better your tools, and the better you know how to use them, the more productive you can be.
Kaizen" is a Japanese term that captures the concept of continuously making many small improvements.
We who cut mere stones must always be envisioning cathedrals. —Quarry worker's creed
Don't gloss over a routine or piece of code involved in the bug because you "know" it works. Prove it. Prove it in this context, with this data, with these boundary conditions.
Great software today is often preferable to perfect software tomorrow.
Names are deeply meaningful to your brain, and misleading names add chaos to your code.
In some ways, programming is like painting. You start with a blank canvas and certain basic raw materials. You use a combination of science, art, and craft to determine what to do with them. You sketch out an overall shape, paint the underlying environment, then fill in the details. You constantly step back with a critical eye to view what you've done. Every now and then you'll throw a canvas away and start again. But artists will tell you that all the hard work is ruined if you don't know when to stop. If you add layer upon layer, detail over detail, the painting becomes lost in the paint.
The editor will be an extension of your hand; the keys will sing as they slice their way through text and thought.
A good idea is an orphan without effective communication.
Every day, work to refine the skills you have and to add new tools to your repertoire.
One hundred years from now, our engineering may seem as archaic as the techniques used by medieval cathedral builders seem to today's civil engineers, while our craftsmanship will still be honored.
Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired. Fix each one as soon as it is discovered. If there is insufficient time to fix it properly, then board it up. Perhaps you can comment out the offending code, or display a "Not Implemented" message, or substitute dummy data instead. Take some action to prevent further damage and to show that you're on top of the situation.
Just as in financial investing, you must invest in your knowledge portfolio regularly.
People find it easier to join an ongoing success. Show them a glimpse of the future and you’ll get them to rally around.[7]
By coding at a higher level of abstraction, you are free to concentrate on solving domain problems, and can ignore petty implementation details.
All software you write will be tested—if not by you and your team, then by the eventual users—so you might as well plan on testing it thoroughly.
The amount of surprise you feel when something goes wrong is directly proportional to the amount of trust and faith you have in the code being run.
If you work closely with your users, sharing their expectations and communicating what you're doing, then there will be few surprises when the project gets delivered. This is a BAD THING. Try to surprise your users. Not scare them, mind you, but /delight/ them.
There is a simple marketing trick that helps teams communicate as one: generate a brand. When you start a project, come up with a name for it, ideally something off-the-wall. (In the past, we've named projects after things such as killer parrots that prey on sheep, optical illusions, and mythical cities.) ...Use your team's name liberally when talking with people. It sounds silly, but it gives your team an identity to build on, and the world something memorable to associate with your work.
Rather than construction, software is more like gardening—it is more organic than concrete. You plant many things in a garden according to an initial plan and conditions. Some thrive, others are destined to end up as compost.
Programmers are constantly in maintenance mode.
In an article in the April 1999 CACM, Robert Glass summarizes research that seems to indicate that, while code inspection is effective, conducting reviews in meetings is not.
Providing a comfortable transition through familiar metaphors is one way to help get buy-in.
...maintaining good regression tests is the key to refactoring with confidence.
Watch on YouTube
About Andy Hunt
More by Andy Hunt
Pragmatic Thinking and Learning: Refactor Your Wetware
About the book
Straight from the programming trenches, The Pragmatic Programmer cuts through the increasing specialization and technicalities of modern software development to examine the core process--taking a requirement and producing working, maintainable code that delights its users. It covers topics ranging from personal responsibility and career development to architectural techniques for keeping your code flexible and easy to adapt and reuse. Read this book, and you'll learn how to
Fight software rot; Avoid the trap of duplicating knowledge; Write flexible, dynamic, and adaptable code; Avoid programming by coincidence; Bullet-proof your code with contracts, assertions, and exceptions; Capture real requirements; Test ruthlessly and effectively; Delight your users; Build teams of pragmatic programmers; and Make your developments more precise with automation. Written as a series of self-containe
Book details
- First published
- 1999
- Author
- Andy Hunt
- Genre
- Nonfiction
- Goodreads rating
- 4.33 (24k ratings)
Keep reading
Software Engineering at Google: Lessons Learned from Programming Over Time
Code Complete
Hackers & Painters: Big Ideas from the Computer Age
Continuous delivery
Managing Humans: Biting and Humorous Tales of a Software Engineering Manager
Pragmatic Thinking and Learning: Refactor Your Wetware
Getting Real: The Smarter, Faster, Easier Way to Build a Web Application
Domain-Driven Design: Tackling Complexity in the Heart of Software
Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability
Making Ideas Happen: Overcoming the Obstacles Between Vision and Reality
Accelerate: Building and Scaling High Performing Technology Organizations
Rework
The PARA Method: Simplify, Organize, and Master Your Digital Life
Creativity, Inc.: Overcoming the Unseen Forces That Stand in the Way of True Inspiration
The Accidental Creative: How to Be Brilliant at a Moment's Notice
Peopleware: Productive Projects and Teams
Things a Little Bird Told Me: Confessions of the Creative Mind
Founders at Work: Stories of Startups' Early Days
Lean Analytics: Use Data to Build a Better Startup Faster
The Goal: A Process of Ongoing Improvement
Getting Things Done: The Art of Stress-Free Productivity
The Art of Thinking Clearly
Running Lean: Iterate from Plan A to a Plan That Works
Algorithms to Live By: The Computer Science of Human Decisions
Pour Your Heart Into It: How Starbucks Built a Company One Cup at a Time
Made to Stick: Why Some Ideas Survive and Others Die
The Startup of You: Adapt to the Future, Invest in Yourself, and Transform Your Career
A Mind for Numbers: How to Excel at Math and Science
The Design of Everyday Things
Getting There: A Book of Mentors
Peak: Secrets from the New Science of Expertise
Structure and Interpretation of Computer Programs (MIT Electrical Engineering and Computer Science)
In the Beginning...Was the Command Line
The Art of the Start: The Time-Tested, Battle-Hardened Guide for Anyone Starting Anything
Right Kind of Wrong: The Science of Failing Well
Hit Refresh: The Quest to Rediscover Microsoft's Soul and Imagine a Better Future for Everyone
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers―Straight Talk on the Challenges of Entrepreneurship
Amp It Up: Leading for Hypergrowth by Raising Expectations, Increasing Urgency, and Elevating Intensity
Range: Why Generalists Triumph in a Specialized World
Originals: How Non-Conformists Move the World
The $100 Startup: Reinvent the Way You Make a Living, Do What You Love, and Create a New Future
Show Your Work!: 10 Ways to Share Your Creativity and Get Discovered
The E-myth Revisited
Invent and Wander: The Collected Writings of Jeff Bezos
The Creative Habit: Learn It and Use It for Life
The Lean Startup
I, Steve: Steve Jobs In His Own Words
Humble Pi: A Comedy of Maths Errors
The Fifth Discipline: The Art & Practice of The Learning Organization
Smarter Faster Better: The Secrets of Being Productive in Life and Business
The 12 Week Year
How to Take Smart Notes
A World Without Email: Reimagining Work in an Age of Communication Overload
Please Understand Me II: Temperament, Character, Intelligence
The Practice: Shipping Creative Work
Zero to One: Notes on Startups, or How to Build the Future
Early Retirement Extreme: A Philosophical and Practical Guide to Financial Independence
The Last Lecture

