Long ago yours truly was known more as a teacher and a songwriter. One evening the mother of a colleague, an elderly lady who'd been a professional jazz pianist - Doris was her name - asked me why anyone would get into IT.
'I remember this cartoon I once saw', I told her. 'The CEO of IBM sitting at his desk.'
'He was robot with a lightbulb in his head.'
'Computer science is going to be with us whether we like it or not. Things can go robotic or humane. Perhaps I can do my part to make it more humane.'
'This can end up in one of two ways. Either humans serve computers or computers serve humans. We have to make sure it's the latter.'
I'd signed up years earlier for a post-grad community college course. One year. Then I went traveling instead. Ended up in California. Visited the UCLA campus. Walked into a bookstore. Looked for Comp Sci 101 and expected to find the thick yellow book from Dartmouth. Instead I found this scrawny white book with a big 'C' on the cover. I opened it.
'C is a relatively low-level language', the book began, 'but this is not meant in the pejorative sense.'
Who writes like that? The book was published by Prentice-Hall, the authors were from Bell Laboratories.
Back in Stockholm sometime later, I visited the academic bookstore and inquired about the book. Surprisingly, the clerk said they had it on order and were expecting half a dozen copies that week. I went back the following day and inquired again. The book had arrived.
It cost SEK 270. I bought it on the spot. SEK 270 was a lot of money - and a lot for a book. Computer books were expensive. I took the book home and started digging into it. I returned to the bookstore the following day to see if anyone else was interested. I reckoned we could perhaps chat a bit about it. But all five remaining copies were gone.
I asked the clerk. 'Oh yeah', he said. 'IBM rang right after you were here, asked how many copies we had, then came in and bought them all.'
AT&T and IBM were in a feud back then. Nobody at IBM would recognise any knowledge of Unix or C or Bell Labs. Something was up.
I didn't have a computer. I bought a big paper note pad with both horizontal and vertical lines. Then a slew of pencils and a pencil sharpener. I'd read that John Steinbeck had an array of pencils on his desk and every morning at 06:00 hours sharpened them. I wanted to work like that. Solving the famous puzzles in the book, writing them neatly in my note pad, then doing a meticulous 'skrivbordstest' on each - going through the code, line by line, looking for errors and correcting them.
I did the whole book. Twice. After the first run-through, I took half a year off. Because I was bored. Then bought another note pad, a new arsenal of pencils, and set to work again. (The solutions later made the rounds in our circles - no one had ever seen the full collection before.)
The book asks you to pause after chapter 3. Just stop. And use the tools you have and learn to write small tidy programs. Get polished and proficient at it. Starting with chapter 4, things get very interesting.
Brian Kernighan wrote the book. I asked him later. Everybody about town knew I was going to meet him, and the first question they asked was 'who wrote what part?' One colleague claimed he sensed a style change after chapter 5. But Brian told me he wrote it all, save the tech ref in the back.
Brian was impressed and influenced by the language. He went on to redo several other programming languages, using the lessons learned from C and the Unix way of thinking. When asked what language he'd like if alone on an island, he said C. He also once said he'd give his right arm to be ambidextrous.
He told us of the origin of the name 'Unix'. It was a wise-crack of his that the authors turned from a joke into something serious.
Bell Labs was in a bit of a stink when General Electric shut down the Multics project. Wallets were sealed. They'd wasted too much money. Turning on the GE mainframe was no longer allowed - they couldn't afford the electricity.
One thing led to another and Ken and Dennis had a PDP to play with. They didn't have an OS - it was coming 'real soon now', said, presumably, David Neil Cutler. So Ken and Dennis sat around all day wondering what the OS would look like, and what they'd like it to look like, until Joe Osanna finally told them 'stop talking about what you'd like in the OS and just write your own'. So they did.
Ken used his own programming language. The language was called 'B'. Years earlier Ken had wanted to port his computer game 'Space Travel'. He needed a FORTRAN compiler. So he locked himself in his room to do it. When he came out weeks later, he didn't have a compiler, but a new language instead. B.
Ken is cryptic. Sort of understandable. As everything was on paper back them. His command line arsenal for Unix took out the vowels. 'Copy' became 'cp', 'remove' became 'rm', and so forth. Why waste time?
When asked years later if he'd change anything, he said: 'I'd put another 'e' in creat()'.
BCPL is a language by Martin Richards. It's based on Algol. It has a potentially expensive construct called 'valueof'. You could put a block of code in there, up to 2 KB. Ken didn't have memory for that, so he took it out. He kept taking stuff out until he'd truncated a lot of BCPL. So he truncated the name too - down to 'B'.
B is an interpretive language. Ken had a bit of kernel in assembler but otherwise everything in the coming OS was in B. Ken and Dennis built it together. Finally it was time for the maiden voyage. Colleagues stuffed themselves into their office, some spilled out into the corridor.
Ken sat down at the system console. Power on. Things loaded up. Everything looked OK.
Dennis sat down at the user terminal next to Ken's console. Tried to log in. The system hung. Not enough CPU to power both the console and the terminal.
Brian broke the silence.
'Well one thing's certain, guys! You can't call this one Multics. You'll have to call it 'Unics' - a multi-user system for at most one user!'
Friends had other questions by proxy for Brian. For example: they wanted to know whether C or Pascal came first and how they were related.
'Pascal came first', Brian said. 'They're similar, something like Swedish and Norwegian - no, Swedish and German - if you're growing up in the suburbs of Tokyo.'
Very precise.
Brian had a single long grey hair coming out of his beard. He kept pulling at it.
'What's with the hair, Brian?' I asked him.
'It's my first grey one', he said. 'I'm cultivating it.'
Brian Kernighan. I'd expected to find someone looking like Brian Dennehy. A bit heavy-set, ruddy, ginger-haired, tweed suitcoat. Brian Kernighan's not like that at all. I looked out over the sea of attendees right before the start on the first day and I saw no one like that. Then they called his name and the real Brian Kernighan took to the stage...
And began talking about something called 'C With Classes'? I hated it. Brian Kernighan, who'd taught us all, with all those books of his, about the virtues of digging and discovering, now here he was telling us this 'C With Classes' was cool because it 'hid' things? I got furious inside, and when he'd finished and gone out to the banquet room for a cuppa, I followed after. Once the others in the room wandered off, I put it to him directly.
I actually forget how he answered that one. Then we sat down, just the two of us, and talked and talked for the longest time - all the other lectures were in Swedish, so he had nothing to gain by them, so he talked instead with me. And I began with the questions I'd been asked by colleagues to ask.
Brian was keen to get out of town the day after the day after. He was staying at the Sheraton and kept ringing them and asking them if they'd made progress in arranging his flight.
He showed me his property deed. It was framed, under glass. The local user group paid him with a square kilometer of Tanzania rain forest. He acted impressed, moved.
I had this idea. I'd begun to understand that doctors need a way to diagnose their patients. I invented a C construct, 'ifn', an if statement with multiple conditions where the truth value calculated from a threshold value expressed as either a percentage or an integer count. I ran it by Brian.
He was very nice about it. Amazingly low-key. I should have known better. In fact I did know better.
'The thing is, C is a language that's supposed to do what the machine does and do it well. Any departure from that would only corrupt its philosophy.'
I wrote to him years later and thanked him for the afternoon. He remembered. And the Sheraton got him out when he'd wanted.
Brian teaches at Princeton again. He says he regards himself as something of a dinosaur. As the software editor of Prentice-Hall and with such a long list of accomplishments, there's no way to think of him as anything less than legend. An amazingly low-key person who regarded his own work as commonplace. Work that was changing the world we live in. What Brian taught us all, either by direct word or by good example, can't adequately be articulated. Brian's thinking is the bedrock of the art of programming today.