程序员修炼之道--从小工到专家
2019-02-16 本文已影响0人
geeker_leon
A Pragmatic Philosophy
- Provide options, don't make lame excuses
- Don't live with broken windows
- Be a catalyst for change(石头汤)
- Remember the big picture
- Make quality a requirement issue
- Invest regularly in your knowledge portfolio
- Critically analyze what you read and hear
- It's both what you say and the way you say it
A Pragmatic Approach
- DRY-Don't repeat yourself
- Make it easy to reuse
- Eliminate effects between unrelated things
- There are no final decisions
- Use tracer bullets to find the target
- Prototype to learn
- Program close to the problem domain
- Estimate to avoid surprises
- Iterate the schedule with the code
The Basic Tools
- Keep knowledge in plain text
- Use the power of command shells
- Use a single editor well
- Always use source code control
- Fix the problem, not the blame
- Don't panic
- "Select" isn't broken
- Don't assume it - prove it
- Learn a text manipulation language
- Write code that writes code
Pragmatic Paranoia
- You can't write perfect software
- Design with contracts(iContract)
- Crash early
- If it can't happen, use assertions to ensure that it won't
- Use exceptions for exceptional problems
- Finish what you start
Bend, or Break
- Minimize coupling between modules
- Configure, don't integrate
- Put abstractions in code, details in metadata
- Analyze workflow to improve concurrency
- Design using services
- Always design for concurrency
- Separate views from models
- Use Blackboards to Coordinate workflow
While you are coding
- Don't program by coincidence
- Estimate the order of your algorithms
- Test your estimates
- Refactor early, refactor often
- Design to test
- Test your software, or your users will
- Don't use wizard code you don't understand
Before the project
- Don't gather requirements - dig for them
- Work with a user to think like a user
- Abstractions live longer than details
- Use a project glossary
- Don't think outside the box - find the box
- Start when you're ready
- Some things are better done than described
- Don't be a slave to formal methods
- Costly tools don't produce better designs
Pragmatic projects
- Organize teams around functionality
- Don't use manual procedures
- Test early, test often, test automatically
- Coding ain't done till all the tests run
- Use saboteurs to test your testing
- Test state coverage, not code coverage
- Find bugs once
- English is just a programming language
- Buid documentation in, don't build it on
- Gently exceed your users' expectations
- Sign your work