well hello Brian it's great to see you
again been a long time so we're here at
Princeton with the Brian Kernighan and
we want to go do a horror of history
with them so why don't we start at the
beginning as I recall you're Canadian
that is right I was born in Toronto long
ago and spent my early years in the City
of Toronto moved west to a small town
but we've been a small town when I was
in the middle of high school and then
went to the University of Toronto for my
undergraduate degree and then came here
to Princeton for graduate school and
what was your undergraduate work in it
was in one of these catch-all courses
called engineering physics it was the
people who were kind of interested in
engineering and math and science that
didn't have a clue what they wanted to
actually do so the how didn't you come
to be down here I think it was kind of
an accident I it was relatively unusual
for people from Canada to wind up in the
United States for graduate school at
that point but I thought I would try
something different and I so I applied
to six or seven different schools in the
United States got accepted at some of
them and then it was a question of
balancing things like well they promised
that they would get you out a certain
number of years and they promised that
they would give you money but the
question is my whether either that is
true or not and I don't know but I had
with friends here at Princeton and so
after a bit of thing we wound up here
and that has turned out at least and I
got to be a pretty good luck decision so
and then what did you study here well I
was in electrical engineering at the
time there was no computer science there
was in fact only one computer that I
knew of on campus this is in 1964 so
computing if not spread I don't think
there were any computer science
department it exactly at that time it
wasn't too many years before a few early
schools started
have one so electrical engineering at
that time was mostly more senior faculty
were interested in things like
information theory and solid-state
physics and communications in general
and then there were some upstart young
faculty who had done things in and
around computing but they weren't much
older than I was that point so then what
did you do your dissertation on I did my
dissertation on a problem which
ostensibly came for practical computing
the idea of the practical question was
we have a computer has a limited amount
of memory and we are going to have
necessarily have to swap parts of the
program in so they can execute them and
swap them out to make room for other
parts to execute and so the question is
how could you organize your program the
code of the program on to basically page
size blocks so that you would minimize
the amount of business walking back and
forth you had to - so that was the
practical problem that ostensibly lay at
the bottom of this but the abstract
problem of that is that I have a graph
and that is nodes and edges and there
are weights associated with the edges
and what you want to do is to take a
graph of this many things shop it down
the middle so that as few of the edges
to go across from one side to the other
are caught in so it's called graph
partitioning and then that maps into a
variety of other problems how do you put
people in offices so that they
communicate with the people who are near
how you layout circuit boards so that
the wires between circuit boards are few
in comparison to wires that are on the
circuit boards so this one abstract
problem has a lot of different specific
in theory at least all practical
implications
the interesting thing about it was very
hard we couldn't figure out it could not
figure out why it was so hard I was
doing a lot of this work with Shen Lin
who is in the labs at the time and so we
came up with a heuristic that made it
possible to solve problems of at that
time a reasonable size reasonably
effectively we could never do anything
that would sort of guarantee the right
answer this was in basically late 1968
and this was approximately then probably
10 minutes or so before Steve cook came
up with the notion of np-completeness
and the fact there were some problems
they were intrinsically hard and we had
stumbled into one of them in action
so it wasn't purely that we weren't
bright enough but there was actually
some problem to begin solving so the
thesis ultimately became a several part
that one of them was the heuristic for
this particular chip for the general
case and then there were a couple
special cases where I was actually able
to prove something about the properties
that you could come up with a number
formula for how long it would take to do
an instance of that problem so that was
the pieces oh good ok so then you went
to Bell Labs how did that happen I had
actually been FLS for two summers before
that and how I got the bill allows four
summers was one of these lucky things I
had spent the summer before even that
1966 if you're counted at MIT working on
in project Mac with using the CTS s
compatible time sharing system I've
gotten that job
I think entirely because a graduate
student from here had gone to MIT the
year before and had done a great job and
them they had the illusion that
everybody would do a great job and so I
got this summer job which was a
wonderful experience that absolutely was
I work with great people Corbin for
example and Jerry Saltz ER and a variety
of others at that point and I got to use
a computing system C TSS which was just
a delight compared to you know batch
card based stuff on big IBM computers
like the seventeen
so it was just it was a really really
nice environment with really nice people
but as part of it I sort of got to know
indirect not in person but indirectly
people from Bell Labs who were
contributing this is all part of the
multics pressure share at that point and
so I knew them at least as names if not
actual physical people and then the next
summer
again luck of the draw and so on I wound
up working at Bell Labs in Murray Hill
for Doug McIlroy but in the group of
people who were working on multix at
that point but I didn't do much that
summer except work with Doug and then
the subsequent summons of the summer of
68 herrera shen lin on these
combinatorial problems and that became
the faeces fairly quickly and then i
went bell labs permanently after that
because gee i had a good time and so i
never interviewed or anything like that
oh good good yes that's good luck I know
get it okay so all right so then you
started at Bell Labs then sort of what
weird we did talk about the research
group you were in and what sort of
missions and ways of working were and
how you fit into that and sort of you
know what was it like getting into that
particular group so I partly I had
already been in it so I started as a
naive summer employee and by the time I
got there permanently at least I had
known I knew many of the people and I
think for the first period of time I
actually worked with Shen Lin more than
an MLT and I worked on travelling
salesman problem and xem was just
amazing guy for insight into how
combinatorial problems ought to work I
think I programmed better than he did so
it was going to match but it was in that
same group of people and so I gradually
drifted I think in two things first
related to document preparation because
I was interested in that but that was
also very active area of interest for
people like Doug McIlroy and read Canada
and Joe Santa and variety of other
people like that
how do you actually use a computer to
print a document for you in a convenient
way something that today people can I
think appreciate how not all this idea
was but it was actually a lot of fun so
I did that and that was writing programs
but I was hanging out with the same
people who are in the doing who had been
on the multix project when multics got
stuck and Bell Labs dropped away they
had nothing to do and so they started to
work on basically creating new
programming environment which ultimately
became Unix so the environment was I
would guess there maybe 25 or 30 people
in the particular group that I was in
whose number was 1 to 7 at the point and
some of them were relatively columns
somewhat theoretical like perhaps la ho
some of them were very much programmer
types like Ken Thompson and almost all
of them were very very comfortable with
software and then under court
Renaissance people like does McIlroy he
was interested in absolutely everything
across the whole spectrum and expert and
a lot of these things so it was quite an
it was a great environment it really was
it was just great fun because you've got
really really good people and the
management structure was very loose of
the way that management was done as far
as I can tell was that once a year you
had to write down on one side of one
piece of paper and what he was done and
they used that to figure out how much
they would pay you the next year if they
took a very long view of this and so it
was actually I think pretty effective
and there was no direct pressure to work
on things that were relevant for KMT
communications and there was no
particular pressure to publish either
and so people kind of I think wandered
back and forth between called
doing useful things to the phone company
and doing things
would be publishable computer science
related work on the outside and I
certainly did bits and pieces of both of
those so so at some point in there you
got into writing books and so so you
might you start at the beginning of
those and talk about you know how did
you happen to write like the elements of
programming style for instance yeah I
saw
I think the recurring theme is luck and
sort of being in the right place at the
right time through no planning on your
own part but the first summer that I was
at Bell Labs I was in an office on a
quarter I think I was sharing it with
somebody not even sure now and next door
to it was somebody else came by my
office doors open the very first day I
was there at about 11 o'clock and he
said hi my name is dick Brent let's go
to lunch no ok let's go to lunch and so
we went to lunch I had no idea who this
guy was and after lunch he went off
someplace and I went and snuck a look at
the name tag on his door and it was dick
hemming he's creative Hamming code I
authored the numerical analysis text
that I was using in Princeton and as I
oh this is very interesting and so I am
having dick next door he you know I was
a curmudgeonly lying in some ways but he
was just absolutely wonderful person and
he was always prodding people to do
things to do interesting things and he
came and and this now would be several
years later but he had always been
saying that people didn't program very
well and he says I could still remember
something along the lines of kid you
know we give people a dictionary and a
set of grammar rules and we say you're a
great writer this is the way you learn
to program and he said that's wrong
there ought to be books on how to
program well and there we're at that
time any books on how to program well
and so he came in one day to my office
that determined this is an ongoing
discussion but he came into my office
one day
and people walk of a numerical analysis
book and he said look at this this thing
is terrible and I opened it up and I
said Jesus Christ this is terrible and
we were seeing totally different things
but what I saw was an example of
terrible program which is in fact the
first example in this book of the
elements of programming style very first
one it came from that conversation with
dick Hamming I still have the book and
it was so bad that I thought gee there's
got to be a better way to do is it could
we explain to people how to prevent
better by something which is sort of a
ripoff of the Strunk & white style
there's bad stuff here's how you could
do it better
how can you learn from that to make a
better piece of code and so Bill clogger
not Bill have to be in the next office
and talk about luck bill flogger and I
worked on this for a while and we wrote
a book on the elements of programming
stuff so that's how I got started
writing the books it was entirely due to
dick Hammond flooding and so some people
have mentors and I had a dick was a
mentor in some ways but he was also a
fraud because I think a very useful way
to do things was kind of fun no I I have
to but I'm reminded I once visited Ravi
Sethi's house which had been hammocks
house which Ravi got cheap because there
were so many built-in bookshelves that
they realtor said no one else would buy
it yes yes no I still remember that
house because they can Wanda were very
very kind to you know basically junior
guy and his wife and we used to go there
for social occasions from time to time
and I remember the house in the woods
with raccoons coming down with the
waterfall and everything like this yeah
it's a good old days ago that was look
that was so you're talking about 1970
ish right right yeah exactly yeah okay
so so that was the elements of
programming style all right so what did
you do next I think
I had been writing Fortran programs for
quite a bit the programs that I wrote
with Shan Lin for both the graph
partitioning and traveling salesmen
program or Fortran programs I had also
written a Fortran program to typeset my
thesis here at Princeton was sort of one
of these kind of like Jerry Salter to
run off only very very simple but it was
written in Fortran because that was
always available on the local machines
and so I was very good comparatively at
writing Fortran but it was really a
pretty awful language for the kinds of
things that I wanted to do it didn't
manipulate characters very well of
course but it also just controls what
was terrible because this was for 2066
essentially and so what I did in there
somewhere was to write a translator that
would basically put him in year on
Fortran sort of see like control
structure on Fortran and I called it rat
for for a rational Fortran and so a very
simple preprocessor that and it actually
was very nice it made it possible to
write programs in Fortran very
effectively easily much more so than it
had been and it took on a life of its
own for a while and eventually died but
one of the byproducts was then that Bill
plugger and I started to talk about what
could you do a whole book about because
it's our basic tools and ideas that were
in unix at the time this would be kind
of their mid seventies at the latest
could you do a whole book on the tools
but write them in rad for because at
that point c hit and spread anywhere
really and so could we write them in rad
force so that they would be something
that the ordinary reader could look at
and appreciate and understand because
the language would be nicer and so
that's the genesis of software tools
which bill my published I think in 1970
that sits in your stack so though it is
and oddly enough this is a copy Romney
set left behind when he okay not a
patient
well I saw that software tools sort of
took on a life of its own as I recall
yes it did yes author tool was picked up
a lot of people used it inside their
labs I'm not sure how far that's print
but certainly it was used there and it
was used extensively outside there was a
group of people that was primarily at
Lawrence Livermore I think Joe Sentech
and Debbie Shearer in Dennis Hall I
think I recall correctly and they
decided that they could make something
much more robust and solid of the rat
fort package and so they did a lot of
work on the tools they started something
called the sucker to a user's group they
were acted as a sort of a side part of
Linux conferences and various places and
they kept that going for quite a while
they did a lot of work on hard
engineering packaging and popularization
documentation lots and lots of things
like that and so it became surprisingly
why didn't use now eventually it died
because see took over seeking angular
annex became widely available there was
no need to write a Fortran in that
environment and in other environments
Fortran 77 was at least a little better
than Fortran 66 not perfect but better
so radford kind of died at that but that
lasted quite a while actually I mean
given given a fairly limited scope that
you had for it at the beginning yeah all
right I think it's still easier to use
than Fortran xx for modern X's elope
they have more capabilities
so okay what was what was next after
that then um I think two things I don't
remember the exact dates at this point I
probably should Bill Parker and I
decided to do a version of software
tools in Pascal that was dumb oh yes I'm
talked about that some and there's a
famous memo that I recall of yours yes
so bill and I decided we would basically
transliterate the Fortran programs into
Pascal and in some ways that was good
because Pascal was in some ways nicer
than Fortran for example did recursion
and it actually has a sort of data
structure of mechanisms and records and
so you could do a better job in Pascal
in that respect but it had an incredible
number really strange constraints I
think imposed by compiler technology and
so on the order in which you presented
the program to the compiler had very
rigid and not very natural it was no
better at processing characters than
fortunately was maybe even worse in some
ways input/output mechanisms were awful
and it was not extensible so we managed
to do the job in on the book and got it
out and the program's work but it was
really kind of an ordeal and so I wrote
a memo above that called wide Pascal is
not my favorite programming language
Tom basically enumerated the things
where Pascal really wasn't up to the
kind of tasks that we had used it for I
think it was a vertically fine language
for big teaching it was pretty popular
for teaching right at that point really
popular for introductory programming
classes and I think with some minor
reservations I think that would be a
perfectly fine use for it it was not
suitable for system programming even
though people would say it was it simply
wasn't and the solution for that was
always offered for well here's a problem
with that oh you just use this
non-standard version of it and I'm sorry
using non-standard versions of things is
a recipe for disaster because your
standards going to be different than my
stew
so so I think that was a real thing the
reason it was such a stupid exercise in
retrospect is we should have done it in
C it just would be better it would have
sold probably a hundred times as many
copies of the book but you make mistakes
and that that was one so fortunately
about I would guess about the same time
Dennis Ritchie and I talked about
writing a book about C and that's yes
they're somewhere in this infinite pile
yes we really want to hold it up a
little higher yeah that one did a bit
better this one did a bit better yeah
how the pod and I think it is better for
a variety of reasons one was it was the
right place at the right time against
Blind Luck the second one is that it
came with the C reference manual which
was written by Dennis I had not a word
contribution on that and Dennis was a
spectacularly good technical writer on
ordinary writing to it but particularly
for technical materials and so the
combination of a wave as UNIX became
popular and very very well written
reference manual the only reference
manual for the book at that time for the
language at that time made it a pretty
successful book and it's still selling
hits Amazon ranked today's probably two
or three thousands or something like
that so it's which fur book published
originally in 1978 is doing okay and
there was a second edition a 1988 so I
think arguably the smartest thing our
luckiest thing I ever did was to arm
twist Dennis into writing the
so I still remember learning see from
the 20 page a technical memo that Dennis
said which this was was enough and even
better was looking at all the code yeah
yeah so yeah that one worked out that
area okay with that you've done some
other language things like like ample
talk about that yeah I got there's two
languages there let me talk about ample
first I guess I don't remember even
chronologically but ample is a book for
vibrating now ample is a language for
setting up optimization problems linear
programming is the classic examples an
optimization problem where you have
basically a set of constraints and you
have to find the values and variables
that will optimize some objective
function given those constraints and at
that point in time this was in 1983 or
they're both most optimization was done
by basically the constraint
representative was a very large sparse
matrix and it was a nightmare to fill
most in by hand because it was large it
was far as there was no obvious pattern
and so people had created programs that
would try to generate those matrices but
it was not very well done I think the
best of them was a language called gams
for general algebraic modeling system
something like that which is still
around but it was very Fortran oriented
and we were passed Fortran and so Bob
for who was from Northwestern's
industrial engineering management
science department was spending a
sabbatical year at Bell Labs with in
particular Dave gay who did numerical
analysis and I was talking to the two of
them and
it Bob had very clear idea there ought
to be a way to specify these
optimization problems algebraically sort
of the way you would write them on the
board if you were trying to describe a
problem to a colleague and so we thought
about the language and designed a rough
approximation and I built the first
implementation of that was my first C++
program it was pretty crappy but it was
enough to prove that this was actually a
viable way to do things and so we
continued to develop that subsequently
that's something like in there we wrote
a book I think the bulk of the text in
the book comes from Bob Ford and the
Apple program the code itself has been
David gay for very long time many
contributions essentially at this point
is you all thinking and this is the
second edition of the ample book there
was a first edition that came up sort of
ten years earlier or something like that
so that's an example of a specialized
language of what might be called
domain-specific and application-specific
or little language of whatever the idea
is it's focused on a particular area
rather than being a general-purpose all
take on anything kind of language like C
or Fortran and that was actually one of
my the things I've been interested in
from time is this idea of how
domain-specific languages things would
where you can focus on a particular
application because you're doing that a
lot of the constraints go away you can
invent syntax to taste that the language
is natural for whatever you're trying to
do and you typically don't have to worry
about efficiency or anything like that
doesn't matter how fast it runs because
typically it's going to be small and so
you can just have fun creating a
language and so loja that for would be
an example of that sort of thing Apple
definitely was and then the other one
that was done about the same time I
guess and digging into the pile here
would be awk oh yes yeah talk about how
that happened yes so our team of both
from
for historical accuracy there the a is a
Laiho mine colleague and the WSB
Weinberger my colleague and in fact the
three of us were in adjacent offices at
the labs which you do your best work
with the people who are right beside you
so you want to live with people really
good and I've been lucky with that too
good talk but the genesis there were
several inspirations that came together
on that one of them was a language that
was done at Piscataway by Mark Rutte
Kent who you may remember I remember and
he had a language which is basically
instead of regular expressions that that
was compiled into code and then you ran
data past it from something and if one
of the regular expressions triggered it
said there's something wrong in the data
that imagined that regular expression so
it was a very specialized language but
using the power of regular expressions
to identify or validate the data to
really really really nice idea and so
that was one of the ideas in awk Peter
Weinberger had been interested in
basically simple data processing kinds
of things for a long time and he
actually I think understood RPG the
report generator language that up set
was created by IBM that none of us
understood really but it was very
effective and powerful in certain
environments and then Alf course was
interested in regular expression
technology he had just finished doing
Ygritte and I was just kind of
interested in languages that let me
handle numbers and text with more or
less equals on a ease or fluency or
something like that coming back to this
word processing kind of thing and so the
three of us with these kind of related
but not the same interest and being
adjacent offices talk a bit but what
were the language look like for that
kind of thing I don't think we talked
very long I would be surprised if it was
more than a week or two and then
you're Weinberger wrote the first
implementation over a weekend using the
tools we had yak wires I'm not sure to
use legs maybe I just don't remember at
this point and then it people started to
use it and so it's been maintained
ever since there's multiple versions of
it of course the good inversion doc is
by far the most widely used but I still
maintain one that's used by a lot of
people and there's some ones in busybox
and a lot of other places it done it as
well so it's a nice example of perhaps
of one of the first scripting languages
third there was sort of a zeroth
generation with things like snowball and
some dancing and the shells and then
opposite in some sense the next one
where it was a language where the
berries components were more or less of
equal stature rather than sort of mix
and match stuff that you get in the
shells as well it certainly I ran a
project that used it rather strongly and
I remember I think I left you a printout
once upon a time that was a surprise
exactly there were very large awkward
and embarrassing ly large a it was never
the language is meant for one or two
line programs something we excite you
know what you're trying to do should
only take a couple on lines in the
decent language and then people perverse
people I came up with things that were
noticeably bigger I think it the largest
diverse out was something like 20,000
lines which is just absurd when we had
close to that yes it was extraordinarily
useful so it was a good thing so so
let's try some of the other efforts in
Neos go back to the text processing yet
with the get rough and related things
how did that all happen so as I said I
was interested in text processing I
wrote this program here for doing my
pieces I seen run off at MIT in the
summer 66 when I came to doing my own
pieces I was too cheap to pay somebody
to type it because I knew it would be
done over and over again and so I wrote
this program that would create mine got
to build labs for real and
somewhere in there discovered that there
were other people who are very
interested in this well and particularly
predicted Doug McIlroy and so Doug had
done something called Roth uh and Joe
Sanna did something called an Roth which
was new Roth which was more preventable
it didn't have everything sort of
built-in issues like how do you do pages
or how do you do multiple columns and so
on but rather was programmable and was
during complete in the funnel sent and
so that meant that you specified things
like Wendy one page breaks how you do
lots of things by writing code in a
truly awful language truly awful but
manageable language and and then the
quality that produced output on
typewriter like devices so it was very
limited in that sense and at some point
Joanna
convinced and colleagues convinced
management to buy them a typesetter that
as a machine would actually produce
proportional pipes at various sizes of
high quality and then he wrote a program
called T Roth which was basically n Roth
but with all the extra things you need
to do multiple thoughts multiple sizes
and proportional spacing but with the
same horrible language for actually
controlling what went on the page and so
Joe wrote this program and then
unfortunately he died and I get very
very late 76 it really seventies done
something like that leaving this program
which was pretty inscrutable because it
had been transliterated from assembly
language and so it was really kind of a
mess
side and it lay fallow for a while and
then I thought okay I
there's things I would like to do tear
off can't do them I'm using it to
produce books and I can't make it do
some of the things I need to do so I
with a bit of fear and trembling started
there carefully to modify it to make it
independent of the particular output
device it had been typed very strongly
to one specific type setter and now
there were different types that are
available and so I it was limited by
16-bit architecture now we had some
32-bit architecture and so I gradually
modified it slightly to make in
particular the typesetter a parameter
read in tabular description of what the
properties of the types that were what
characters were available on things like
that and then I was able to in that way
come produce what I called device
independent tear off and that's sort of
the one that then was used for very long
time for all kinds of things and I've
used that for essentially every book
I've ever written it's the devil you
know
not because it's better but we confirmed
know what yeah so it was of I haven't
touched it and don't even have the
source code for it in any useful form at
this point but somewhere it was picked
up by James Clark and he did this
version of it called JIRA and then
related things for the mathematical
typesetting in tables and so on and it's
a wonderful job at hand it's kept
tear-off alive and he's very visible
because he got rid of an awful lot of
the funny limitations but maintained
compatibility in his past so that's
really what I hit for newer books is G
Roth
yes well I having been a user of those
things despite the horrific programming
language it was pretty useful yeah okay
so that was yeah in some sense yet
another little language the way or
another I guess that was probably worth
mentioning inside the type of setting
aspect of things the typesetting
language tear-off in particular made it
possible to do ordinary text with you
know the kind of text that we twelve in
a detective story or romance novel or a
newspaper write just words on the page
but a lot of the documents that were
written at millas were scientific papers
and they tended add a lot of mathematics
in them and so mathematics is very
difficult to do you could sort of fake
it in and rock with half flying up and
down motions and it was just a fallen
way bad and so of Lorinda tyrion and I
worked on a language called EQ men which
made it possible to describe
mathematical expressions in a form
that's almost aural so that you would
say things like Excel I if I say X sub I
to you you have a perfectly exact
picture of what that means there's an
italic X and a little down permit is an
italic high things like that and so we
wrote a program that would translate
that stuff X sub I equals PI over two or
something into tear-off commands it
would actually cause it to print
properly on the typesetter and so that
worked out extremely well it was done as
a separate program because Kirov was
already too big I mean was as big as you
could have a program in
pdp-11 that we were running so you had
to be a separate program it took
advantage of the newly developed piped
mechanism so that you could take out put
an EQ and pipe it into the input of tear
off and it was created with the newly
invented yak parser generator the pilot
compiler that Steve Johnson and now
Avery had created so with all these
things coming together in a way that
would have been impossible if any the
pieces hadn't been there
and so eqn in some sense after write for
would be the next example of a
special-purpose language but not a
programming language the language for
describing mathematical expressions
network I think really really well
that's the impetus for the mathematical
component of tech which everybody uses
today that that math mode intact derives
from as UN then uniform eyes and made
much more general and of course very
very well done by Don Knuth this was
also the inspiration loosely for my
glass TBL programming the tables another
example of a specialized area so you can
get notation is really natural for that
particular area and so I created this
program that made it possible to specify
tables and we it worked so we could have
mathematics inside tables and
and then gee that's fun and so I did one
as we got a better typesetter I didn't
want for doing pictures that is line
drawing kinds of pictures flow charts or
organization charts and that kind of
thing called pick into specialized
language again not the same syntax as
basic document preparation or
mathematics or tables but for pictures
so that another instance again a special
again when did you take get done I will
guess the mid-80s and they can't
remember it knows it was early 80s yeah
it was not been early 80s because it was
done at the time we got the monotron 202
typesetter it is that what device had
enough resolution and enough speed that
you could actually do the kind of almost
plotting my dots that was necessary to
produce the output on of at that time
photographic paper and then later on
laser printers for the predates laser
printers and it creates things like
PostScript but along PDF so so let's say
during the mid to late seventies so you
mentioned 16-bit and 32-bit it was a big
portability effort going on in that lab
but can you talk about that some I don't
remember a lot about the portability
there definitely was one of the
components of it that see from the
beginning did not specify very much if
anything about the sizes of the operands
the idea was the care would be a byte
and it would probably be two bytes but
could have been four and Long's probably
were four but might have been bigger and
it's sort of dependent totally was
unspecified in the language and that
meant portability was in fact a problem
I think the big portability effort that
I remember was mostly Steve Johnson
writing the portable C compiler and
there the issue was not so much the
portability of the language report
abilities the compiler and
the compiler it's almost portable Menem
meant you could also imported the logic
the operating system so there was a
decent chance that by retargeting your C
compiler you could get your operating
system to run on a different computer
the sizes of integers and the entity and
thus and all those kinds of things
played into that but there were a lot of
different moving parts to do that kind
of portability and I wasn't really
involved I think in any of them but they
think at least from watching it it
seemed like that was some of the
solution to the earlier problems of the
get software tools not having an
environment around them which became
easier to move Unix than it was to yes
put things on top of a bad environment
yeah yeah definitely because a lot of
the commercial operating systems at the
time were not very good and they were
very different from each other and so
what as UNIX became more widely
available then that meant it you could
and became because it was portable at
that point and you could take all of
your accumulated software and drop it on
UNIX on a new piece of hardware and I
think that helped a great deal with the
mini computer marketplace and son was an
obvious beneficiary meselson on
beneficiary and quite a few others so
that was one of the waves that kept all
of this stuff going
so so then some and somewhere in here
you've got to be addressing this sort of
overall programming environment issues
so why don't you talk about what you
were saying there
there's a book right what sort of book
oh yes in the book that's right
yes I try to remember more advertising
um yeah you could to get the advertiser
good okay glad to advertise yeah Rock
Pike and I had been thinking about you I
have been thinking about how you write
programs and how you how is this
environment productive and why is it
more productive than some of the other
environments and trying to explain
things like programs that could be
connected to each other with pipes all
of which kind of novel ideas from the
commercial side of things but we're just
the way you did things on UNIX and so at
some point Rob and I decided we would
try and write some of that down in an
orderly fashion for what we knew about
UNIX so you could argue that in some
ways rather than saying software tools
go build the tools instead say here are
the tools how you use them well in this
particular environment so how how did
things like pipes work how do you use
the shelf to glue things together how
you organize the data in the file system
and build a lot of small tools but
they're all pretty small none of them
are very giant the biggest one in there
is probably the calculator program at
the end which is an effort to show how
you build something with the a
commercial generator that is a
reasonably serious but simple language
design so it was kind of a manual of how
to think about programming in this
particular environment how to do it
particularly well
and I think it's still useful although
at this point the world has changed like
this was done before networking they
came along and so networking changes a
lot it was also I would say sort of done
before screen kernels really were
everybody's desk I don't remember the
exact date but again there were lots of
things that became different after
around this time and so it's not clear
at all how one would for example update
that book so that's that sort of gets us
to early 80s
anything anything missed is particularly
important from the 70s and early 80s you
know the big thing that happened
somewhere in there I got sandbagged for
a while by being in management I'm sure
you remember days like that too and but
and again in a sort of lucky thing one
of the people I was moved into
management and sort of probably early
1981 something like that I don't
remember - management at Bell Labs was
not management the way it is in most
places it was you didn't tell people
what to do it was more like trying to
understand what they were doing so that
you could relay it to others and in some
way and I was partnering the umbrella
theory of management to keep stuff from
coming down on their heads but one of
the people in my first group of people
was be on a Strauss trip and he had
joined Bell Labs probably late 17 up
early 80 something like that and wanted
to do something that would be an
improved version of seeing something
that took advantage of object-oriented
programming because he had some things
he wanted to do with it thought it would
be hard to do otherwise and so the irony
was in my department for essentially all
of the development obviously
plus plus starting in call it was just
starting to exist as he with classes and
then became C++ in roughly 1984 and then
when AT&T split in 95 or something like
that Barron and went off to AT&T Labs in
the important part and but I was sort of
his management chain at that time for a
long time so I got to see I'd never do
with it the creation but I was present
at the creation five or six less points
so I would say that's an important
aspect of something that happened in the
early 80s primarily and it went on for
quite a while
thereafter okay so so then then talk
about the rest of the 80s with where
you're in management you know I have no
desire to be a management in some sense
I don't remember a huge amount of what
was going on at that point if I look at
this is in some sense this is part of
what was going on in that period of time
but I think the combination of
management and they're not being so many
really brand-new interesting things
going on that it wasn't quite as much
wow we can do something new Larry the
the low frame hanging fruit had gotten
somewhat further off the ground in a
sense but I went through a phase where I
was are interested in user interfaces
and so I worked with tickle TK and was
part of a group that built a system for
designing indoor wireless systems for 18
T and never I don't think it ever went
public but did a lot of that shenlin and
I did some work with designing systems
that were for optimizing 18 networks for
AT&T customers again that never went
public that was used by parts of the
company but didn't go anywhere
outside
so not the same sort of thing part of
this but something I mentioned earlier
is this back and forth between stuff
that's visible on the outside and things
that are actually mostly important
inside okay so so let's see so then you
you were at the labs until what 1999
yeah roughly that okay so talk a little
bit about how the Bell System
rearrangements affected things just not
to people but parts of it are definitely
I think painful it was clear at some
point of it many of the dates are kind
of fuzzy at this point what I remember
fairly clearly it must have been in very
early 1995 maybe it was actually
announced in 1994 my wife and I were in
in on vacation and we were driving
through Pigeon Forge Tennessee the home
of Dollywood and of and on the radio it
said AT&T has decided it's going to
split into three pieces and this was a
bit of a shock and so unlike most of our
vacations we raced immediately to a
large town to see if we could find a
paper that would talk about this
particular story
I think AT&T had become sort of
different after the best insurer
originally that they split up in 1984
had a big effect and that took away
colleagues who went off - Belcore and
and then the next split in 95 or 96
whenever it was had another big effect
and took what was the small a small
piece and split it even further and
destroyed a lot of working relationships
and I think the nature of the whole
business had changed quite a bit
at that point Bell Labs used to be
funded by a tax in fact on telephone
calls in the United States AT&T was a
very large company was a regulated
public monopoly it had a guaranteed rate
of return on its investment
and the quid-pro-quo was that it would
try to continuously improve the
telephone service in the country and
that Labs was a piece of that an
important piece of improving the
telephone service and the research part
of that lapse which is where I was was
again a small piece of fact but it meant
we had stable funding in a very stable
environment and an environment that
encouraged people to explore things
without pushing them too hard it was not
on the basis of what have you've done
for us this quarter but rather more what
have you done over the last five or ten
years something like that
at least that's how it seemed but all of
that had changed a lot by the time we
got to let's say the mid 90s and there
was a great deal more of thinking about
business and business units and how did
what you were doing relate to the
profitability of the company or
something like that and I think most of
the folks in research weren't very
interested in that kind of thing
not very motivated by it and often
fairly hostile earthly skeptical about a
lot of the business aspect not that they
aren't important that they didn't seem
to be well aimed at the time we were
there and so I think a lot of people
were kind of restless and unhappy and
then the actual real splits where people
went to totally different companies then
and then couldn't talk to each other or
things like that I think all of those
contributed to shrinking of the research
environment great deal and just making a
lot less fun place to be in many
respects so I think somewhere in the mid
90s people started to look for other
places there was a and over a decade
that was at the aspirin a lot of places
I spent one semester teaching at Harvard
I now lives was very generous about that
you want to go somewhere in fact on a
sabbatical I so I spent a semester at
Harvard teaching a very big intro
computer science course and that was a
lot of fun and I'm not sure that what I
learned there wasn't any value to Bill
Labs but they were absolutely kind about
letting us do that and but that was
useful for me because what I learned
from teaching very very large course
like that was that I can handle all the
administrative stuff all of all the
issues like personnel on setting exams
and who knows in an academic setting and
therefore when Princeton sort of
suggested I might want to spend a year
as a visitor or something like that and
then confirm it was a lot easier because
I saw yeah I've done some of that
already it's not a leap into your total
unknown ok so then then you came down to
Princeton and and what did you start
teaching so the course I had taught at
Harvard was called cs50 it's still
around and run by David Malan it's an
amazing course David has done wonderful
things with its largest course at
Harvard so
one of the things I noticed when I was
there I had 450 odd students in it so
it's a big class David's is much bigger
and what that class included everything
from freshmen kids who've been
programming basically in utero and they
jumped in through to terrified senior
English majors who had to satisfy some
or other requirement and I decided that
the senior English major end of the
spectrum was poorly served and so when I
got to Princeton I said in the fall well
I'd like to try a course for very
non-technical people sort of the things
that I would tried to do with that
Harvard course but spread out over
semester and aimed of the population
we're not technical and so that's what I
did and I fact I taught that course for
very time ever since and that's what led
to the most recent focus at yeah yeah
the understanding the digital world book
yes yeah yeah yeah I thought the course
for quite a long time I never found a
book that I liked for it most of the
books were these you know very brightly
colored things that would be suitable
for you know elementary school or not so
wonderful and so I just decided that I
ultimately like rather than using might
note on notes over and over again I
would try and write a book about it so I
took a sabbatical year and wrote the
first draft of that book which I
self-published and as I said earlier
that's a recipe for total invisibility
if you publish it you so to be gone but
then after five or six years the world
has changed quite a bit and a lot of new
things worth talking about and so I took
another sabbatical and updated the book
and this time it's published by
Princeton University Press which is in
fine University Press and they know how
to do things like production and
publicity in a way that the amateurs
just don't know how to do and so that's
the genesis
that book so talk talk about what you
cover in that and therefore like
teaching in the course yeah yeah
so the what's in the book I mean I take
the general field that we're in and say
let's talk about hardware/software
communications and the overall premises
that computing and communications are
just everywhere integral part of our
lives and getting to be more so over the
as time goes on much more so than they
we're certain when I started teaching
this course in 99 or something like that
so hardware software communications
hardware is the tangible stuff could put
your hands on it and you drop your
computer on your foot you'll notice it
and that's a place to talk about things
like the remarkable advances in
technology physical technology Moore's
law and things like that why is it we
can make these amazing devices that keep
getting smaller and cheaper and faster
sort of exponentially and that's a
really interesting story it's a chance
to hand out gadgetry in the class so
that most people never seen the inside
of a computer leant along the inside to
some of the pieces in the computer and
some of those are still actually sort of
interesting so there's that and then you
can talk about how the computers
actually represent information how do
they store and things and this is where
you can talk about bits and bytes and
binary and you can talk a little bit
about how computers work at the low
level the idea of an instruction set and
at some part of the computer that's
taking one instruction at a time and
doing something and then going back and
getting the next one and so the you know
the fetch decode execute kind of cycle
it's very simple not abstract but not
very technical kind of content so that's
how computers work so then the software
side you can talk about couple of things
there one is the sort of more
theoretical end or let's call it the
idea of algorithms of how do you
actually specify precisely how to get
something done
you know I've got a deck of cards how do
I sort it I want to find who's the
tallest person and there were of that
kind of algorithmic stuff so we're going
to talk about that and in an abstract
sense and this is the kind of theory the
theory of computation or algorithms or
something did you wait to but a very
very simple level because the students
in this class is very non-technical and
then also talk about programming how do
you actually get a computers do this
where you have to specify it precisely
because this thing's The Sorcerer's
Apprentice you did you talk the wrong
thing back gonna do the wrong thing so
talk about programming and then talk
about the various software systems that
we see in our lives operating systems
browsers apps on your phone all of these
kinds of things and then the final part
of the course is basically
communications and that's where things
get interesting because now you've got
all these devices programmed with errors
and so on
talking to each other around the world
with people we don't know anything about
and so talk about how does networking
work the idea of local area networks how
does the internet work how do you put
things on top of it like the web and how
do you protect information is what are
the implications of having everything
about you known by somebody else more
than you know all of those things how do
you talk about how do you think about
those kinds of things how do you defend
yourself to some extent against people
who would like to know more about you
than you wish to tell them and so those
are the three pieces of the book do you
assure them that their microwave is not
spying on them no I don't share them of
that because I don't know whether it's
true or because I say the thermostat
certainly ancestor it and your TV and a
microwave is no different
those so know I'm there's a spectrum of
paranoia that and most people are way
over at this end where it has fine and
I'm over at this end where no it's not
funny
and so I probably run it slightly I'm
sure I come across as weird to some of
the students in that respect but I'm
closer to right than they are so okay I
notice also you did a book on go yes
yeah talk about that yeah and and and
maybe maybe philosophize about it you
know sort of in the history of languages
where does it fit where you see in C++
fit in the specialized languages sort of
pull that together yeah so um so the
book which I wrote with Alan Donovan at
Google um I spend I spend often summers
at Google in New York and hang out and
work on a variety of things kind of like
an intern in many respect and one summer
I happen to be sitting in the group that
is part of the go group at New York and
Alan is there had known them before that
and in effect I was his intern for the
summer and I learned a modest amount of
go and during the summer we thought
wouldn't it be nice to have a book bill
we weren't very satisfied with the ones
that were already out there and so we
worked on that for the next calls a year
or something like that
Alan is an absolutely amazing programmer
and he knows all languages inside have
put in particular he knows go inside out
and so the work there's at least 90% is
it's just it was really pretty
remarkable
so we're go there's a sequence of
languages and historically that you go
back to stage II Cpl legal of Martin
Richards BCPL and then you go through
the be and bond and stuff at Bell Labs
that work in Thompson and then you go to
see which is Dennis Ritchie and then you
know that's sort of good but then
following that is C++
following that is let's call it Java and
many of these are reactions to the
language that went before there's
something which that the current
language doesn't do as well as you think
it could we could make it better by
having a new language and that may be
bet more feasible because hardware has
moved on we've got more resources it's
processing speed and memory and our
understanding of what it is we're trying
to do and how to do it has improved so
the languages in many respects continue
but then sometimes they get big so Java
is a reaction to the size of the pub C++
in part but it also has 10 years of
Moore's law so you could do an
interpreter instead of compiler and
things like that and you could argue
them that well C sharp is a marketing
response to Java and JavaScript is let's
take something that sort of surface
syntax like seems on but it's got to run
in a browser so different set of
constraints there and there go is
explicitly a reaction I think to the
complexity of C++ it was developed
originally at Google by Robert Greece
Mayor Rob Pike and Ken Thompson and
their guiding force was they wanted to
do not C++ and help make it solve some
of the problems that Google has writing
code at scale very very large programs
compilation times that were taking too
long
portability issues and dependency hell
we're inconsistent versions of libraries
might cause trouble if they wanted to
deal with all of those things and so
that's kind of what go is all about it
was started in 2007 and was open sourced
a couple of years later and totally open
source project at this point and it is I
think achieved a lot of those things go
go compilation very very fast there's
some technical reasons for that it is
static binaries so that means that the
dependency hell isn't there
got rid of that and it has a very nice
model of concurrency it's based on
communicating sequential processes
tell me hoarders idea from the 70s but
very very well and efficiently implement
it and I think that's the part go that I
understand better they did that
different model for how do you think
about objects somebody object-oriented
programs but that's the part I'm less
comfortable with but the concurrency
part seems to me to be very clean and
straightforward and from a little bit
more efficient than the thread models
that you find in Python or Java or
probably C and C++ as well empirically
that is we need to manhandle the small
experiment at the third faster and going
to do equal code things like crawling a
net or blocking a distributed file
system or something like that some
people say that go is kind of like C for
the 21st century it's enough like see on
the surface syntax that you could
believe that it has that same taste for
minimal mechanisms that kind of stripped
down at the same time it is the opposite
of C in some ways seems pretty less a
fair as we've mentioned earlier you know
sizes of things we care and go those are
specified so this is helping various
operators are and some of the trouble
spots in C plus in C and x equals plus
like order of evaluation of complicated
nested things where even put assignment
statements inside or other side
effective things inside expressions and
so on go doesn't have any of those
things so and it takes a rigorous views
of formatting there's a standard
formatting govern until all go programs
look identical on there where the braces
aren't things like that so religious
wars at that claim gone away and all of
that means that it's actually pretty
nice language for program
I wish I had written more than I had but
I find it pretty comfortable there's
there's odd places where I think it
wouldn't be like that and see and it
bothers me but you know once you get
into the groove and you don't think
about it anymore and that's true of any
language I think so so go it it could be
it will never probably play C++ at
Google or something like that it's also
sometimes used as a replacement for
Python because Python is dynamic typing
you if you make a mistake you may never
learn about it until it's much too late
with go if you make a type error you'll
find a boat out of it compile time is
not at runtime
most of the time and so I think that's a
big advantage so in one way it's
chipping away C++ another way it's
chipping away and Python and it's
certainly got its own niche if you're
going to do web crawler or distributed
service or something like that goes with
a good choice so how about what do you
see either on the horizon or going on I
with the number of multi-core chips and
graphics processors and other
specialized processors where parallelism
is increasingly important what do you
see in the language world that's helping
that or not I'm not enough of an expert
to know I think the code routines in go
are an example of something where that
helps so that you have a way to express
the fact that a computation is happening
in multiple processors at the same time
and with some chance of controlling the
flow of information the essence of the
co-routines is that if I have something
I own some piece of data or something
like that
then I can give it to you by sending it
over a channel to type to channel so you
can send arbitrary stuff to you then I
can send something where you know what
it is and now you've got it I don't have
it anymore
underneath the operating system or the
runtime library whatever had to be
paddling to make sure that that's
consistent but at the level where I'm
thinking about it and you're thinking
about it we all worry about I've got it
or you've got it and there's no
in-between state and so that means
issues of you know shared inadvertently
shared data structures don't happen at
that level now it's not like this is
free as I say underneath somebody's got
to make it happen and in addition go
provides the traditional locks and new
taxes and things like that but you don't
need them nearly as much so that's one
approach to distributed computing
especially if it's sort of all right in
the same executable more broadly I don't
know I don't do that stuff and and and
it is unfortunately very important
because that's the way the world is
going and more and more at every level
distributed you've got multiple things
going on in a single chip and then
you've got multiple chips and then
you've got multiple things going to good
like networks of various sizes more or
less all the way and so all those
problems that were hard when there were
only two things they're harder now well
it's being a things that are hard talk
about the sort of current state of
computer science education from your
viewpoint and what's hard and challenges
and and what what what sort of things
you and other people are doing about it
so I think that one of the challenges
certainly the one that is most obvious
is that enrollments in computer science
are very large and this is one of these
be careful what you wish for situations
our enrollments here have gone up by a
factor of let's call it three or four in
let's call it five or six years or
something like that and that obviously
puts a strain we are not unique I think
if you went to any school that offers
computer science you would find some
analogous sets of numbers and the
problem is the mechanisms can't react
that quickly you can't just
more faculty and put them in front of
classes you can't get more space for
people to live like offices and things
like that you can't hire instructors
it's just there's too much going on all
in what and the university mechanisms
here and everywhere else are pretty
conservative about growing things
because they worry about what happens
when the bubble bursts or fashions
change and they have to get rid of that
so we have a lot of majors and a lot of
people who are taking computer courses
who are not majors I don't know what
today's number is but I would think
probably the gas 75% of every student at
Princeton takes at least one computer
science course our intro computer
science course which is given both
semesters is in total the biggest course
on campus and probably I would guess
seven or eight hundred kids taking that
so all of these are problems of just
lots and lots of people and how to
maintain the things that at least here
make for a good education is hard one of
the things that Princeton has done well
is to require students to do independent
work one-on-one with faculty members so
every student has to do some of that
details and vary but you know on balance
most it's been four semesters working
one-on-one with faculty members if the
number of students in a particular
department goes up by a large amount
it's hard to sustain that so we are in
computer science we've started seminars
for some of that independent work not
all that but some of it so that we all
have a dozen students around the table
of with a single faculty member in
charge and they will be working on sort
of similar things and they will be
learning from each other as well as
the faculty member is let the partial
answer to some parts of it a few of my
colleagues are experimenting with
flipped classrooms where they make video
segments relatively short video segments
on on the various components that are
interesting or important students watch
those in the privacy of their own
whatever and then the class is more
question and answer discussion groups of
students working together on things a
faculty member kind of orchestrating
keep an eye on that but not standing at
the front and name stuff the tongue
videos I don't have enough experience
with that to know how well I work the
colleagues I know who do it say that it
they like it the students like it so I
think it's got something going for it I
cannot miss having an audience when I
talk so but perhaps this is a way to do
it it's also kind of labor-intensive to
make those videos upfront so the other
thing I suppose there's lots that people
who want to do computing and not all of
them are tremendously expert at it and
some of them don't actually have perhaps
an aptitude for it but they have to take
courses to find that out and so the
spectrum of people's abilities and
backgrounds and everything else that one
finds in the class is broader and that
means that there's in some sense more
administrative or personnel issues to
deal with in classes as well so I'm
curious at the other end what do you
what do you find in terms of kids coming
in from high school that are on the sort
of more expert and how good are they
what have they done by clarifying are
they good just terrifying is actually
quite an accurate perception sometimes
some of these students who come in from
high school are just amazing they have
you know they come in they've started
two or three companies already they have
paid their way through some part of
their youth by selling software or
services and things like that they have
apps running in
the AppStore they have taken four or
five or six courses at the local
university and so all of these things
they know a tremendous amount and part
of the issue sometimes is to slow them
down a bit and say there's more over the
world than computing there's lots and
lots and lots of other things that
people do that are interesting and
important and maybe it'd be good for you
to explore some of those too rather than
digging in super deep when you're still
a freshman and so we have a few of those
every year and others who are not quite
that but still very very advanced and so
the Princeton particular is a liberal
arts college it stresses breadth over
depth in a lot of ways not that you
can't go deep but you know you have to
do some of the breadth as well and so my
job as an advisor for students like that
is to try and get them to sample some of
the other things you better go on
because people over all mankind do an
amazing collection of different things
that are interesting and I think being
exposed to those exploring some of them
is part of the reason you're supposed to
be at a university and they don't always
listen to me but that's okay
well I think that's all I had now did we
miss anything for any things that were
particularly fun or lucky or when you
mentioned some of those yeah any of any
of any other last words yeah I mean last
words I think I think luck is an
enormous command it was if I recall
correctly pester who said chance favors
the prepared mind so what you should be
doing is to enhance your lock by being
open to all kinds of different things
learning whatever you can hanging out
with the best people you can all of
these kinds of things mean that when
something comes along that would be
called luck you're more likely to be
able to take advantage of it and I think
that's hard for people to realize but I
think that's really
important so there's lots of ways you
can do that keep that in the back you
might be open to all kinds of stuff play
with the good people cool so actually
right since I sort of missed this can we
sort of go back early in your family
background did you have particularly it
interested in technology and and all
this computing stuff in the first place
I it's hard to say exactly but as they
say I was born in poor but humble
parents poor but honest that's the
phrase and they remained honest and the
bank blur but now my father was a
chemical engineer okay and he had grown
up in a farm community and so many of
the other members of his family were
farmers and therefore close to the land
but they were it also gone to
universities and things like you know a
Greek I'll chiral College kinds of
places and so there was I think real
respect for engineering there and they
knew how to do things they actually knew
how to build things and make mechanical
systems work and that was I think very
useful so my father is actually gone to
the University of Toronto he graduated
at the height of the depression in the
31 and he spent some of his formative
time working in soup kitchens in Toronto
and that changed his view of the world a
great deal and so up and I think some of
that probably propagated to me my mother
was working in Toronto when she met him
they got married I have a brother and
sister both younger I think it was
always thought that I would go to
university and I don't remember ever
thinking about anything other than going
to University of Toronto just because
among other things it was very close to
him my father had gone there and it was
at a time probably the strongest issue
and the economics are such that at least
in Ontario you didn't have to pay very
much money so it was all very can-do
um the question question are going to
that you mentioned of formative
influences I think probably a couple of
people in high school I don't remember
very many people from elementary school
but in high school there were a couple
of teachers who got me interested in
things like history which is sort of an
interesting thing as an area and I think
if I weren't in computing I'd rather be
a frustrated historian is that because I
just that's interesting but there was
finally a high school math teacher and
this would be and like me in grade
thirteen at that time Ontario had five
years of high school and grade thirteen
my math teacher was a youngish guy who
had worked at in the Canadian aviation
industry and will be wrote and of some
military plane got canceled he was laid
off he had an emergency job as a teacher
and I don't remember much about his
teaching but he was one of these guys
who had sort of good insights into
things and he said I was think I bought
University of course I go to he said you
should try this engineering physics
course it would be right for you and
that was the right thing to do because
it put me on a path if I'd gone to any
of the other engineering fields I
wouldn't be where we are at this point
because I would have been much more
focused much more kind of nuts and bolts
and also might well have missed the
computing thing so so that was probably
the single-most in some sort of lucky
thing I got from a teacher up through
the college level um and I've a few
years ago and tried to track him down he
wouldn't be enormously older than I am
and I can't find him anywhere
unfortunately
to be able to say thank you well I think
that's all I've got thanks a lot Frank
okay well thank you great if you both
now