- Productivity versus performance.
This is a big one.
As an industry, if I asked people, for a long time,
"Is performance your highest priority?"
They would say yes.
But the reality is that productivity
has been our highest priority.
It has been in just the languages we've been designing,
the languages we've been using,
people wanna be productive and get things done,
and we've kind of looked at performance,
it's secondary, though.
If you ask anybody, they're too afraid to tell you that,
because then you don't look like you're technical,
or your chops are in place.
We put people on a pedestal.
We can get on stage and talk about
how they can shave a few milliseconds
or microseconds off of an algorithm,
and I really kinda wanna move away from that.
Productivity really is, and should be, our highest priority,
but we do need performance,
it does matter.
And what I find interesting about our industry,
is that for the last 30 years
we have kind of been on the same path
that Niklaus Wirth has said, back in 1987,
he said that "The hope is that the progress in hardware
"is gonna cure our software ills."
In other words, he's saying that we as software developers
have always said "We don't have to worry
"about performance, the hardware will come in
"and save us."
We've continued to kind of have this mantra
for the last 30 years.
Back in 1987, after I graduated high school,
I was on a plane to Italy
and I sat next to a software developer
and that software developer told me, this is 1987,
all of us, right now, watching this video,
would be Basic developers.
We'd all be coding in Basic today,
because the hardware would be so fast
we wouldn't need anything else.
The reality is that has not happened.
I mean, Henry, back in 2015, wrote,
"The most amazing achievement
"of the computer software industry
"is its continuing cancellation
"of the steady and staggering gains
"made by the computer hardware industry."
We're still talking about this stuff, 30 years ago,
remember I told you before,
the hardware is the platform.
If performance matters,
then we have to be sympathetic with the hardware,
mechanical sympathy.
And look, you know,
the hardware folks really haven't changed hardware
in the last 15 plus years.
They really haven't.
No, we've had these multi-core processors,
multiple hardware threads per core,
and the reason why they're not doing it
is because we haven't been able to take full advantage
of what's there now.
We're starting to see now
Intel talk about their 24, 36 core processors,
and that's great and it sounds amazing,
but if we don't engineer for this hardware,
if we don't understand how it works,
those processors are actually gonna slow us down
not speed us up.
So we're gonna spend some time in this class
talking about how caching works,
and some of the mechanical sympathies
the language drives through us and allows us,
so we can get to these levels of performance that we want.
And hopefully take advantage
of the hardware that's there,
so that the hardware industry stops playing games,
starts giving us more.
But that's on us, it's not on them.
But I think a core part of this class
is gonna be this next quote from Brian Kernighan,
and it starts, him talking about C.
He's asked a question about the C programming language,
but I think you can replace C with Go,
and it absolutely mirrors it exactly.
"Go is the best balance I've seen
"between power and expressiveness.
"You can do almost anything you want to do
"by programming fairly straightforwardly,
"and have a good mental model
"of what's going to happen on the machine,
"and you can predict reasonably well,
"and how quickly it's gonna run,
"and understand what's going on."
This is Go in a nutshell.
I'm going to teach you how to read code in this language,
so that holds true not just for me,
but for you.
And it's possible because Go's model
is not a virtual machine,
it is a real machine.
It is the real machine,
and once you're coding against the real machine
then you can do all of these things
if you just know a little bit about the mechanics
and the semantics of the language.
When I say mechanics,
I'm talking about how things work,
when I say semantics,
I'm talking about how things behave.
And I'm gonna teach you throughout this class
how to be able to do that,
and that's going to drive you
being able to make some better engineering choices.