Slashdot Mirror


An Interview with Brian Kernighan

Mihai Budiu wrote to us with an interview done with Brian Kernighan, one of the High Creator's of C. Good reading and good perspective on C.

3 of 144 comments (clear)

  1. Using an IDE by update() · · Score: 5
    Every time KDevelop, Kylix, Code Warrior or another GUI programming tool is mentioned here, we always get comments like this saying something to the effect of, "The existence of GUI programming tools is bad. Good code can only be written from the command line."

    I was interested to see Kernighan say, When I write code on Windows I use typically the Microsoft development environment: they know where all the files are, and how to get all the include files and the like, and I use them, even though in many respects they don't match the way I want do business."

    See, you're allowed to use them! It's OK!

    ---------

  2. Early C history by Animats · · Score: 5
    C was a successor to BCPL, a rather lame programming language from 1967. (In some circles, it was known as the British Cruddy Programming Language.) Some important early work was done in BCPL, including the low-level code for the Xerox Alto. BCPL didn't really have types; everything was a "word", much like assembler or PL/M. With Pascal available to show the way, C was the next logical step - sort of a BCPL with types.

    In many ways, Pascal was a better language, but Pascal had some inane limitations that stemmed from Wirth's academic orientation. Even Knuth criticized such things as Wirth's flat refusal to allow a "default" on case statements. "This is mindless pedantism up with which I will not put", Knuth wrote. Pascal also originally came with a lame I/O system designed for the CDC 6600 (a '60s supercomputer), no separate compilation, and no compile-time arithmetic, so you couldn't write "var tab[0..lim-1]" when "lim" was a constant. Unfortunately, that painful version became an ISO standard, leading a generation of programmers to beat their heads against the walls of the language.

    This left an opening for C, which came with a system programmer oriented I/O library and, in time, a whole OS with free source code. Still, for much of the 1970s and through the mid-80s, serious researchers used Pascal. The Apple Lisa and the MacOS, for example, were in a dialect of Pascal, as were most early Mac applications. (The Lisa even had an object-oriented variant of Pascal by 1983.)

    What killed Pascal, I think, is that Berkeley UNIX came with a truly lame Pascal implementation. Its horribly inefficient subscript checking implementation (a subroutine call for every subscript check) and miserable generated code convinced a generation of programmers that Pascal sucked. Still, the microcomputer world got a lot of work done with Turbo Pascal in the 1980s. It wasn't until the rise of Microsoft (a C shop) and the fall of Borland (a Pascal shop) that Pascal was crushed. One could argue that the decline of Pascal reflects Microsoft's dominance.

  3. I had him as a professor by dills · · Score: 5

    I had the old guy as my professor for CS50, which is the first computer class you take at Harvard. It was nice to see him bitch about people being trained in Visual C++; I assume he was complaining about Princeton, because at Harvard it was strictly C on Unix. (C++ was taught in CS51, but still in a Unix environment.)

    He is an incredibly endearing fellow. In the first class, to demonstrate the concept of an algorithm, he had the class (of 400+) shout out instructions on how to make him trim his beard. He spread out several instruments of cutting (including a small chain saw...the guy has a nice sense of humor) on the desk in front of him, and would ignore any directions that comprised more than one action. So, if somebody would say "Pick up the scissors!" he would reply, robot like, "What are scissors?"

    So, you'd have to say things like "Extend your right hand 4 inches", etc. In the end, he even cut of a small amount of his beard, to the immense cheers of the class.

    He's one of the more intriguing characters in CS history, the "k" in "awk", always tagging along on some of the more interesting projects in (C, Unix), but never really striking out on his own.

    The cool thing is, he is very self deprecating and would be the first person to admit his shortcomings.

    Awesome professor, as his enthusiasm for even the simple aspects is always evident. He loves the stuff, and thus you want to love it as well.

    A cool note, he is the person who invented the concept of creating a program to print "Hello world".