Rixstep NSA

Share this post

Software Tools

rixstep.substack.com

Software Tools

A remarkable professional, educator, and all-around human being.

Rixstep
Feb 22
Share this post

Software Tools

rixstep.substack.com

It was time to head West.

All our friends had done that. I balked a few months. People nagged me for years to get into Comp Sci, but I balked - I had a CV heavy in banking. Before embarking, I applied to a community college north of Stockholm famous for its IT curriculum. I applied and was accepted - but I didn't follow up, instead getting on a train from Stockholm Central to Liverpool Street Station where I switched to Victoria Station and came up out of the bowels of Big Smoke onto the Belgravia road that was once the home of Ian Lancaster Fleming. A day or so later, I boarded the plane for LAX.

Los Angeles was... weird. There was no other word for it. The climate was OK. The month was March. I phoned ahead to Arizona and told them I was on my way. Sometime the following day I landed at Sky Harbor.

I repeat: The month was March.

The cabin crew opened the door up front so we could disembark. Standing right in the doorway, I felt something that's stuck with me ever since. The heat. A brick wall. It hit hard.

I got picked up by Arizonans who weren't phased by the heat. Turn on the AC? Why? It's not 100 yet. That was the same attitude everywhere. I got a flat in a Melrose Place-type complex in Scottsdale, of course with a swimming pool in the middle. But no one used the pool. Not until temps hit 100, they said.

I commuted back to Stockholm after a while, to California Hill, a part of Saltsjöbaden, and next time I went stateside I lingered a while in LA. And somehow made it to the campus of UCLA.

There were two things that happened on that visit to UCLA. The first was the use of the restroom facilities. Two specimens of graffiti were on the walls of the stall I used.

'What are two things you can never give a nxxxxx? A black eye and a fat lip.'

'Flush hard - this has to make it to the kitchen.'

Across the quadrangle was the other thing I'll never forget. A university bookstore.

I wasn't looking for anything, just wandering around. And I'm thinking 'oh I'll see what computer books they have', and I reckon I'll find the shelf labeled 'Comp Sci 101', and I fully expect to find the big thick yellow tome from Dartmouth on BASIC. But no. Instead I find a thin white book with a big blue 'C' on the cover.

The printing isn't great. Oh well. I open the book and read.

'C is a relatively low-level language. This is not meant in the pejorative sense.'

WTF? Who writes like that? In a computer book? I page through it and I'm immediately sold. Everything on those pages makes perfect sense to me, right away. '!' is of course 'not', ';' is of course the way you end a statement, multiply and divide obviously bind stronger than add and subtract, and so forth. The book was simply brilliant, an epiphany.

Back home in Stockholm I go into our academic bookstore on Mäster Samuelsgatan. Do they have the C book? They've heard of it, yes, and have in fact placed a first order. Then can I reserve a copy? No need, we've ordered five copies. When will the books arrive? Probably this week.

I go back the following day and there it is. I grab my own copy greedily and pay for it. SEK 278. Which back then was over $50. I didn't care. I got this fantastic book. I took it home and started pouring over it. Every word was like a dash of genius for a starving brain. I went back to the bookstore the following day to see if anyone else was interested.

The remaining four copies were gone. IBM came right away and bought them all, I was told. I don't think IBM ever had any interest in C. IBM and AT&T were archenemies back then, two of the biggest corporations in the world.

Back home with my book I was going to have a problem. The book was spiked with hundreds of very demanding programming exercises. These weren't like what you get in a Microsoft course. These were real world labs. But I had no computer.

I bought squared-paper notebooks (tidy indentation is important with context-free parsing) and a handful of lead pencils and a sharpener (I'd do like John Steinbeck). And as for the exercises: I'd do what we in Sweden call 'skrivbordstesta' - test at your desk, meaning you meticulously write out your code, then go back over it with a fine tooth comb, looking for small errors. You get to know your code very well.

[Note: Years later I got to input these answers in a Stockholm firm's Unix network - they specifically asked for this. This was before anyone had heard of the 'answer book'. Absent a few minor issues, they all compiled cleanly and produced the desired results. I should have asked for payment. I was also told, this before I'd actually done any professional C consulting work, that I was already better than half the consultants 'out there', such was the state of IT in Sweden (likely the rest of the world too).]

The author of the book says you should take a breather after the first three chapters to more finely hone your skills. I did that. I dreamt up a lot of cool tasks and wrote everything meticulously in a new notebook until, many weeks/months later, when resuming again with chapter four, I'd finished the entire book. (Pointers were 24-karat genius, I remember thinking that at the time.) Then I took a break for several weeks/months and tried to do other things. But I was bored.

But I can do the book again, I told myself. I'll look at the book with new eyes. As if I'd never seen it before. I'll pick up new perspectives. OK, maybe I can do that... After a few days I got down to it again, and, in new notebooks, did all the exercises again, and no consulting the older copies. That wouldn't have been gratifying. Afterwards, yes. But not before.

This should be mentioned: Other than the real C book, there are no other good books on C except The C Puzzle Book by Alan Feuer which is absolutely brilliant. This is a book where you specifically do not need a computer and absolutely must not use a computer. It's done all in your head. That's what's so brilliant about it.

'What does the following program print?'

Alan says there are three stages in becoming a good programmer in any language.

  1. Learn the syntax.

  2. Learn the side-effects.

  3. Develop your own style.

I'll add a fourth.

  1. Learn to speak computer.

One thing led to another and I was accepted into a year-long course to turn a bunch of us into IBM IMS DL/1 COBOL programmers. At least you got into the business. I planned to use that foot in the door to search for positions programming in C. That's what I wanted. Nothing else. C. So I went to the academic bookstore again and got a book on COBOL, took it to a café at Stureplan, and then sat the entire evening, reading the whole book over cup after cup of coffee (free påtår after you pay the first time) on one long sitting. Now I knew COBOL.

I was totally uninterested in COBOL, even Unix was of no real interest - only as far as being able to write in C.

And I still had no computer.

My teacher in the IBM IMS DL/1 COBOL course, an 18yo blonde, took me aside one day.

'You'll get a job out of this. Don't worry. Getting the job is not your problem. Your problem is crawling the walls watching the others play ketchup.'

'And oh - we also have something called 'JSP' around here. It's a kind of political correctness for IT. It's nonsense. Don't speak out too loudly against it. It's ridiculous, but the suits love it. It'll fade away on its own.'

I couldn't keep quiet about JSP. During our course, we got a programming assignment dropped on us that no one could solve, not even our teacher. But I wasn't aware of that. I'd taken the assignment home the night before and, using C pseudo-code, written it all ultimately in nineteen lines of COBOL. Or something equally ridiculous. That part went fast. The remainder of the time was spent trying to find a bullshit way to explain it all in terms of JSP. So I concocted what I called '3-dimensional JSP'. It was worth a shot.

I was late for class the following day, arriving only when the teacher had assembled the group to apologise to them for giving them a programming assignment that was impossible.

I raised my hand.

'Uh... I could do it’, I told her and the class. ‘I've just run it through our mainframe and it works.’

That proved to be an embarrassing moment.

Teach and I ended up working at the same place before she moved on to super-secret defence contracting. She was considered one of the best 'realtime COBOL’ (whatever that was) programmers in the country. At 18. Think about it.

But this gig of ours was at the Royal Mail in Stockholm. I was put in charge of the 'F-Group' which would oversee the world's biggest realtime Unix network ever. 953 locations. Realtime. I got in touch with Judith from California who ran our annual Uniforum Unix expos in the Älvsjö convention centre south of town.

'I've heard an expression around here', she told me. 'If you want to make a stone wet, you must spit on it many times.'

Judith had a ticket to the annual SUUG meet. SUUG stands for 'Swedish Unix Users Group'. She couldn't attend. Did I want her ticket? Brian Kernighan would be there.

Brian Kernighan? The Brian Kernighan? Author of the C book? Creator of RATFOR? Author of the 'Software Tools' series?

Twist my arm, Judith.

This was to be a two-day event. I got a seat in about the 8th row, somewhat to the right. I don't know why, but I imagined Brian to look a bit like Brian Dennehy: tweed jacket, ruddy red hair, and so forth. I looked out over the sea of attendees and saw no one even remotely looking non-Swedish. Then the speaker on stage called his name and up he came.

He was a bit tall, slender, dark-haired, with a full dark beard. Not the Brian Kernighan I'd pictured. He started talking about something he called 'C with classes' and he was really pissing me off. Everything I'd imputed from C and Unix - and Software Tools - was about making things visible, accessible, and now he's talking about hiding things as if that's virtuous? I was really genuinely pissed, so when we broke for coffee and he went into the room across the way, I followed after.

There were two others there at the time. One was a Chinaman and the other was some sort of spokesperson for Ada. They both left pretty quickly and I was alone with Brian.

I asked him about this beeswax about hiding things, but I honestly can't remember what he said, other than he dismissed it as not a biggie and I sort of accepted it.

But I'd come with a bushel load of questions. You're gonna meet Brian Fucking Kernighan? Can you ask him blah blah blah? There was no web back then. My first Unix teacher wanted to know which chapters Brian had written and which Dennis had written, because they detected a major change in style after chapter 5. Another question was whether Pascal or C came first and how closely they were related. I also had suggestions of my own for improving C. The ifn statement - for use, so I thought, for medical diagnoses.

Same basic structure as if, but the middle part could be either an integer value or a percentage value. And then you listed the expressions that were to be evaluated. If by percent or integer the tally of expressions that evaluated to true were sufficient, then the ifn itself was true. Something like that.

He wrote the whole book, Brian said. Dennis wrote the tech ref in the back.

'Pascal came first, and C and Pascal are like Swedish and Norwegian - no, Swedish and German - to a teenager growing up on the outskirts of Tokyo.'

That was amusing, funny, but also typical Brian in being effortlessly precise.

At a totally unconnected moment, he uttered:

'Personally I find the Macintosh mouse paraplegic.'

He showed me his deed. SUUG paid him with one square kilometre of Tanzania rainforest. They presented it in a glass frame. He seemed to like it.

He was on the phone off and on with the Sheraton. He was trying to get out of town a day early. He wasn’t interested in attending any of the talks for the day - they’d all be in Swedish - and, frankly, and understandably, neither was I.

I popped my 'ifn' on him. He listened patiently, then said:

'C is a language that's meant to do one thing and do it well: what the machine does. Any divergence would disrupt the language's philosophy.'

Duh. Of course I knew better. What had I been thinking?

Brian had one white hair in his full beard. The beard was well groomed, but there was this white strand on the right side, sticking out about 3-4 inches. He kept pulling at it. Finally I couldn't not ask any longer.

'Brian. What's with the white hair?'

'It's my first. I'm cultivating it.'

Brian demonstrated one of his graphics languages for the crowd at a talk the following day. He put on a slide with some code, then another slide with the actual chemical diagram the code would generate, then he took the slide off, acted puzzled by no reaction from us, then put the slide back on again.

'You guys mean to tell me you don't recognise that? That's LSD!'

Brian also told us his story of how the name 'UNIX' came to be. I've not heard this story anywhere else. As background should be mentioned that Bell Labs had just come off their MULTICS project with a bad hangover. MULTICS was a joint effort between General Electric, MIT, and Bell Labs. It was an operating system GE would use on their mainframes. Yes, GE had mainframes. But they weren't very original. IBM had their System/370, so GE had their System/730. Like that. The MULTICS project eventually crashed, and the electricity bills for those GE mainframes were so ginormous that no one at Bell Labs was allowed to turn them on.

You go through the front doors of our building in Murray Hill, Brian told us. You immediately veer right. Down a long corridor. There's a stairwell at the far end. No lifts. You go up one floor.

Brian was on that floor, about halfway down, on the right. Right across from him, sharing an office, were Ken Thompson and Dennis Ritchie.

Ken had been working on an OS kernel. He'd already accidentally created a new programming language when he was trying to stuff BCPL into a DEC mini. He called his language 'B' - truncated BCPL.

B was an interpretive language. But Ken wrote his kernel with that language. Dennis was around, adding bits and bobs. Suddenly they had enough to show off their OS to their colleagues.

People stuffed themselves into their office, and hung about in the doorway to Brian's office and in the corridor. Ken sat inside the door at the console, and Dennis was ready at the desk next to his, at a terminal.

Ken fired up his console.

Everything's looking good - Ken's up and running! Now it's time for Dennis to boot his terminal and attempt a login.

Oops. The system hangs. It doesn't have enough CPU to handle both the console and a single terminal at the same time. Oh well.

The crowd starts to disperse. And that's when Brian quips the legendary comment.

'Oh well, guys. One thing's certain: You can't call this one MULTICS - you'll have to call it UNICS - the multi-user system for at most one user!'

But Ken and Dennis seem to have taken it to heart - they changed the 'ICS' to the sexy 'IX' so that soon every flavour of the OS had an 'X' in it.

Ken asked Dennis if he could make a compiled version of B and Dennis went off to do that.

The rest is history, and it's all fond memories.

A classic programmer's joke is about Alice in Wonderland. The idea being that Alice is the best programmer's book because it's the best book period. I used to ask people to name the best book for a night table. I opted for Brian's C book. Why? Because of the language. It's the way he writes. He's a natural for teaching, Brian. And a more down to earth human you'll never find. What always got to me - what still gets to me - is that the guy I'm sitting across from, and chatting away with, is taking everything so commonplace, when in fact he's a mover and shaker changing the world. I've never got over that about him. We've corresponded over the years. He remembers that afternoon. He's filled in details I wasn't aware of at the time. And he's referred to himself, in the context of his students at Princeton, as a dinosaur.

Brian Wilson Kernighan is never a dinosaur. The day you see Brian as a dinosaur is the day computer systems worldwide crash and hang. Ken and Dennis gave the world Unix and C, but Brian got the message out. Brian revolutionised the way people thought about computers and systems and programming. Unix wasn't so much an operating system as a way of thinking, it was said in the day. With his Software Tools series, Brian showed this to people.

You acquaint yourself with a new system by writing tools for it. As you write more tools, you discover more about the system, and consequently the need for yet more tools. Until you're a guru. It's a never-ending process.

Brian says today that if he were stuck on a desert island and could have only one programming language, it would not be 'C with classes'. It'd have to be C. Of course it would.

The accolades of Brian Kernighan have not been satisfactorily collated. They should be, and soon. He's a remarkable professional, educator, and all-around human being. Anyone who's had the opportunity to spend an afternoon one-on-one with him would understand that, and would feel fortunate.

Share this post

Software Tools

rixstep.substack.com
TopNew

No posts

Ready for more?

© 2023 Rixstep
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing