-
[ techno/rock music playing ]
-
So yeah, um, when I read the annotations
for the papers we left me top says it's
-
about computer science and papers. I'm
going to break all the rules.
-
And this is a book. Here's a real copy.
And it's not about computer science.
-
But I still think it's relevant. And it
sort of—
-
When I was in Cambridge, the PhD only
takes 3 or 4 years.
-
And when I was in the last year, as every
PhD student, I sort of started thinking
-
"Hmm, what am I actually doing here?"
[ audience laughter ]
-
Not in the sort of meaning of life sense,
but more in the work sense.
-
I found it really interesting to read some
of the fellows of your science works,
-
because they're doing exactly that;
they're trying to understand how science
-
works, what's the right way of reasoning,
how should we do things, and how does
-
science actually work if you look at it
from the historical perspective.
-
And so this is one of the books that I
found just so refreshing.
-
When you spend 3 years writing equations,
this is the book you should read.
-
And I think it could have pretty much the
same effect on people who do a lot of
-
computer science or programming in
general.
-
I'll start with just a brief context, and
it fits in this Philosophy of Science
-
discipline.
-
Philosophy of Science is sort of inspired
by the idea that if you look at how
-
physics has been doing over the last 300
years, it worked pretty well.
-
We know a lot of things about physics. And
that's because physics found this nice
-
method called the scientific method.
-
If other disciplines want to get as far as
physics got, we should understand what is
-
the scientific method, like why does it
actually work, and learn how to apply it.
-
So that's the idea that sort of inspired
some of the Philosophy of Science, and
-
that means we want to understand what's
the method how people actually work, how
-
we build sort of correct theories, how we
learn how to verify the theories, but it
-
also means looking at the history and
seeing what sort of scientific work
-
happened and what can we learn from that.
-
I think there's not much that has been
done on philosophy and history of computer
-
science specifically, just because it's
not really that old.
-
There's some really interesting work done
on history of computer science, but
-
I think there's a lot more that could be
done in that area.
-
So, what I'm going to do here is I'll talk
mainly about Paul Feyerabend's book, and
-
I'll have various side notes linking it to
ideas from computer science where I think
-
it makes some sense.
-
Audience Member: How do we know that the
scientific method works?
-
How do we know that the scientific method
works? That's a really good question, and
-
that's one of the questions that's
questioned here as well.
-
There's been a lot of things in that
area; I just picked some of the books
-
I like, so this is not like an organized
scheme, but if you want to read some nice
-
book, here's a bunch of them.
-
One of the really early ones was Karl
Popper, who came up with this idea of
-
falsification. So, what he said is, if you
are proposing a scientific theory, it's
-
only scientific if it can be falsified.
-
So, if you're proposing a theory, it's
only science if there is a way that it can
-
be invalid.
-
If you're saying something that can't be
invalidated, that's not science.
-
Then a few people reacted to this.
-
Thomas Kuhn, with his Scientific
Revolutions, he sort of looked at this
-
nice, rational way of building science,
and said,
-
"Well, actually, sometimes this is not how
it looks."
-
If you look at history, there's moments
where just kind of people start thinking
-
about stuff in a completely different way.
-
So, this is kind of what happens in
Copernican Revolution, what Newton does,
-
what happens with the theory of
relativity, you just have to, not really
-
throw away everything, but it's more like
rephrasing everything that has been done
-
before, and building a new ground
underneath.
-
Lakatos, with research programmes, follows
kind of similar idea, but he says if you
-
look at science overall, at any single
moment there's multiple research groups or
-
research programmes where they have some
basic assumptions that they're never going
-
to question.
-
And that's kind of against what Popper
was saying, where he said anything you
-
should be able to question, anything must
be falsifiable.
-
In reality, scientists don't really
question everything.
-
They always have some core assumptions
that's just never false.
-
Like, whenever if you were getting to the
dangerous area, you always find some side
-
condition.
-
I guess you could sort of say in pure
functional programming, you have a core
-
assumption that you can write any code
without using mutation.
-
If you need to write some efficient h
table, you'll just say ahh, it's not that
-
I should use mutation here, it's just that
the compiler must do a better optimization
-
[ audience laughter ]
-
So, that's another fun thing there.
-
Feyerabend goes even further, and he's—
you'll see that in the rest of the talk.
-
The last one I put here, I find that also
interesting because that's more looking at
-
how if you look at science from the
historical perspective, or if you think
-
what has been done in science, and how
computers were invented, we have this very
-
ideal picture of how everything just
followed very nicely, linearly, towards
-
the ultimate truth.
-
This book is looking at how it actually
works when it's building.
-
So that's another point against this
beautiful idea of how perfect science is.
-
So, in Paul Freyerabend's book, he has
this phrase or slogan which is probably
-
the one thing to remember if you don't
want to remember it quite well, or if you
-
want to have slightly skewed picture of
the book then this is the thing to
-
remember.
-
But, he says, "To those who look at the
rich material provided by history—"
-
And I had to truncate it to fit it on the
slide, but it also says: "To those who
-
look at the rich material provided by
history, and who are not intent of
-
impoverishing it in order to please their
their lower instincts, their craving for
-
intellectual security in the form of
clarity, precision, objectivity and truth,
-
it will become clear there is only one
principle that can be defended under all
-
circumstances and in all stages of human
development,
-
it's the principle: anything goes."
-
I just wanted to read it because that
shows you how enjoyable the book is.
-
[ audience laughter ]
-
And he isn't really saying that there's no
order whatsoever; he had a clarification
-
later, where he says, "It's not really
that I'm saying that there should be no
-
order; I'm just saying that if you look at
the history, there's no single principle
-
that always applies."
-
And there are various principles that
work in some cases, and when scientists do
-
work, they follow some principles, always,
but there's just no single unifying
-
principle behind everything. And that's
kind of against this idea that physics
-
follows this beautiful scientific method
that we can just understand and copy.
-
Freyerabend says there's no such thing.
-
And he does do things in the books.
-
One is that he has his humanitarian
argument, where he tries to explain why
-
is it better for science, for mankind, and
for everyone, but he also has this
-
historical perspective which is mostly
around Galileo Galilei and how he managed
-
to convince scientists that heliocentrism
is the right way of modeling the universe.
-
I guess when you think of Galileo Galilei
many people think of it as this genius
-
scientist who was right and won over the
church, who were just following some
-
orthodoxy and were obviously wrong.
-
What's really interesting in Freyerabend's
book is that he actually tries to
-
understand it more from a historical
perspective, and tries to understand what
-
was scientific back then and how Galileo
actually in many places didn't really
-
follow the scientific method of the time.
-
So, he has again a beautiful quote. So
Galileo of course has some intellectual
-
reasons, there's some good motivation for
it, but he also uses propaganda and
-
psychological tricks to convince people of
his model.
-
And there's a number of really interesting
cases there.
-
So, something Freyerabend calls natural
interpretations, which is sort of what you
-
just believe in without heavy thinking.
-
Like, that's the background, and on top of
that, you can do science and think.
-
So if you were living in that time, the
first argument against the claim that the
-
earth is moving is that you don't feel it.
-
I go outside - nothing's moving with me.
-
I'm just standing. Like, I don't feel the
movement.
-
And if you were living in a world where
everyone believes that the earth doesn't
-
move, then that's a very valid point,
because if you get on a horse carriage and
-
it starts moving, you can feel it, right?
-
So the fact that you don't feel it is the
first sort of natural interpretation that
-
Galileo has to break and convince you that
actually, it can be moving even though you
-
don't feel it.
-
The other argument against movement of
Earth was the idea that if you climb on a
-
large tower and you throw a stone, then if
the earth was rotating then the stone
-
would fall somewhere further or closer to
the tower.
-
And, again, in the model that people
believed in back then, this is a perfectly
-
valid point.
-
And so what Galileo has to do is that he
has to invent completely new story about
-
how the world works, and the interesting
bit there is that he actually has to
-
combine two things at the same time.
-
So it's not like you could add one thing
and clarify how things work, and add one
-
more, and get closer to the right model,
you just have to convince everyone that
-
everything is different.
-
You have to come up with the idea that
every movement is relative, and if you are
-
on the earth, and the whole earth is
moving, you don't have to feel it.
-
And he also has to come up with the idea
that if the tower is rotating and the
-
stone is thrown from the tower, it will
continue rotating with the tower.
-
And this is like one place where you're
not just doing small addition to the
-
scientific image; you just have to change
the whole story.
-
So that's what Freyerabend calls natural
interpretations, and that's sort of the
-
background on top of which we are thinking
or doing science.
-
And I think this is kind of related to
Imre Lakatos, who has the research
-
programmes where you also have these basic
assumptions that you're never questioning.
-
And I think this is very common idea in
computer science.
-
I already talked about the pure functional
programming, where we are never going to
-
question the idea that we never need
mutation.
-
There's a bunch of other things, like
whenever you're modeling some computation
-
in functional programming, we have a
method for that, and that's called monads.
-
So we're going to just use monads without
really thinking about it too much.
-
There's one nice piece of work or
development that happened when people
-
started modeling dataflow computations.
-
There was a programming language called
Lucid, and someone came up with the
-
semantics for it that was built using
monads, because monads is how you model
-
computations.
-
And then later on, there was another paper
that said well, actually, this is silly.
-
Monads aren't helpful at at all for this.
-
And they came up with another model that
was ironically based on the dual, so it
-
was based on comonads.
-
But it was one of those cases where we
just follow some basic assumptions that
-
tell us how to do things, or how to
understand things, and it's sort of
-
obscuring other possible directions.
-
And this is something that a lot of people
in the academic programming languages
-
world have.
-
If you're talking about types and type
systems, type systems are the sound things
-
that prevent errors, and then you have
someone who comes up with language like
-
Dart, or TypeScript, that aren't doing
this at all.
-
And I think that's another case where the
sort of natural interpretation could be
-
slightly shifting, or there's people
breaking that idea, and you might think
-
they're just crazy and lunatics, or maybe
they're actually doing science like
-
everyone else.
-
The other interesting thing in the book is
how Galileo uses telescope to convince
-
people of his model.
-
The first thing here is that when he built
the first telescope, it was really
-
imperfect, and the images you would get
from it were in conflict with what you can
-
see with your eye, like it was stretching
some things, it wasn't accurate, there
-
were, like, you wouldn't see clearly, and
I guess if you think about this from our
-
modern perspective, we're used to the idea
that if you have imperfect lens, it will
-
distort the image of it.
-
We kind of know in what ways, like we know
it can make things shorter or longer, but
-
it will never hide something, or add
something to the image.
-
But that's something they didn't have.
-
So if you looked through the first
telescope and it was distorting the image,
-
you would be like, "Well, this is not how
it looks," right?
-
It could be adding things, removing
things, adding reflections, whatever.
-
So whenever people say Galileo built a
telescope and now he had this perfect tool
-
for convincing everyone that the world is
how he thinks, well, the telescope didn't
-
work.
-
We only understood how it works later when
we built more perfect versions of it
-
and we provided the additional theory.
-
So even the telescope was kind of fishy.
-
It's even worse with the telescope.
-
The other problem with the telescope is
that back then, the established scientific
-
fact was that celestial and terrestrial
objects are actually completely different
-
things; they are made from different
materials, they obey different laws.
-
So now-a-days, we have no problem in
believing that if you test the telescope
-
on the earth, on the ground and it makes
things bigger, it will also make celestial
-
things bigger, but that's just something
that wasn't true back then.
-
Because the scientific reality that was
just part of how people thought about the
-
world was that there's terrestrial objects
and celestial,
-
and they're different parts, different
things.
-
This is, again, where Galileo actually had
to do a lot of propaganda to convince
-
people that it makes sense to use the
telescope on the stars.
-
I think I have one more point on Galileo,
which is, again, I think really
-
interesting for people in computer
science.
-
That's when Freyerabend says that the
language in which we express our
-
observations may need to be changed as
well so that the new observations that
-
Galileo is reporting aren't sort of mixed
with the assumptions coming from the
-
old observations.
-
So when you're making observations, you're
expressing that in some terms that are
-
hardly based on your baseline theory.
-
And if you want to change the theory, you
have to come up with a new way of
-
describing the observations as well, like
you have to come up with new terminology
-
that doesn't distinguish between the
celestial and the terrestrial objects
-
and so on.
-
I think this idea of language and how you
have to carefully avoid mixing what you're
-
doing in the new theory with what's known
in the old theory is something that
-
matters in computer science as well.
-
There's one kind of funny but interesting
example: in F#, there's this thing called
-
'computation expressions,' which you can
kind of think about it as syntactic sugar
-
for monads, and every time someone talks
about computation expressions in F# in
-
front of high school familiar audience,
they get the question: "So is this
-
just monads?"
-
On some technical level, they're very
closely related and answer might be yes,
-
to some extent. It's not quite that;
there's technical differences as well,
-
but also, if you just use different names,
it gives you the freedom to build whole
-
new understanding and intuition around it.
-
Because monads is like very, I guess,
poisonous word, like it has this massive
-
amount of assumptions and basic ideas
around it that you can't say,
-
"This is all wrong," because it's not, but
if you want to talk about something that
-
has different intuition around it, you
just have to use different language.
-
I had another interesting case, where in
some of the F# type providers, I called
-
something 'union type' because it had some
shared structure with what's normally
-
called union types, and in one of the
reviews I got beautiful comment saying
-
"This is just all wrong, because this is
not what union types should be like."
-
Again, this was I think like, I picked the
word because I saw the similarity; they
-
just didn't see the same similarity I
would see there, and again, it's one of
-
those structures that has a lot of
assumptions around it, how it should work.
-
I guess what's the important thing to
learn from the book here, at least for me,
-
is that when we talk about things, the
language is actually really important.
-
Like, when I'm using some word, I'm not
just getting the technical definition or
-
some core of the idea, but I'm getting all
the infrastructure around it.
-
So that's another sort of inspiration that
I think is really well described in
-
the book.
-
What Freyerabend in the end says about the
Galileo trial is that when the Inquisition
-
came to see if what he's saying is
sensible or not, they declared the
-
doctrine to be foolish and absurd in
philosophy, which was, back then, a way of
-
saying, "This is unscientific."
-
And based just on what was the
scientifically established fact of
-
the time, they concluded that he was just
wrong.
-
This is not criticism of Galileo, like I'm
not saying he was wrong, obviously, but
-
I think it's a good example that shows how
sometimes what is scientific isn't
-
necessarily— or what's unscientific, well,
I think I have it on the next slide.
-
Unscientific doesn't necessarily mean
wrong.
-
It might be correct; it's just that the
science doesn't have the right method to
-
explain it, or doesn't have it yet.
-
It will generally just take a bit longer
until we build more tools, more theories,
-
more machinery, and then it will be right
and scientific.
-
But there's this phase where things can be
actually right but not scientific,
-
because even science has some limitations.
-
And the usual amazing Freyerabend quote is
that, "Science is much more 'sloppy' and
-
'irrational' than its methodological
image."
-
So we like to think that science is
perfect, and scientists always have to
-
write answers, they're getting closer to
the truth.
-
And I think what Freyerabend demonstrates
here with the Galileo case is that,
-
actually, it's not that easy.
-
Question?
-
Audience Member: Yeah, so are you implying
that scientific necessarily is right?
-
Am I implying that scientific necessarily
means right?
-
[ audience member speaks quietly ]
-
Will have to give you mic.
-
[ audience laughter ]
-
Man: Here you go.
-
Audience Member: But, by the same token,
Bruno got burnt at the stake for pretty
-
much the heliocentric view, so to say that
inquisition science is like a predate,
-
it's more, right now we don't burn people
at the stake, usually, for scientific
-
mistakes.
-
Petricek: No, we just don't give them
tenure.
-
[ loud audience laughter ]
-
Audience Member: Right, but in a certain
sense, I see as most of today's argument
-
is basically general science coming under
the pressure of the insights of Heisenberg
-
and Gödel.
-
Petricek: Alright, um, so I don't think
we—yeah, I definitely agree we don't burn
-
people anymore.
-
[ audience laughter ]
-
But I think as far as scientific
reasoning can be judged back then, there's
-
definitely some very valid point.
-
The previous thing, do I say that
scientific is right?
-
Audience Member: Do you value the term
'scientific'?
-
Petricek: Yeah, I think there's, well, I
definitely think there is some value in
-
the term 'scientific,' otherwise I
wouldn't be doing it for my PhD, right?
-
[ audience laughter ]
-
And I think even back then they had some
notion of correct reasoning, like correct
-
way of thinking, and did you think truth,
and... yeah.
-
So it wasn't the modern science,
obviously, but it was—and again, the
-
argument here isn't really whether the
Inquisition should have banned Galileo
-
from publishing his writings - it actually
goes the other way around.
-
It's more like even back then, what we now
think that that's the perfect scientific
-
approach, if you look a bit more carefully
it wasn't scientific according to the best
-
idea of what would have been scientific
back then.
-
Audience Member: Which was Aristotelian
methodology.
-
Petricek: Which was Aristotelian
methodology.