The Ten Commandments of Egoless Programming

The Ten Commandments of Egoless Programming

无我编程的十诫

  1. Understand and accept that you will make mistakes. The point is to find them early before they make it into production. Fortunately, except for the few of us developing rocket guidance software at JPL, mistakes are rarely fatal in our industry. We can, and should, learn, laugh, and move on.

    理解并接受你会犯错误。关键是要在错误进入生产之前尽早发现它们。幸运的是,除了我们在 JPL 开发火箭制导软件的少数人之外,错误在我们的行业中很少是致命的。我们可以,也应该,学习、欢笑并继续前进。

  2. You are not your code. Remember that the entire point of a review is to find problems, and problems will be found. Don’t take it personally when one is uncovered. (Allspaw note – related: see below, number #10, and the points Theo made above.)

    你不是你的代码。请记住,审查的整个目的就是发现问题,而问题会被发现。当发现问题时,不要把它当作个人问题。(Allspaw 注 – 相关内容:见下文,第 #10 条,以及 Theo 上面提到的要点。)

  3. No matter how much “karate” you know, someone else will always know more. Such an individual can teach you some new moves if you ask. Seek and accept input from others, especially when you think it’s not needed.

    无论你知道多少“空手道”,总会有人知道更多。如果你请求,这样的人可以教你一些新招式。寻求并接受他人的意见,尤其是在你认为不需要的时候。

  4. Don’t rewrite code without consultation. There’s a fine line between “fixing code” and “rewriting code.” Know the difference, and pursue stylistic changes within the framework of a code review, not as a lone enforcer.

    在没有咨询的情况下不要重写代码。“修复代码”和“重写代码”之间有一条细微的界限。了解区别,并在代码审查的框架内追求风格上的变化,而不是作为孤独的执行者。

  5. Treat people who know less than you with respect, deference, and patience. Non-technical people who deal with developers on a regular basis almost universally hold the opinion that we are prima donnas at best and crybabies at worst. Don’t reinforce this stereotype with anger and impatience.

    尊重、谦恭和耐心地对待那些知识不如你的人。与开发人员定期打交道的非技术人员几乎普遍认为我们充其量是自命不凡,最糟糕的是像小孩一样哭闹。不要用愤怒和不耐烦来强化这种刻板印象。

  6. The only constant in the world is change. Be open to it and accept it with a smile. Look at each change to your requirements, platform, or tool as a new challenge, rather than some serious inconvenience to be fought.

    世界上唯一不变的就是变化。要对变化保持开放态度,并以微笑接受它。将每一次对您的需求、平台或工具的变化视为一个新的挑战,而不是需要抗拒的严重不便。

  7. The only true authority stems from knowledge, not from position. Knowledge engenders authority, and authority engenders respect — so if you want respect in an egoless environment, cultivate knowledge.

    唯一真正的权威源于知识,而非地位。知识产生权威,权威产生尊重——因此,如果你想在一个无自我的环境中获得尊重,就要培养知识。

  8. Fight for what you believe, but gracefully accept defeat. Understand that sometimes your ideas will be overruled. Even if you are right, don’t take revenge or say “I told you so.” Never make your dearly departed idea a martyr or rallying cry.

    为你所信仰的而奋斗,但优雅地接受失败。要明白,有时你的想法会被否决。即使你是对的,也不要报复或说“我早就说过了。”永远不要让你心爱的想法成为殉道者或号召口号。

  9. Don’t be “the coder in the corner.” Don’t be the person in the dark office emerging only for soda. The coder in the corner is out of sight, out of touch, and out of control. This person has no voice in an open, collaborative environment. Get involved in conversations, and be a participant in your office community.

    不要成为“角落里的程序员”。不要成为那个在黑暗办公室里只为喝汽水而出现的人。角落里的程序员不在视线范围内,失去联系,失去控制。这个人在开放、协作的环境中没有发言权。参与对话,成为你办公室社区的参与者。

  10. Critique code instead of people — be kind to the coder, not to the code. As much as possible, make all of your comments positive and oriented to improving the code. Relate comments to local standards, program specs, increased performance, etc.

    批评代码而不是人 — 对编码者要友善,而不是对代码。尽可能使您的所有评论都是积极的,并旨在改善代码。将评论与本地标准、程序规范、性能提升等相关联。