More on this book
Community
Kindle Notes & Highlights
How did they get so smart? Aren't they just as focused on details as other programmers? The answer is that they paid attention to what they were doing while they were doing it—and then they tried to do it better.
That meeting wasn't something keeping them from programming. It was programming. And it was programming that could be improved. I know they think this way because it is tip number two: Think About Your Work.
Early adopter/fast adapter. You have an instinct for technologies and techniques, and you love trying things out.
You tend to ask questions. That's neat—how did you do that? Did you have problems with that library? What's this BeOS I've heard about? How are symbolic links implemented?
Critical thinker. You rarely take things as given without first getting the facts. When colleagues say "because that's the way it's done," or a vendor promises the solution to all your problems, you smell a challenge.
We feel that there is no point in developing software unless you care about doing it well.
In order to be a Pragmatic Programmer, we're challenging you to think about what you're doing while you're doing it.
A tourist visiting England's Eton College asked the gardener how he got the lawns so perfect. "That's easy," he replied, "You just brush off the dew every morning, mow them every other day, and roll them once a week."
Great lawns need small amounts of daily care, and so do great programmers. Management consultants like to drop the word kaizen in conversations. "Kaizen" is a Japanese term that captures the concept of continuously making many small improvements. It was considered to be one of the main reasons for the dramatic gains in productivity and quality in Japanese manufacturing and was widely copied throughout the world. Kaizen applies to individuals, too. Every day, work to refine the skills you have and to add new tools to your repertoire.
What distinguishes Pragmatic Programmers? We feel it's an attitude, a style, a philosophy of approaching problems and their solutions. They think beyond the immediate problem, always trying to place it in its larger context, always trying to be aware of the bigger picture. After all, without this larger context, how can you be pragmatic? How can you make intelligent compromises and informed decisions?
Pragmatic programming stems from a philosophy of pragmatic thinking.
The Cat Ate My Source Code
The greatest of all weaknesses is the fear of appearing weak.
If the disk crashes—taking all of your source code with it—and you don't have a backup, it's your fault.
While software development is immune from almost all physical laws, entropy hits us hard. Entropy is a term from physics that refers to the amount of "disorder" in a system.
The "Broken Window Theory" has inspired police departments in New York and other major cities to crack down on the small stuff in order to keep out the big stuff.
Don't leave "broken windows" (bad designs, wrong decisions, or poor code) unrepaired.
By the same token, if you find yourself on a team and a project where the code is pristinely beautiful—cleanly written, well designed, and elegant—you will likely take extra special care not to mess it up, just like the firefighters.
if you place the frog in a pan of cold water, then gradually heat it, the frog won't notice the slow increase in temperature and will stay put until cooked.
Striving to better, oft we mar what's well.
Great software today is often preferable to perfect software tomorrow. If you give your users something to play with early, their feedback will often lead you to a better eventual solution
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.
Don't spoil a perfectly good program by overembellishment and over-refinement. Move on, and let your code stand in its own right for a while. It may not be perfect. Don't worry: it could never be perfect.
5. Your Knowledge Portfolio
An investment in knowledge always pays the best interest.
Why, if we could just be early to bed and early to rise, we'd be great programmers—right? The early bird might get the worm, but what happens to the early worm?
Serious investors invest regularly—as a habit.
Diversification is the key to long-term success.
Smart investors balance their portfolios between conservative and high-risk, ...
This highlight has been truncated due to consecutive passage length restrictions.
Investors try to buy low and sell high for ...
This highlight has been truncated due to consecutive passage length restrictions.
Portfolios should be reviewed and rebalance...
This highlight has been truncated due to consecutive passage length restrictions.
Don't put all your technical eggs in one basket.
Buy low, sell high. Learning an emerging technology before it becomes popular can be just as hard as finding an undervalued stock, but the payoff can be just as rewarding.
Read a technical book each quarter.
Participate in local user groups.
It's important to continue investing. Once you feel comfortable with some new language or bit of technology, move on. Learn another one.
Don't let it stop there. Take it as a personal challenge to find the answer. Ask a guru.
The last important point is to think critically about what you read and hear. You need to ensure that the knowledge in your portfolio is accurate and unswayed by either vendor or media hype.
Just because a bookstore features a book prominently doesn't mean it's a good book, or even popular; they may have been paid to place it there.
I believe that it is better to be looked over than it is to be overlooked.
Make what you're saying relevant in time, as well as in content. Sometimes all it takes is the simple question "Is this a good time to talk about...?"
In addition, the book Dinosaur Brains [Ber96] discusses the emotional baggage we all bring to the work environment.
Unfortunately, knowledge isn't stable. It changes—often rapidly. Your understanding of a requirement may change following a meeting with the client.
DRY—Don't Repeat Yourself
Documentation in code. Programmers are taught to comment their code: good code has lots of comments. Unfortunately, they are never taught why code needs comments: bad code requires lots of comments.
computing, the term has come to signify a kind of independence or decoupling. Two or more things are orthogonal if changes in one do not affect any of the others.
Often this is an orthogonality issue. When teams are organized with lots of overlap, members are confused about responsibilities. Every change needs a meeting of the entire team, because any one of them might be affected.
Also ask yourself how decoupled your design is from changes in the real world. Are you using a telephone number as a customer identifier? What happens when the phone company reassigns area codes? Don't rely on the properties of things you can't control.
Keep your code decoupled. Write shy code—modules that don't reveal anything unnecessary to other modules and that don't rely on other modules' implementations.