You are on page 1of 114

Aristotle and the art

of software development
Jonathan Dahl

http://tumblon.com (work)
http://zencoder.tv (product)
http://railspikes.com (blog)
Or: what does Athens have to
do with Silicon Valley?
Jonathan Dahl

http://tumblon.com (work)
http://zencoder.tv (product)
http://railspikes.com (blog)
Athens Silicon Valley
Ethics.
G
PG
PG-13
R
Ethics.
What makes a good programmer?
What makes a good programmer?
What makes a good programmer?
Anatomy of an action

Act - Effect
Actor
Deontology (Kant)

Act - Effect
Actor
Utilitarianism (Mill)

Act - Effect
Actor
Virtue (Aristotle)

Act - Effect
Actor
Immanuel Kant
Königsberg
deontology
duty
Principles
Categorical Imperative

Act only according to that maxim by


which you can at the same time will that
it should become a universal law
Don’t Repeat Yourself
100% Test Coverage
Write readable code
XP Rules
1.User stories are written. 16.The customer is always available.
2.Release planning creates the schedule. 17.Code must be written to agreed standards.
3.Make frequent small releases. 18.Code the unit test first.
4.The Project Velocity is measured. 19.All production code is pair programmed.
5.The project is divided into iterations. 20.Only one pair integrates code at a time.
6.Iteration planning starts each iteration. 21.Integrate often.
7.Move people around. 22.Use collective code ownership.
8.A stand-up meeting starts each day. 23.Leave optimization till last.
9.Fix XP when it breaks. 24.No overtime.
10.Simplicity. 25.All code must have unit tests.
11.Choose a system metaphor. 26.All code must pass all unit tests before it can
12.Use CRC cards for design sessions. be released.
13.Create spike solutions to reduce risk. 27.When a bug is found tests are created.
14.No functionality is added early. 28.Acceptance tests are run often and the
15.Refactor whenever and wherever score is published.
possible.
Don’t Repeat Yourself

Write clear, understandable code


development:
adapter: mysql
encoding: utf8
database: app_development
username: root
password:

test:
adapter: mysql
encoding: utf8
database: app_test
username: root
password:

production:
adapter: mysql
encoding: utf8
database: app_production
username: user
password: password
standard:
adapter: mysql
encoding: utf8

local:
username: root
password:

development:
<<: *standard
<<: *local
database: app_development

test:
<<: *standard
<<: *local
database: app_test

production:
<<: *standard
database: app_production
username: user
password: password
<% local_password = "" -%>
<% local_user = "root" -%>
<% [{:name => "development", :user => local_user, :password => local_password},
{:name => "test", :user => local_user, :password => local_password},
{:name => "production", :user => "user", :password => "password"}
].each do |environment| -%>
<%= environment[:name] %>
adapter: mysql
encoding: utf8
database: app_<%= environment[:name] %>
username: <%= environment[:user] %>
password: <%= environment[:password] %>
<% end -%>
John Stuart Mill
John Stuart Mill
Opposed slavery
Favored women’s suffrage
Free markets
(...with proper regulation)
Animal rights
Environmentalism
John Stuart Mill
Opposed slavery
Favored women’s suffrage
Free markets
(...with proper regulation)
Animal rights
Environmentalism

...way before these things were cool


Utilitarianism
Greatest good
for the greatest number
The ends justify the means
Lisp vs. Perl
Act - Effect
Actor
Philosophy
Philosophy
Ethics
Philosophy
Ethics
Politics
Philosophy
Ethics
Politics
Rhetoric
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Psychology
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Psychology
Biology
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Psychology
Biology
Physics
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Psychology
Biology
Physics
Astronomy
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Psychology
Biology
Physics
Astronomy
Economics
Philosophy
Ethics
Politics
Rhetoric
Aesthetics
Psychology
Biology
Physics
Astronomy
Economics
Logic
:ethics
:ethics == : “a life well lived”
:ethics == : “a life well lived” == :happiness
:ethics == : “a life well lived” == :happiness

Eudemonia (happiness)
eu: good
daimon: spirit
:ethics == : “a life well lived” == :happiness == :virtue
:ethics == : “a life well lived” == :happiness == :virtue
Courage
Temperance
Pride
Generosity
Good temper
Truthfulness
Wit
Friendliness
Modesty
Righteous
Indignation
Excess (too much) Virtue (just right) Defect (too little)
Rashness Courage Cowardice
Temperance
Pride
Generosity
Good temper
Truthfulness
Wit
Friendliness
Modesty
Righteous
Indignation
Excess (too much) Virtue (just right) Defect (too little)
Rashness Courage Cowardice
Indulgence Temperance Insensibility
Vanity Pride Lack of ambition
Prodigality Generosity Illiberality
Irascability Good temper Lack of spirit
Boastfulness Truthfulness False Modesty
Buffoonery Wit Boorishness
Obsequiousness Friendliness Cantankerousness
Shyness Modesty Shamelessness
Righteous
Envy Spitefulness
Indignation
practical wisdom
bootstrapping
modeling
Habits vs. Rules
Judgment vs. Ends
Habits vs. Rules
Judgment vs. Ends
Empower
programmers
Self-effacing
Pleasant to write
Happy and virtuous
virtues, not rules
virtues, not rules
moderation, not excess
virtues, not rules
moderation, not excess
judgment, not process
virtues, not rules
moderation, not excess
judgment, not process
whole of life
virtues, not rules
moderation, not excess
judgment, not process
whole of life
happiness
Thanks!
Slides at:
http://railspikes.com

Aristotle, Nicomachean Ethics

You might also like