最近重閱「Egoless Programming」(無我編程) 的十誡,隨著程式開發經驗增長,感觸愈深。

語出《The Psychology of Computer Programming》,作者是我敬重的 Gerald M. Weinberg

Artificial Intelligence Network

image credit : https://pixabay.com/illustrations/artificial-intelligence-network-3706562/

1. Understand and accept that you will make mistakes.

理解並接受你終將犯錯。

關鍵是能在投入生產之前儘早發現。

2. You are not your code.

你,不是你的程式。

檢視(審查)程式的意義在於發現問題,而且問題總是會被找出來。當發現問題,不要視為是自己的問題。軟體是用來修改、重寫或棄用的,而你不是。

3. No matter how much “karate” you know, someone else will always know more.

無論你知道多少「競技」(空手道),總有人比你知道得更多。

謙虛地向任何人學習。

4. Don’t rewrite code without consultation.

不要未經討論就重寫程式。

學著與別人交流、諮詢,這個「過程」才會讓你學到更多。

5. Treat people who know less than you with respect, deference, and patience.

用尊重、敬意和耐心,對待那些比你懂得少的人。

一個人走得快,但一群人走得遠。

6. The only constant in the world is change.

世上唯一不變的就是變化。

軟體的本質就是「軟」,擁抱其易變的特質。

7. The only true authority stems from knowledge, not from position.

真正的威信來自於知識,而不是地位。

如果你的權力來自於地位,你就失去了團隊。

8. Fight for what you believe, but gracefully accept defeat.

為你的信念而戰,並在失敗時優雅地接受。

積極討論,並接受團隊的選擇。即使最終證實你是正確的,也不要報復或嘲諷地說「我早就說過了」。

9. Don’t be “the guy in the room.”

不要成為鶴立雞群、閉關自守的人。

軟體開發是協作的,不要變成不合群、自以為是、單幹的「那個人」。

10. Critique code instead of people – be kind to the coder, not to the code.

評議程式,不是對人。善待編程者,不是程式碼。

正向 (對人)、正念 (對己) 地提出評論。軟體是用來修改、重寫或棄用的,而你同事不是。