初めに
時間は有限、だから過去の偉人から学ぼう。
DRY原則
Don't Repeat Yourself.
Andy Hunt(アンディ・ハント)とDave Thomas(デイブ・トーマス)がThe Pragmatic Programmerの中で提唱した言葉。
同じコードを繰り返さない。
KISS原則
Keep it simple stupid.
Wikipedia
Kelly Johnson(ケリー・ジョンソン)の言葉
句読点のついた
Keep it simple,stupid.
の方が有名。
シンプルであれ。
SOLID原則
Wikipedia
Robert C. Martin(ロバート・C・マーティン)が提唱していた数々の設計原則からMichael C. Feathers(マイケル・フェザーズ)がこの5つの頭文字を取り普及させた。
マーティンの設計原則はDesign Principles and Design Patternsの中で紹介されている。
オブジェクト指向で用いられる5つの原則の頭文字。
- 単一責任の原則
Single responsibility principle
- 開放閉鎖の原則
Open/closed principle
- リスコフの置換原則
Liskov substitution principle
- インターフェース分離の原則
Interface segregation principle
- 依存性逆転の原則
Dependency inversion principle
YAGNI原則
You Aren't Gonna Need It.
Wikipedia
エクストリーム・プログラミング(XP)から生まれた原則。
いま必要でないものを追加するな。
NIP
Naming is important.
"命名"が最も大事。
法則
90対90の法則
The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time.
Wikipedia
ベル研究所のTom Cargill(トム・カーギル)が考案した
ホフスタッターの法則
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
wikipedia
Douglas Hofstadter(ダグラス・ホフスタッター)が著書の中で提唱した格言。
格言
There are only two kinds of languages: the ones people complain about and the ones nobody uses.
C++開発者Bjarne Stroustrup
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
アジャイルソフトウェア開発宣言の起草者Martin Fowler
Talk is cheap. Show me the code.
Given enough eyeballs, all bugs are shallow.
Linus Torvalds
An algorithm must be seen to be believed.
Premature Optimization is the Root of All Evil.
Texの開発者Donald E.Knuth
The only way to learn a new programming language is by writing programs in it.
Cの開発者Dennis Ritchie
Done is better than perfect.
Facebook創業者Mark Zuckerberg
Simple is better than complex.
Tim PetersのZen of Python
Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.
Simplicity is prerequisite for reliability.
Program testing can be used to show the presence of bugs, but never to show their absence!
Edsger W.Dijkstra
Laziness, Impatience, Hubris
Perlの開発者Larry Wall
The best code is no code at all
Stack Overflow の共同創設者Jeff Atwood
Truth can only be found in one place: the code
The only way to go fast, is to go well,
Clean code always looks like it was written by someone who cares
SOLID原則の提唱者Robert C. Martin
Adding manpower to a late software project, makes it later.
IBMのSystem/360開発を指揮したFred Brooks
Individuals and interactions over processes and tools
アジャイルマニフェストより
Quality takes time and reduces quantity, so it makes you, in a sense, less efficient.
Tom DeMarco
With enough eyes, all bugs are shallow.
オープンソース運動の立役者Eric S.Raymond
Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration
作家Stan Kelly-Bootle
It's easier to ask forgiveness than it is to get permission
コンピューターおばあちゃんGrace Hopper
Write Once, Run Anywhere (WORA)
Java
プログラマーの幸せを最適化する
Ruby
Simple, Poetic, Pithy
Go
Complexity kills. It sucks the life out of developers, it makes products difficult to plan, build, and test.” —Ray Ozzie, CTO, Microsoft Corporation
Programmers should find joy in programming. Good programs should be beautiful.
ジョーク類
If debugging is the process of removing bugs, then programming must be the process of putting them in.
It's works on my machine.
It’s not a bug, it’s an undocumented feature.
C makes it easy to shoot yourself in the foot. C++ makes it harder, but when you do, it blows away your whole leg. - Bjarne 'Stumpy' Stroustrup
Definition of an Upgrade: Take old bugs out, put new ones in.
Never esecute code written on a Friday or a Monday.
There are only two hard problems in Computer Science: cache invalidation and naming things.
whenever I hear someone mentioning the word framework, my hopes of seeing actual working code are devastated.
A fool with a tool is still a fool. But now, it's a dangerous fool.
Sufficiently advanced incompetence is indistinguishable from malice
終わりに
~Thank you for reading~