程序员应该知道的97件事
- Act with prudence: 关注技术债
- Appply Functional Programming Principles
- Ask, “what would the User do”?: 观察用户操作
- Automate your coding standard:
- Beauty is in Simplicity: 代码可读性,可维护性,部署速度,
- Before you refactor: 保证测试;避免重写一切;多次增量改变;确保现有测试通过;不要带入个人偏好;不要盲目追求新技术;
- Beware the share:检查上下文
- The boy scout rule: 每次代码仓库要更干净
- Check your code first before looking to blame others
- Choose tools with care
- Code in the language of the domain: 代码更好反映出领域模型
- Code is Design
- Code layout matters: Easy to scan; Expressive layout; Compact format
- Code Reviews: 目的是为了共享知识和建立共同的编程原则;评论一件要有建设性,而不是刻薄。不同的人可以有不同的关注点(异常、文档、函数功能)
- Coding with reason:
- A comment on Comments:
- Comment only what the code cannot say.
- continuous learning
- Convenience Is Not an -ility: 不要因为方便而设计复杂的api
- Deploy early and Often:
- Distinguish Business Exceptions from Technical:
- Do lots of Deliberae Practice: 挑战超出现有能力的练习,尝试、分析并且纠正
- Domain-Specific Languages
- Don’t be afraid to break things
- Don’t be cute with your test data: when writing any text in your code(comments, logging,dialogs,test data),always ask yourself how it will look if it becomes public.
- Don’t Ignore That Error:
- Don’t just learn the language, understaned it’s culture
- Don’t Nail your program into the upright position: 不要让用户看到异常报告。
- Don’t rely on ‘magic happens here’
- Don’t Repeat Yourself
- Don’t touch that code
- Encapsulate Behavior, Not just State
- Floating-Point Numbers Aren’t Real
- Fulfill yur amtibions with open source
- The golden Rule of Api Designn:仅仅为api写单元测试还不够,还要为使用用你的api的代码写单元测试。
- The Guru Myth
- Hard Work Does Not Pay off: act like a professional: prepare, effect, observe, reflect, and change.
- How to use a bug tracker: bug report:如何复现;期望行为;实际行为。
- Improve Code by Removing it.
- Install me
- Interprocess communication affects application response time:
- Keep the build clean.
- Know how to use command line tools
- Know Well More Than two programming languages
- Know Your IDE
- Know Your Limits: 不同介质访问速度,不同算法的时间复杂度。
- Know Your Next commit: 不要向代码库提交你的 guesswork
- Large, Interconnected data belongs to a database
- Learn Foreign Languages
- Learn to estimate: estimate, target and commitment.
- Learn to Say, ‘hello, world’
- Let your project speak for itself.
- Make Interfaces Easy to use correctly and hard to use incorrectly.
- Make the Invisible More Visible.
- Message Passing Leads to Better Scalability in Parallel Systems.
- A message to the future