2. 2
You are free to:
Copy, share, adapt, or re-mix;
Photograph, film, or broadcast;
Blog, live-blog, or post video of;
this presentation, provided that:
You attribute the work to its author and respect
the rights and licenses associated with its
components.
3. 3
A Quick Quiz
Given the statement: for x in [10, 20, 30]; y in [1, 2]:
print x+y
Would you expect to see:
A) 'x' and 'y' move forward at the
same rate:
11
22
B) 'y' goes through the second list
once for each value of 'x':
11
12
21
22
31
32
C) an error message because the
two lists are not the same length?
15. 15
Once Upon a Time...
1986: Start programming for physicists on
first-generation parallel computers
16. 16
Once Upon a Time...
1986: Start programming for physicists on
first-generation parallel computers
1992: Realize I'm doing more harm than good
17. 17
Once Upon a Time...
1986: Start programming for physicists on
first-generation parallel computers
1992: Realize I'm doing more harm than good
Giving a scientist a supercomputer
is like giving a Ferrari to a teenager
who can barely parallel park.
18. 18
See a Problem, Fix a Problem
“I don't know what to teach scientists
about how to build software.”
19. 19
See a Problem, Fix a Problem
“I don't know what to teach scientists
about how to build software.”
“I'll go learn from experts.”
20. 20
See a Problem, Fix a Problem
“I don't know what to teach scientists
about how to build software.”
“I'll go learn from experts.”
21. 21
See a Problem, Fix a Problem
“I don't know what to teach scientists
about how to build software.”
“I'll go learn from experts.”
(pause for laughter)
22. 22
Ninjas and Rock Stars
If big companies are doing it wrong,
agile startups must be doing it right.
23. 23
Ninjas and Rock Stars
(pause for further laughter)
If big companies are doing it wrong,
agile startups must be doing it right.
25. 25
Meanwhile...
1996: “What Should Computer Scientists
Teach to Physical Scientists and
Engineers?” (IEEE CS&E)
1997: John Reynders: “OK, show us”
26. 26
Meanwhile...
1996: “What Should Computer Scientists
Teach to Physical Scientists and
Engineers?” (IEEE CS&E)
1997: John Reynders: “OK, show us”
1998: First Software Carpentry course
at Los Alamos National Laboratory
31. 31
So Ten Years Ago...
1. I had learned most of what I knew about
building software on the job
32. 32
So Ten Years Ago...
1. I had learned most of what I knew about
building software on the job
2. Most of my colleagues knew nothing about
the hundreds of studies that had been done
of real programmers writing real programs
33. 33
So Ten Years Ago...
1. I had learned most of what I knew about
building software on the job
2. Most of my colleagues knew nothing about
the hundreds of studies that had been done
of real programmers writing real programs
cared
34. 34
So Ten Years Ago...
1. I had learned most of what I knew about
building software on the job
2. Most of my colleagues knew nothing about
the hundreds of studies that had been done
of real programmers writing real programs
Hands up if you think this has changed
in the last decade...
cared
35. 35
As Doomed as Doomed Can Be
From the people who
brought you UML...
36. 36
As Doomed as Doomed Can Be
From the people who
brought you UML...
...a re-founding of
software engineering...
37. 37
As Doomed as Doomed Can Be
From the people who
brought you UML...
...a re-founding of
software engineering...
...that doesn't cite a
single empirical study
39. 39
● How many experiments did you do as an
undergraduate?
Computer Science Isn't
40. 40
● How many experiments did you do as an
undergraduate?
● How much experimental data did you
analyze?
Computer Science Isn't
41. 41
● How many experiments did you do as an
undergraduate?
● How much experimental data did you
analyze?
● How many experimental papers did you read?
Computer Science Isn't
42. 42
● How many experiments did you do as an
undergraduate?
● How much experimental data did you
analyze?
● How many experimental papers did you read?
Computer Science Isn't
Hands up if you think this has changed
in the last decade...
45. 45
Where Are Our Examples?
It's how everybody else teaches...
This is not a new observation
46. 46
From: Greg Wilson
Subject: Beautiful Code
Date: May 17, 2006
I hope you don't mind mail out of the blue, but I'm working on a
new book project with O'Reilly called "Beautiful Code" and would
like to ask you to contribute an article-length section. Profits
from the book will be donated to Amnesty International.
The book will be a collection of master classes in software design.
In each chapter, a well-known software developer will present one
of his or her favorite pieces of code, then explain what makes it
particularly appealing. The aim is to "think aloud" while walking
through its design and implementation, so that junior developers
can learn to see through more experienced developers’ eyes.
Thanks,
Greg
48. 48
I expected
From: [name withheld]
Subject: re: Beautiful Code
Sorry, I'm too busy. Good luck.
Most people said
From: [name withheld]
Subject: re: Beautiful Code
I don't think I've ever written any beautiful code,
but I'd really like to read the book when it's done.
49. 49
I expected
From: [name withheld]
Subject: re: Beautiful Code
Sorry, I'm too busy. Good luck.
Most people said
From: [name withheld]
Subject: re: Beautiful Code
I don't think I've ever written any beautiful code,
but I'd really like to read the book when it's done.
But quite a few said
From: [name withheld]
Subject: re: Beautiful Code
Sure, count me in!
59. 59
Two Solitudes
Academics don't respect practitioners'
timescales
Also don't care if practitioners can't read
academic work
● More on that later
60. 60
Two Solitudes
Academics don't respect practitioners'
timescales
Also don't care if practitioners can't read
academic work
Practitioners don't understand that research isn't
about writing software
61. 61
Two Solitudes
Academics don't respect practitioners'
timescales
Also don't care if practitioners can't read
academic work
Practitioners don't understand that research isn't
about writing software
● Computer science is about the science of computing
62. 62
Two Solitudes
Academics don't respect practitioners'
timescales
Also don't care if practitioners can't read
academic work
Practitioners don't understand that research isn't
about writing software
● Computer science is about the science of computing
● Computer scientists are actually penalized for writing
product-quality code
66. 66
It Took Medicine 200 Years
Britain lost 1512 sailors to enemy action...
Seven Years' War (actually 1754-63)
67. 67
It Took Medicine 200 Years
Britain lost 1512 sailors to enemy action...
...and almost 100,000 to scurvy
Seven Years' War (actually 1754-63)
68. 68
It Took Medicine 200 Years
1747: James Lind does the
first controlled medical
experiment in history
69. 69
It Took Medicine 200 Years
1747: James Lind does the
first controlled medical
experiment in history
1950: Hill & Doll's case control
study of smokers and
non-smokers
72. 72
Findings
1. Smoking causes lung cancer
2. Most people would rather
fail than change
“What happens 'on average' is of no help
when one is faced with a specific patient...
74. 74
Like Water on Stone
Doctors know:
1. what science looks like
2. what it has to do with them
75. 75
Like Water on Stone
Doctors know:
1. what science looks like
2. what it has to do with them
So they make the next generation learn it
76. 76
Like Water on Stone
Doctors know:
1. what science looks like
2. what it has to do with them
So they make the next generation learn it
And around and around we go
77. 77
I Have a Cunning Plan
Stop asking students to
try to do something our
system won't let them do
78. 78
I Have a Cunning Plan
D.L. Parnas and P.C. Clements: “A Rational
Design Process: How and Why to Fake It.”
IEEE Trans. Softw. Eng., 12(2), Feb. 1986.
Stop asking students to
try to do something our
system won't let them do
79. 79
I Have a Cunning Plan
Stop asking students to
try to do something our
system won't let them do
Have them do science instead
80. 80
I Have a Cunning Plan
A new scientific truth does not
triumph by convincing its opponents
and making them see the light, but
rather because its opponents
eventually die, and a new generation
grows up that is familiar with it.
- Max Planck
81. 81
I Have a Cunning Plan
A new scientific truth does not
triumph by convincing its opponents
and making them see the light, but
rather because its opponents
eventually die, and a new generation
grows up that is familiar with it.
- Max Planck
The next generation should do empirical studies
82. 82
I Have a Cunning Plan
A new scientific truth does not
triumph by convincing its opponents
and making them see the light, but
rather because its opponents
eventually die, and a new generation
grows up that is familiar with it.
- Max Planck
The next generation should do empirical studies
(or at least read and analyze others' studies)
83. 83
I Have a Cunning Plan
The next generation should do empirical studies
(or at least read and analyze others' studies)
so that they will understand and value science
A new scientific truth does not
triumph by convincing its opponents
and making them see the light, but
rather because its opponents
eventually die, and a new generation
grows up that is familiar with it.
- Max Planck
84. 84
Assignment #1
You have been given 80K lines of C, and the output
of a static analysis tool that identifies lines containing
buffer overruns, memory leaks, and other issues
related to memory management. Determine whether
complex functions are more likely to contain such
errors than simple ones.
85. 85
Assignment #1
You have been given 80K lines of C, and the output
of a static analysis tool that identifies lines containing
buffer overruns, memory leaks, and other issues
related to memory management. Determine whether
complex functions are more likely to contain such
errors than simple ones.
Requires:
● Tool use
86. 86
Assignment #1
You have been given 80K lines of C, and the output
of a static analysis tool that identifies lines containing
buffer overruns, memory leaks, and other issues
related to memory management. Determine whether
complex functions are more likely to contain such
errors than simple ones.
Requires:
● Tool use
● Model building
87. 87
Assignment #1
You have been given 80K lines of C, and the output
of a static analysis tool that identifies lines containing
buffer overruns, memory leaks, and other issues
related to memory management. Determine whether
complex functions are more likely to contain such
errors than simple ones.
Requires:
● Tool use
● Model building
● Statistics
88. 88
Assignment #1
You have been given 80K lines of C, and the output
of a static analysis tool that identifies lines containing
buffer overruns, memory leaks, and other issues
related to memory management. Determine whether
complex functions are more likely to contain such
errors than simple ones.
Requires:
● Tool use
● Model building
● Statistics
89. 89
The Biggest Challenge
http://tinyurl.com/nwit-randomo
Stefik et al: “An Empirical Comparison of the Accuracy Rates of Novices using the
Quorum, Perl, and Randomo Programming Languages.” PLATEAU'11
We present here an empirical study comparing the accuracy rates of novices writing
software in three programming languages: Quorum, Perl, and Randomo. The first
language, Quorum, we call an evidence-based programming language, where the
syntax, semantics, and API designs change in correspondence to the latest academic
research and literature on programming language usability. Second, while Perl is well
known, we call Randomo a Placebo-language, where some of the syntax was chosen
with a random number generator and the ASCII table. We compared novices that were
programming for the first time using each of these languages, testing how accurately
they could write simple programs using common program constructs (e.g., loops,
conditionals, functions, variables, parameters). Results showed that while Quorum
users were afforded significantly greater accuracy compared to those using Perl and
Randomo, Perl users were unable to write programs more accurately than those using
a language designed by chance.
93. 93
The Biggest Challenge
http://tinyurl.com/nwit-randomo
...from reading the responses, what I think our community really needs to
do is to move away from a largely pseudo-scientific view of programming
language design toward one based on evidence. The scientific method
has a much better chance of ending the programming language wars
someday than does continuing to argue about it.
Please read the comments
94. 94
The Biggest Challenge
http://tinyurl.com/nwit-randomo
...from reading the responses, what I think our community really needs to
do is to move away from a largely pseudo-scientific view of programming
language design toward one based on evidence. The scientific method
has a much better chance of ending the programming language wars
someday than does continuing to argue about it.
Finally...for those readers that absolutely must send hate mail, please
send it only to me, not my students.
Please read the comments
95. 95
But That Won't Be Enough
http://exple.tive.org/blarg/2013/10/22/citation-needed/
...starting at 1 is not an unreasonable position at all; to
a typical human thinking about the zeroth element of an
array doesn’t make any more sense than trying to catch
the zeroth bus that comes by, but we’ve clearly ended
up here somehow. So what’s the story there?
98. 98
Wales' Law
Open information drives out closed.
As far as most programmers are concerned,
your research doesn't exist.
99. 99
Wales' Law
Open information drives out closed.
As far as most programmers are concerned,
your research doesn't exist.
And please don't say, “But they can just...”
101. 101
Wilbanks' Rule
The opposite of “open” isn't “closed”.
The opposite of “open” is “broken”.
Do you think your use of obviously broken systems
makes programmers more or less receptive
to your ideas?
102. 102
Wilbanks' Rule
The opposite of “open” isn't “closed”.
The opposite of “open” is “broken”.
Do you think your use of obviously broken systems
makes programmers more or less receptive
to your ideas?
“They want me to upload a PDF? What is this, 1995?”
103. 103
People who can read your research
are more likely to help you keep doing it.
104. 104
People who can read your research
are more likely to help you keep doing it.
It is therefore in your interest
to create such people
and give them access to your work.
105. 105
People who can read your research
are more likely to help you keep doing it.
It is therefore in your interest
to create such people
and give them access to your work.
It'll take a decade.
106. 106
People who can read your research
are more likely to help you keep doing it.
It is therefore in your interest
to create such people
and give them access to your work.
It'll take a decade.
But isn't that what tenure is for?
110. 110
Now in three volumes!
Thank You
Software Carpentry http://software-carpentry.org
Never Work in Theory http://neverworkintheory.org
Architecture of
Open Source Applications
http://aosabook.org