An Interview with Brian Kernighan 144
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.
Adding features does not necessarily increase functionality -- it just makes the manuals thicker.
Kernighan was not a "creator" of C (Score:4)
>Mihai Budiu wrote to us with an interview
>done with Brian Kernighan, one of the High
>Creator's of C
Brian Kernighan is not a "high creator" of C. All he did was write the book with DMR. Here's an exact quote from the interview, which you obviously did not read:
I can't comment on the ``worse'', but remember, C is entirely the work of Dennis Ritchie
GenChalupa
Aiighh! Apostrophe's! (Score:4)
Mr C (Score:3)
Good Read (Score:3)
Re:C or C++ (Score:1)
Re:They forgot one question (Score:1)
Re:They forgot one question (Score:1)
The best balance between power and expressiveness (Score:1)
Well, I think C scores impressively highly considering its age, but :-
surely scheme beats it! It's far more expressive, and gives pretty
good resource predictability, due to its simple execution model,
uniform syntax and treatment of data. And, if I had just one compiler
on a desert island, I can't think I'd choose one without garbage
collection
Is anyone else disturbed by a two line topic? (Score:1)
Hemos, damnit. Reading the actual story is more important to your web site than reading about bestiality for jerk off material.
If you can't make up more than two lines about the interview, then it's obviously not worthy to be featured on Slashdot.
That's my opinion. Flame me!
Warning! (Score:1)
Using an IDE (Score:5)
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!
---------
Re:Using an IDE (Score:1)
---------
Offtopic Re:Is anyone else disturbed by... (Score:1)
Ahem... Please consider yourself flamed... Don't really want to do this, but since you asked, I'll oblige.
eqn - XML (Score:3)
In the interview it says that Kernighan is currently hacking eqn to output XML/HTML (presumably MathML?). This has been suggested as a CS thesis title at my university, fortunately I decided that it was far too sick a task to even think about.
eqn is kinda cool (given that it works wonderfully on pipelines with troff in cunning ways). But, surely by now all old eqn documents have been converted to TeX or MathML anyway? Does anyone outside of Bell Labs actually have any eqn documents?
Re:C or C++ (Score:2)
Few C++ compilers fully support the standard (Score:2)
Hence there is still a need for C if you need portability across platforms and compilers. C++ doesn't offer cross-compiler portability on a meaningful scale just yet.
Re:C or C++ (Score:2)
Answer: People are using C++. Every single program in The C Programming Language is a perfectly good and valid C++ program; in fact, Bjarne Stroustrup himself recommends reading The C Programming Language as a way to improve one's C++ skills.
The advantage of C++ is that it's a hell of a toolbox. You've got hammers, screwdrivers, chisels and even a fully-functioning wood lathe (watch me turn this chunk of hoary code into a table leg!). Good programmers use the right tool for the job.
And if the right tool for the job happens to be procedural programming, C (or procedural C++) is an entirely reasonable thing to do.
Re:The best balance between power and expressivene (Score:2)
Early C history (Score:5)
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.
2 things I liked about this interview... (Score:4)
Teaching students skills so that they can step immediately into a Windows development shop and are able to write COM programs is just not right. That's not what universities should be doing; universities should be teaching things which are likely to last, for a lifetime if you're lucky, but at least 5 or 10 or 20 years, and that means principles and ideas. At the same time, they should be illustrating them with the best possible examples taken from current practice.
Now if only this interview was posted earlier, we could've used it on the discussion about what makes a good CS project a few weeks ago, which you can find here on Slashdot [slashdot.org].
The other thing is I liked the most about this interview was this quote:
I think I'm gonna frame this and hang it right beside my computer screen. Or append it on any bill we send to our clients.
C / C++ (Score:4)
Neither one is more powerful than the other. What the hell does "power" mean in a programming language, anyway? The word has no definition in a programming context.
The only relevant question, IMO, is which is the right tool for the job?
Sometimes, the job requires procedural programming. For that, procedural C++ or C is called for. Sometimes, the job requires object-oriented programming. For that, C++ or object-oriented C is called for. Sometimes, the job requires generic programming. For that, C++ or really hoary C is called for.
C++ is probably more versatile than C, but it comes at significant cost--compilers become complex, the STL is difficult to maintain, etc.
There is no clear "more powerful" language. Use the right tool for the job.
And insofar as operator overloading in C++... I use it all the time. Where's the problem?
Re:C or C++ (Score:2)
Re:Is anyone else disturbed by a two line topic? (Score:1)
-Antipop
Re:Using an IDE (Score:2)
--
Re:Using an IDE (Score:2)
Re:who's the stupid one here? Oh, it's YOU! (Score:1)
Re:Good Read (Score:1)
Basic and Advanced "You're" (Score:2)
Re:The best balance between power and expressivene (Score:2)
leanness and predictability.
I posted before I read Kernighan's comments about ML (nicely put, I
guess I agree with him), and if Scheme is less an `academic' language
than ML, you do need to grok higher-order functions to get the most
out of it. My own guess is that in the very long term, functional
languages will win out, but that's a long, long way off yet.
Allright then, flameboy (Score:2)
Slashdot is a good source of links, but is fundamentally content-free. Reading it like this [pootpoot.com] is just as useful.
Systems Research (Score:1)
I found it very interesting (as I was getting sick of BillG overusing the word "innovation"), but after reading it I kinda agree with him. Now who has any new open-source ideas ?
Casting to a void * (Score:3)
Production C++ code ought to use static_cast instead of these C-style casts (enhances type safety). I'm using C-style casts here for ease of reading.
#include <iostream>
using namespace std;
int main(void)
{
int x = 123;
void *y =
int z = *(int *)y;
cout << z << endl;
}
Re:who's the stupid one here? Oh, it's YOU! (Score:1)
Now, now... it's not fair picking on someone just because he doesn't write English as well as you'd like. It's not as if it's easy to learn proper English merely by taking a couple of courses at school! Even less when we're probably dealing with some indio bajado del cerro a tamborazos.
However, I have to agree, he's an idiot, and as far as I'm concerned, it's open season on them all year long.
Surely on a desert island ... (Score:1)
Funny Dilbert with Alice and a unix programmer (Score:3)
The next frame takes place "sometime next week..."
Dilbert and Wally at the copier:
Re:C or C++ (Score:2)
Re:Stuff that matters. (Score:2)
Natilie Portman
This chick from sales with big tits
Miss Feburary 1974 (from playboy)
2. Why would you choose those females?
N.P - It is Miss Portman; I mean *duh!*
Sales Chick - she is a hottie
Miss 1974 - She was in the first Playboy I ever owned/found; she is a life long dream.
3. What kind of stone (or other immobile substance, natural or manmade) would you transform them into?
N.P - bronze
Sales Chick - Balsa Wood
Miss 1974 - bronze plated aluminum
4. Describe the pose each girl would be in.
N.P - casual stance
Sales Chick - Sitting
Miss 1974 - on all fours in the doggie-style position
5. Describe the facial expression each girl would have.
N.P. - a normail relaxed expression
sales Chick - a bored, what-am-I-doing-here look
Miss 1974 - a look of total extacy
6. Explain what each girl would be wearing, if anything.
N.P. - A mini skirt and a blouse that show-cases her tits.
Sales Chick - Standard issue work outfit
Miss 1974 - totally nude
7. Explain what you would do with the girls after they were petrified.
N.P. - Go out have have tacos. Light conversation.
Sales Chick - I would sit her next to me in my car so I could use the HOV lane on the Dulles Toll Road and on 495.
Miss 1974 - Hard core sex
Thanks for your participation!
You are welcome, I hope I helped!
Re:Using an IDE (Score:1)
--
Re:Early C history (Score:4)
It's no accident that Apple developped it's Macintosh with Object Pascal.
Demonstrably untrue. (Score:3)
In the early days of Objective C, its performance was piss-poor due to its habitual late binding (putting off as many decisions to run-time as possible). C++ won, in part, because its early binding made for much faster code.
If you can't write C++ code which blazes by faster than a jackrabbit on amphetamines, that's a problem with your skill, not the language.
Re:The best balance between power and expressivene (Score:2)
Re:Early C history (Score:2)
Since nobody else mentions it. (Score:2)
There are so many wannbe tech journalists out there that it's good to read an interview conducted by someone who know the subject's favourite subject.
Yes, I am aware that Brian did most of the talking. But hey, only the right questions trigger interesting answers.
So thanks Mihai. If your career in research fails, consider making interviews with the heroes of computer science.
------------------
Re:Surely on a desert island ... (Score:1)
Re:I am glad I didn't make C++ (Score:1)
You missed a couple important steps... (Score:2)
Trivia for you: the
There's some really cool stuff on the history of C on Dennis Ritchie's homepage. Which I can't find right now.
Re:Using an IDE (Score:1)
Hey, why isn't vi a CLI program, eh? Just 'cause it has that "EIGHT KILOBYTES of cursor positioning code"? I mean, really, what's wrong with xvi? Is it that megabyte of display-independent graphics code? Oh well. Ed. Ed is the standard. Text editor.
---
pb Reply or e-mail; don't vaguely moderate [ncsu.edu].
Functional Programming beyond Compiler Constr. (Score:2)
A nice example of what functional languages can be used for--besides compiler construction is--the current Internatiobal Contest for Functional Programming [cornell.edu]. The task was to build a ray tracer within 72 hours. The entry [inria.fr] of the Objective Caml [inria.fr] team is especially impressive.
The importance of balance (Score:3)
I think more of the newer users of Linux should read a little more about people like this and a few other more important "personalities"
I agree in a big way. Ever notice how the really important people, when asked about their favorite language/editor/IDE/window-manager/etc, usually answer along the lines of, "Oh, I'm comfortable with about all of them; I can switch languages as needed; I use more than one of <whatever>."
I was re-reading a 1995 issue of IEEE-CS "Computer" magazine, and one of the articles was pointing out that bigots and advocates of a single method or a single approach or a single tool (e.g., langugage, editor, what have you) were invariably beginners and novices with little experience or useful education. Skilled programmers and designers know how to be flexible.
The newer users of Linux, as you say, should take note of this before starting the next flame war.
Try One Line (Score:1)
Sorry, I thought Plain Old Text would do that righ (Score:1)
stack <int> S;
Re:I am glad I didn't make C++ (Score:1)
What is STL?
Re:The best balance between power and expressivene (Score:1)
Also, remember:
1) BWK is sympathetic to your plight.
2) Think that perhaps one reason why he picked 'C' is that he could probably write Scheme in C if he really had to, but you could never write C in Scheme, and if you did, it'd be too slow. If you ever manage to write an optimizing C compiler in Scheme, though, hat's off to you. I'd be impressed just by the assembler... Therefore, in the long run, I think he'd be better off with his choice.
But yeah, I kinda like Scheme too. I might try writing it in Perl sometime.
---
pb Reply or e-mail; don't vaguely moderate [ncsu.edu].
Re:eqn - XML -- yes it is still in use. (Score:1)
Pretty much every day I still use eqn(1). It provides a clean, straight-forward, easy to remember way of describing equations. It's about 600% faster than using MS Word's whacked out equation editor.
I'll note here that unlike TeX, Word Perfect, MathML, MS Word, WordStar or whatever other thing you've got, my eqn/tbl/troff from 1977 still formats correctly and gracefully. The only thing about my documents had that changed were SCCS became RCS.
Those who use fads to create their documents (MS Word version XXX for example) don't plan on reusing their words which is just as stupid as not reusing code.
"power" of a language (Score:2)
What the hell does "power" mean in a programming language, anyway? The word has no definition in a programming context.
Let's look at the general physics definition, taken from the American Heritage dictionary.
power: n - The rate at which work is done, expressed as the amount of work per unit time and commonly measured in units such as the watt and horsepower.
I'd suggest that power exhibited in the programming-language context would be something like this:
power: n - The rate at which programming work is done, expressed as the amount of programming tasks written per unit time and commonly measured in units such as statements or lines of source code.
This is only one interpretation, mind you. Higher-level languages would thus be deemed more powerful than lower-level languages, as the source-code to machine-code ratio is more extreme. It takes fewer statements or lines of source code to express a program task in a more powerful language.
Re:The best balance between power and expressivene (Score:2)
At some point though, the novelty of it wears off and you realize you can't get anything really useful done in it and you move on to something will powerful APIs and something natively supported by your OS (such as C).
Re:Using an IDE (Score:2)
No! That's just what they WANT you to think! Its really all a conspiracy. See, if you use their IDE, they can then implant subliminal messages in your code to take over the minds of those who run your program.......
In fact, how do I know they didn't do that to this web browser? They're everywhere
-RickHunter
Re:Early C history (Score:3)
Modula is fully capable of support systems programming: you can write OSes, drivers, whatever. In that regard, it is as powerful as C. Unlike C, it has an excellent syntax and superlative large-project structures. You haven't experienced wonderful programming until you've experienced interface modules that are kept completely seperate from the corresponding code modules.
Oberon is an OS and language, combined. I don't know enough about it to provide any greater detail.
Modula-3 is a DEC initiative to develop the best p ossible large-project/team-project programming language. There are a *lot* of ideas and tools in the Modula-3 world that should be liberally stolen and redeployed in other languages.
I might also mention that Turbo Pascal is, in most ways, just a Borland interpretation of Modula-2. Indeed, it was originally suppposed to be named for Modula, but the marketing 'droids realized that pretending it was Pascal was a wise and politic move.
--
Re:eqn - XML -- yes it is still in use. (Score:1)
You can hardly put TeX and MathML in the same category as the rest?
MathML is a totally clean, portable way of describing equations. AFAIK it's much cleaner than eqn with it's idiosyncracies.
Meanwhile, TeX is the choice of most mathematicians for publishing papers. It's changed very little over recent years, hardly like Word.
Re:Early C history (Score:1)
QUICK! (Score:2)
Where can I get that?!
---
Re:C or C++ (Score:2)
(A great programmer, on the other hand, uses a very high-level-language (ie. Python), and then profiles the code and rewrites the bits that really need the speed in a lower level language (ie. C/C++). The programmer thus achieves far greater productivity. The time saved can be dedicated to improving the code even more, or adding additional functionality, or performing very extended fault/bug testing, or moving onto another project.)
<snark mode off>
Erm. Ah, did anyone hear anything?
Oh. I thought not. Nevermind, it must have just been my imagination. Sorry.
--
Re:Early C history (Score:1)
Re:Early C history (Score:4)
Okay, let's see. First of all, it's available for download here [oberon.ethz.ch], if memory serves me right. It runs as an application under Windows, Mac OS and Linux, as well as natively on PCs and on the ETH's own architecture.
For those who haven't programmed in Modula: it feels quite a bit like Pascal. But in a good way. It's high(er)-level, safe(r), "really" OO - all those things that C/C++ isn't. It's a joy for programming big systems, although a bit cumbersome for small ones - you do find yourself wishing you were using Perl. The OS itself is quite different from anything I'd ever used before, both its UI (not window-based, rather more reasonable, and I suppose it'd be easier to learn for a newbie, but I'm addicted to this damned WIMP paradigm, so I had a hard time with it) and its guts (it's a truly open system; everything is a module, written in the same language, communicating directly through the language primitives - no need for dumb-ass IPC, marshaling or "lowest common denominator" file formats; it reminds me a bit of Symbolics' Genera OS that ran on Lisp Machines).
I can't really say much more about it, but I do recommend that the reader downloads it and tries it out for himself.
Plan 9 does not have an open-source license (Score:2)
I know, because I recently asked this question on the OSI license discussion list. The major flaws in the Plan 9 license being that AT&T can require you to provide your private changes (ones that you havent distributed to anyone), and also revoke your ability to use the code should you file suit against AT&T.
I only bring this up because the interview incorrectly refers to this OS as "Open-source". It isnt.
MORE YANKEE IMPERIALISTS AT 11 (Score:1)
Unfortunately it'll probably be the peasants who gets killed more than anyone, and unfortunately that's probably not you. You can blame everyone else for your troubles but if you had the backbone to get rid of the corrupt dictators that run your banana republics you might have a chance at a stable democracy. And it would help, if you want anyone to take you seriously, if you could drop the macho attitude which stereotypes Latin males as hot-headed assholes. Your people really deserve better; you could help by not being such an asshole yourself.
Inspirational (Score:1)
God, he was at the center of everything, and still is quite in touch with the state of computer science and computing today. As cheesy as this sounds: he is my idol!!
I am also quite in awe of the whole research environment over there at Lucent. I really wish I could get a shot at working there. I sort of guess I will be doomed to be a web programmer for ever... :(
Re:Kernighan was not a "creator" of C (Score:2)
He may not have been a high creator, but he could definitely be called a high priest of the C language.
Re:Early C history (Score:1)
Hah! Shows what you know!
What about Java? (Score:2)
Not trolling here: you are blinkering yourself it you don't see any validity in bringing Java into a conversation about C/C++.
Java skills are now in higher demand than C/C++ skills in the UK - taken from a recent survey of the job adverts in the IT sector over the previous year.
cheers,
G
Re:Good Read (Score:1)
This is pretty necessary in my view -- too many of these so-called "experts" (which is rumoured to be the E in MCSE*) have no idea about the history of computing.
I once made reference to BWK to a friend of mine (a CN[AE] no less) who had no idea who I was talking about. I ended up teaching him about The Gods of Murray Hill for about half an hour (he didn't know of DMR and Ken Thompson either.) The poor bastard.
* MCSE = "Minesweeper Consultant/Solitare Expert"
Oberon (Score:1)
Re:"power" of a language (Score:2)
For example, I have to disagree with your, higher-level=more powerful definition, as well as your less-programming-time=more powerful definition. I think the ultimate power tool (besides writing out opcodes by hand) is assembler. My reasoning? You can do ANYTHING in assembler. If you can't do it there, it can't be done. Unfortunately, it sure violates your less-programming-time principle. In terms of what you can accomplish with it (it may not be easy tho') its more powerful then high-level languages.
Spyky
In case you didn't know... (Score:1)
Agreed! (Score:2)
My general attitude on Java is "those who do not understand C++ are condemned to reinvent it, poorly" (sorry, Henry Spencer)--this is a reasoned opinion, one I've come to after some study of the issues involved; I only bring it up now to make sure that you're aware of my bias.
As a Java programmer, I [prefer] the C toolbox to the C++ toolbox. The C toolbox contains all your hammers, screwdrivers, chisels, etc. The C++ toolbox contains this lot and also sticks of dynamite, nooses of rope and [Gatling] guns.
Wholeheartedly agreed. Anyone who tries to sell C++ (specifically, object oriented C++) as being the One True Way is probably smoking too much ganja. At the same time, though, there are occasions when you need pure, unadulterated power, and for those times, C++ exists.
Java seems, to my mind, to almost be a subset of C++, one in which the most dangerous features of C++ have been removed--pointers, generic programming, multiple inheritance, etc. There's something to be said for this approach, in that very few C++ programmers can use multiple inheritance, generics and so on well. But those of us who can use them well get really annoyed that Java denies them to us.
My biggest objection to C++ is that it takes a very long time--on the order of years--to become a good C++ programmer. I think, though, that it's plenty worth the effort.
As usual, most people who say "language foo is better than language bar" don't understand foo, bar, or the problem they're trying to solve in languages foo and bar. The world is filled with interesting problems to be solved. Languages are tools; and there's a lot to be said for personal preference, and comfort level, with one's tools.
Re:Using an IDE (Score:1)
gee, I use my ide from the command line:
[frymaster]/home/frymaster:%> cwide &
ta-daaa!!
Re:Early C history (Score:2)
The problem is that, once students learned Pascal, they tried to do everything in it, rather than going on to a 'real' language. This human quirk is precisely why many companies will try and get their products into schools and universities -- once people get used to product 'X' they'd rather pay the price of staying with it than learn a new, possibly better, system.
If you look at Pascal as a light-duty 'introductory' programming language that was supposed to be easy to write compilers for (probably in a language other than Pascal), then it makes LOTS more sense. (e.g. the lack of compile-time math is fine if you want to actually discourage people from using pascal in large systems, and it makes the compiler a bit easier to write). The only place that Pascal really fails is that it's actually 'good enough' that it didn't completely discourage students from using it on real world problems.
Re:Early C history (Score:1)
Pascal is dead? I hope nobody tells my employer. It's paying me a lot of money to document Pascal APIs!
Seriously, though, you raise an interesting point, if you rephrase from "what killed Pascal" to "why C overtook Pascal as a standard language." I don't think you can blame Berkeley Pascal. I can't cite specific figures, but I doubt if Berkeley Pascal was ever as widely used as any commercial Pascal compiler, especially Turbo Pascal.
Pascal probably suffered more from the ascendency of Unix, which is closely tied to C. And in general, C is better than older dialects of Pascal for writing APIs. Kernighan has a classic paper [virginia.edu] on the topic. (Apologies for the unstable link. Bell Labs appears to be re-organizing their web site.)
But on rereading "Why Pascal is not my Favorite Program Language" for the first time in many years, I made an interesting discovery. All of Kernighan comments are insightful, but all but one point is now simply out of date. (For example, Borland's Object Pascal is much more extensible than Wirth's original classroom language.) The one point he makes that still applies after a couple of decades is this: Pascal is designed to be compiled in a single pass. Kernighan objects that this makes for source code that reads "from the bottom up" and to related limitations on the order of declarations.
what makes this interesting is that this one "limitation" of Pascal works out very well in Borland's current Delphi product. In a RAD tool, source code organization is the IDE's problem, not the programmer's. And having a single-pass language means you can have IDE features that rely on on-the-fly parsing, such as automatic code completion. Borland's C++ Builder (which is essentially a tool for writing Delphi programs in C++) also has this feature, but it is much less usable in that product, due to the multiple passes you need to resolve a reference in C++.
And of course, Pascal programs compile a lot faster than equivalent C++. I was recently playing with a Linux Pascal compiler (I think you can guess which one) and was somewhat bemused to find that roughly 40% of my compile time was used up by the copyright notice displayed at the beginning of each compile!
Re:Mr C (Score:1)
Re:Casting to a void * (Score:1)
You got that from the "what's wrong with this code?" Ad they always run in Dr. Dobbs didn't you? Damn, I hate those ads... takes me more time to read them than the rest of the magazine.
Okay, the compiler doesn't catch it. There's no conceivable reason why you would want to construct something like this anyway (at least not to me!) I could put gasoline in my windsheild washer reservoir, the nozzle fits perfectly... but why the hell would I?
Re:Using an IDE (Score:1)
Personally, I like rhide, which is still text-mode, but...
---
pb Reply or e-mail; don't vaguely moderate [ncsu.edu].
Re:Early C history (Score:1)
Re:Casting to a void * (Score:2)
More accurately, the compiler doesn't erroneously complain about it. It's perfectly valid, syntactically correct C++.
There's no conceivable reason you would want to construct something like this anyway
On the contrary, it happens quite a bit. If you've got function F which calls function G, and G needs access to the internal state of F, you pass F's state to G as pointers and then cast them back to the appropriate type of variables. This is a little kludgy, but oftentimes makes for more readable code than if you'd inlined G into F.
I had him as a professor (Score:5)
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".
Re:The best balance between power and expressivene (Score:1)
Re:Aiighh! Apostrophe's! (Score:2)
--
Re:Early C history (Score:2)
Having actually written the entire I/O system, all the device drivers, and a file system for a secure operating system in the original Modula I, I'm not as impressed with it. Neither was Wirth. When he spoke on Modula II, he referred to Modula I as an unsuccessful experiment.
Modula II wasn't bad. I did a fair amount of embedded-system programming in Modula II, and it really was what you needed when you had to make a EPROM to run the program and had very limited debugging tools. Most of the time, if the program compiled, it ran properly. This is the real advantage of restrictive languages - a higher percentage of the bugs are caught at compile time.
Modula III [cam.ac.uk], the first object-oriented member of the family, never really caught on outside of DEC's old Palo Alto research operations. A free compiler is available for both NT and Linux, but it's not really maintained. Compaq has stopped all work in that area.
Oberon [oberon.ethz.ch] is an OS and language, combined. I don't know enough about it to provide any greater detail.
You're not missing much. Oberon's idea of a user interface is, well, painful. Again, there are free Linux and NT versions, so you can download and try it.
One always wonders how it would have turned out if the Stanford CS department hadn't denied Wirth tenure.
Re:Funny Dilbert with Alice and a unix programmer (Score:1)
A guy in a dress shirt with glasses approaches a scruffy looking guy: "Hey! The scruffy beard, the long suspenders, the sandals...you're one of those UNIX guys..."
The scruffy guy in suspenders responds: "Here's a nickel kid. Go get yourself a real computer."
hee hee hee...
Re:Early C history (Score:2)
Re:eqn - XML -- yes it is still in use. (Score:2)
TeX wasn't viable in 1977. troff was. LaTeX even later. If I were starting over, perhaps I'd choose TeX. Though many of you will argue, there are people that think that Professor Knuth's vision of typeography isn't the world vision. TeX looks ok. Troff looks ok. Both could probably be better, not that most of us would recognize better if it walked up and bit us.
MathML is way to new to know if it is going anywhere real -- eligance not withstanding (I like MathML). MS Word version 6.0 is older than MathML is and we know how viable that format is over the long-haul. Now a MathML to troff converter (I've not looked, is there one?) might be interesting in oh say another 5 years after we know if MathML is done or going to suffer from creaping featureism.
In the end, there are markup languages and there are WYSIWYG editors. The markup languages tend to stabile longer and that makes them a much more viable candidate for words that have any hope of being reused.
I'll note here (marginally) that if you are under 25 or 30 years old, the idea of a document being a program is probably just weird. Most big documents should be viewed as such. My books, my PhD dissertation and most of my other major documents are under revision control (RCS) and are constructed with make(1). It is neat to be able to go back and get an old paper and know that it can be reprinted reliably, it will look the same, and that I can steal pieces of it with zero trouble. Ponder doing that with a Wordstar document made on your CPM system in 1977...
Oddly, make(1) has become the largest stability issue to going back to older documents since Berkeley and GNU keep screwing with make in a mis-guided vision of 'oh we'll make it better'. Make is a time dependency file constructor. If you want to make it something else, then call it bmake, gmake, mmake, lmake, fake or weve_lost_sight_of_makes_purpose, just leave the original make alone please.
Re:Aiighh! Apostrophe's! (Score:2)
--
Re:Early C history (Score:2)
Re:The best balance between power and expressivene (Score:2)
I don't get the point about `powerful APIs', but you might have a
look at the scheme2c compiler which has excellent support for linking
C libraries into scheme code.
Re:eqn - XML -- yes it is still in use. (Score:2)
Re:Using an IDE (Score:2)
Re:Demonstrably untrue. (Score:2)
I have continual problems with a C++ system I need to access remotely from work. This is spread across a number of Solaris systems, interlinked by a customer communications protocol running over TCP/IP.
The problem is that the executables are huge. Each process, which do little more queue up transactions to a number of external systems, is at least 5MB in size. Although I don't have access to the current source code, previous revisions don't contain that much code. The processes isn't that complex, its just all the inlining that causes the problems. It is made worse by the communications library being statically linked (Arrgghh!).
Its a constant battle freeing up resources on each of the machines, as each process starts and stops. Some days I have not been able to get much done. Not having root to any of the machines (some bozo decided to start a web server on one of them) doesn't help.
I know this sound like a rant, but programmers and sysadmins are too different beasts, and the requirements of one (really quick code, forget the expense of memory) is not a practicality in the realm of the other.
Clear as mud (Score:2)
Just imagine what would happen if it caught on and comments in functional programs became commonplace. People would actually be able to figure out what functions were intended to do, and decades of good work would go down the drain. Heaven forbid!
But it gets worse: this team has even used descriptive identifiers in a couple of places. Shock horror, whatever next -- code walkthroughs?!
[PS. This comment may actually be a half-serious answer to the question of why FP has never had an impact outside of academia. Apparently FP programmers don't consider that the "software crisis" and maintainability have any relevance to them.]
[PPS. I like ML. Languages aren't obscure, only programmers.]
Re:Demonstrably untrue. (Score:2)
I've heard this excuse many time, concerning memory or bandwidth. Even if it is realatively cheap, it still matters. The allbeit small performance increase caused by inlining, unrolling loops et al goes out of the window as soon as the machine starts to swap heavily. Usually the process works fine when tested in isolatation, but starts to have problems when used in the real world.
I've also experienced network systems crawling due to no-one having any idea of network bandwidth, and assuming that installing 100Mbit ethernet was the fix, as opposed to eliminating unneccessary traffic.
Programmers and sysadmins unfortunatly have different ways of thinking.
Re:Demonstrably untrue. (Score:2)
That's not necessarily fair. The sysadmin has been handed an application to support, looked at it and said "if you want to run this application at this level of performance, you require this hardware". And the programmers would have implemented the application they were told to, without needing to think about the "big picture".
The responsibility lies with the system architect, who from the very beginning should have calculated the usage of the application in a production setting, and made it clear in the specification exactly what was and was not required, so the programmers wouldn't waste resources, and written a business case so that the management would have invested in the infrastructure.
Re:Not entirely convinced by this ... (Score:2)
I actually much prefer coding in Pascal to C. Partly as I find Pascal a very clear syntax whereas even C fans will admit it can look like line noise. Not as bad as Perl but still... Partly, too, that because it's very picky, it's very easy to bugfix. The compiler will catch so many little gotchas which would cause something weird to happen with a C program, as the problem doesn't show up until later... Example: in Pascal, if I try and write past the end of an array it crashes. I can find that _very_ easily by stepping through the code. Do the same in C and it'll normally corrupt the memory. Now, which is easier to track down and sort out?
I've often thought that C's success is at least partially cultural. I remember when I was first getting into Amigas, everything had to be hand-coded in assembler (or so it sometimes looked, anyway) or you weren't a real coder. Now, C is (in many ways) a platform-independent assembly language. Yes, it's higher level, but there's still a fair bit in common. Anyway. The point is that coding in C there was still enough metal-bashing to make the coder look like a real man. Pascal, OTOH, is just too easy.
If you're writing an OS or a driver or something else at that sort of level, C makes sense in many ways while Pascal (or most Pascal-derived languages) would have clear limitations. If I'm writing a normal user-space application, though - such as a web browser, considering where this message is being posted - IMO you just don't need the level of control C gives you. If you don't need the control, why should you pay the cost of having the little gotchas to catch? I've just got better things to do with my time, and appreciate the easier debugging. The apps users would, too - same debugging effort produces better quality. What more could you want?