Computerworld

An inteview with Brian Kernighan, co-developer of AWK and AMPL

Computerworld's series on the most popular programming languages continues as we chat to Brian Kernighan
Tags | C | Brian Kernighan | a-z of programming languages | AWK | AMPL

Who would you consider to be the icons of the programming world?

For purely parochial reasons, I think of people who I know or whose work I know well. Ken Thompson and Dennis Ritchie changed my life and yours; we would not be having this conversation without them. People who created major languages would also fall into that camp, for instance we all regularly use languages created by Bjarne Stroustrup, James Gosling, Larry Wall, and Guido von Rossum. And of course there are super-icons like Don Knuth and Fred Brooks. But this is a personal list; there are many others whose work has been influential, and your list would surely differ.

Every language teaches you something, so learning a language is never wasted, especially if it's different in more than just syntactic trivia.
(Brian Kernighan)

Bell Labs has produced some of the most influential figures in the world as far as IT goes — does it still maintain its relevance in your view? What could it do to better its acclaimed past?

Bell Labs was an astonishing place for many decades, though it fell on somewhat hard times during the telecom meltdown some years ago, as its corporate owner had to cope with shrinking markets. There are great people at Bell Labs but the operation is much smaller than it used to be, which reduces the chance of a big impact, though certainly it can still happen — all it takes is one or two people with a good idea.

What are you working on at the moment? Can we expect any new books or work on languages?

I seem to get totally wrapped up in teaching and working with students during the school year. During the summer I try to spend time in the real world, writing code for therapy and perhaps for some useful purpose. This is fun but so far it hasn't led to any book, though ideas are percolating. I'm still very interested in domain-specific languages and, more generally, in tools that make it easier to write code. And it sometimes seems like some of the old Unix command line languages for special purposes might have a second life in web pages. So I play with these from time to time, or entice some student into exploring a half-baked idea for a semester.

More about: Amazon, Bell Labs, Bill, Eclipse, Facebook, Fred, Google, Linux, Microsoft, NU, Scala
References show all

Comments

1

ALB

Wed 07/10/2009 - 19:23

Lovely to see his humility.

2

Daniel Butler

Thu 08/10/2009 - 01:02

I recommend that Mr. Kernighan add Ruby to his list sooner rather than later. While it is true that "a language that doesn't affect the way you think about programming is not worth knowing," nowadays, it's also true that "a language that can't be affected by the way you think about programming is not worth knowing." Ruby's power comes from its LISP-like flexibility, its expressiveness, and the power to make DSLs which cleanly map to the way humans should be thinking about programming in specific domains.

That power, and the joy of reading beautifully crafted code (which often require little additional commentary), make Ruby a aesthetic pleasure to work with, unlike the awkward hacks that similarly-capable Perl or Python programs force you to craft.

And anything you've heard about Ruby's slowness in the past is no longer the case with the latest optimized interpreters.

3

Anonymous

Thu 08/10/2009 - 01:09

Perl/Ruby/Python are very similar. If you know one of these, it should be smarter to learn something different. I'd recommend something functional, since that seems to become more popular in the future (my next language will be Haskell or Erlang).

4

Devon Jones

Thu 08/10/2009 - 03:41

I'll offer an opposing point of view. As a Python and Ruby developer, I would say that there is no point in picking up Ruby if you already know Python. While Ruby offers 'prettier' code, Python has focused more on ensuring that it's parts are strong, and work well for edge cases. Ruby has focused more on what I call "happy path" development, where things work well, so long as you stick to the parts that the community widely uses. As an example, if you are using Mysql, everything is hunky dory, but if you use Postgres, the drivers suffer from neglect.

After spending a few years working on both daily, I think of Python and Ruby in terms of Beauty and the Beast. Ruby, which is pretty holds the role of Fair Is Foul, Python which is more functional but less pretty holds the role of Foul Is Fair

5

Skeptical Technologist

Thu 08/10/2009 - 04:10

Who needs security, anyway? The C language has certainly touched all of our lives in important ways... perhaps most of all by making it so difficult to write reliable secure code and therefore facilitating the loss of billions of dollars to security flaws caused by buffer overflows and similar coding errors... not to mention the billions spent on security "enhancement" software that wouldn't have been necessary if the underlying systems had not been riddled with C-borne defects. The concept of a language that has subscripts, but neither arrays nor strings, might have been groundbreaking, but that part couldn't be called brilliant. It made the language easier to implement and more efficient, to be sure, but oh, what a price we've paid since then. A moment of convenience, a lifetime of regret.

6

Anonymous

Thu 08/10/2009 - 05:44

Security is overrated.
Ease

Security is overrated.

Ease of use, and performance trumps all.

Let me know when you manage to have a OS/Application/System worth a damn using anything else than C or a variant thereof.

The only problem with C, is that the world is full of programmers that are not fit to use a pocket calculator, not program a computer.

Get rid of the chaff, and the rest of us can manage to use C quite well, thank you.

And btw, "Technologist"? Go away kid!

7

Anonymous

Thu 08/10/2009 - 07:00

There's some great C programmers out there. You're obviously not one of them.

8

Anonymous

Thu 08/10/2009 - 08:49

@perl/ruby/python are similar statement.

No. Let's leave python forever as who since Stuart Feldmans's make utility ever considered whitespace operable? Unbelievable. Not worthy.

So this aside, how can you compare ruby and perl? By their literal names? I can't stand the Perl syntax but it truly is an art. Still not sure how ruby had perl in it's rearview mirror wity syntax and I find them grossly different. Ruby is bloated in solution context.

9

(real) C programmer

Thu 08/10/2009 - 17:18

> Skeptical Technologist
>

> Skeptical Technologist
> "loss of billions of dollars to security flaws and C-borne defects"

The word of an "expert" -that has never heard of memory pools, dynamic buffers, garbage collectors... all coded in C.

1. If Java and script language can use those toys, why C could not also?

2. Ruby, Perl, Python, etc. are crippled by core security flaw. Not C.

3. The only "lifetime of regret" we might have is to see idiots talking without knowing.

People then say, give me a live example of all those tools used by C.
Fair enough.

The (free) TrustLeap G-WAN ANSI C scripts:

- are 120x faster than Apache/PHP;
- use memory pools and dynamic buffers (no overflows);
- take 50 KB of code (not 50 MB);
- are under constant attack since they were shipped;
- have exposed no vulnerability (another world record).

Sure, "Skeptical Technologist", with all his science, would "not call it brilliant".

10

ian

Thu 15/10/2009 - 12:12

"Let me know when you manage to have a OS/Application/System worth a damn using anything else than C or a variant thereof."

Yes. Unisys MCP systems. For HLL implementation, they predate C and Unix by at least five years going back to the Burroughs B5000. All system software is written in Algol-like languages, not assembler (there is no assembler) with HLL syntax like C. Security is ensured at a low level since all bounds and buffer overruns and much more are checked and crash the program straight away, producing very readable stack dump, rather than going on and producing havoc. They have true virtual memory, built into the machine, not something kludged on top.

Many of the concepts from the B5000 have gone into today's software. Like systems programming in HLLs, virtual memory, OO programming, virtual machines, multiple processors, removal of Von Neumann bottleneck, etc, etc. But nothing was ever quite done as well, resulting in many of the current headaches of the computer industry, which Burroughs had mainly solved way back in 1965. C is really pretty flimsy and a poor variant of ALGOL for systems programming.

11

shashank

Thu 15/10/2009 - 15:38

Sir,I hope You continue to write some good books like "The practice of programming" and guide students like me.
I was really intrested reading your books.

Regards
shashank

12

Dharmaraj Iyer

Sun 08/11/2009 - 03:14

Great questions! You might also be interested in this interview with Brian Kernighan: he covers his personal history and the creation of the C book, and he offers advice to students, graduates, and retirees.
http://www.harmonyatwork.in/blog/2009/10/leap-in-and-try-things-brian-kernighan/

13

sarareid28

Sat 14/11/2009 - 23:37

I have read the entire blog. It is really very nice. There are many good ideas and experience of the eminent personalities have been shared at here. Thanks for sharing your ideas.

<a href="http://www.vitabits.co.uk/antioxidant">depression</a>

Post new comment

The content of this field is kept private and will not be shown publicly.
Users posting comments agree to the Computerworld comments policy.
Login or register to link comments to your user profile, or you may also post a comment without being logged in.
Related Coverage
Recent Discussions
Whitepapers
All whitepapers
 
Computerworld Community Comments
Sponsored Links
 
Back to top Sitemap
Copyright 2009 IDG Communications. ABN 14 001 592 650. All rights reserved.
Reproduction in whole or in part in any form or medium without express written permission of IDG Communications is prohibited.