Slashdot Mirror


Interview With Brian Kernighan of AWK/AMPL Fame

Reader oranghutan brings us another in Computerworld's series of interviews with icons of the programming world, this one with Brian Kernighan, who helped popularize C with his book (co-written with the creator Dennis Ritchie) The C Programming Language, and contributed to the development of AWK and AMPL. In the past we've chewed over a few other interviews in this series, including those with Martin Odersky on Scala and Larry Wall on perl. "In this interview, Brian Kernighan shares his tips for up-and-coming programmers and his thoughts on Ruby, Perl, and Java. He also discusses whether the classic book The Practice of Programming, co-written with Rob Pike, needs an update. He highlights Bill and Melinda Gates as two people doing great things for the world enabled through computer science. Some quotes: 'A typical programmer today spends a lot of time just trying to figure out what methods to call from some giant package and probably needs some kind of IDE like Eclipse or XCode to fill in the gaps. There are more languages in regular use and programs are often distributed combinations of multiple languages. All of these facts complicate life, though it's possible to build quite amazing systems quickly when everything goes right.' 'Every language teaches you something, so learning a language is never wasted, especially if it's different in more than just syntactic trivia.'"

26 of 117 comments (clear)

  1. The Practice of Programming by BadAnalogyGuy · · Score: 5, Interesting

    There are a few books I recommend to kids just starting out in the industry.

    Code Complete
    Writing Solid Code
    Programming Pearls
    and The Practice of Programming

    Even old stalwarts like Kernighan's The C Programming Language aren't as useful in the longterm as the 4 books above are.

    Anyone who wants to make the jump from "code monkey" to professional should really take the time to read the books.

    1. Re:The Practice of Programming by morgan_greywolf · · Score: 5, Interesting

      Right. The four books you mentioned aren't books for teaching you about a programming language or a particular technique, unlike K&R, which focuses just on C. They are designed to teach how to think like a programmer and how write code like professional software developer. They are more about the fundamental nature of coding; they're not as much about trying to teach you the basics as they are about trying to teach you what you really need to know to successfully take a programming project through the development cycle as a coder.

    2. Re:The Practice of Programming by Nazlfrag · · Score: 3, Informative

      Thats because you're comparing training manuals to technical manuals. K&C is still useful to this day as a standard reference that still works all these years past. The only thing similar is Knuths works, one of the few compsci works created that serves as both a training and technical reference. (kids - read Shannon thouroughly as well, starting with "A Mathematical Theory of Communication")

  2. Brian Kernighan of AWK/AMPL Fame by Anonymous Coward · · Score: 5, Insightful

    Not the Brian Kernighan of "The C Programming Language" fame, then?

  3. Re:"Need" an IDE by OzPeter · · Score: 3, Insightful

    If a programmer needs to use an IDE, as opposed to just using one for convenience, something is very wrong.

    Once you cover the basic needs of food and shelter, everything after that becomes a convenience

    --
    I am Slashdot. Are you Slashdot as well?
  4. As Brian entered the room... by MrKaos · · Score: 3, Funny

    Cries of "We're not worthy, We're not worthy" were heard.

    --
    My ism, it's full of beliefs.
  5. Re:"Need" an IDE by characterZer0 · · Score: 4, Insightful

    I need an IDE to do my job. I could lay out graphical forms by hand, but it would take long enough as to not be profitable.

    --
    Go green: turn off your refrigerator.
  6. Seriously by Anonymous Coward · · Score: 4, Insightful

    This is frickin slashdot. Who here needs an introduction of Brian Kernighan?

    1. Re:Seriously by rgo · · Score: 3, Funny
      Why don't you old people just let us live in peace!? Do you think we are all idiots?!

      Btw, what is C programming language? Is it an obsolete computer language like Visual Basic 6 or machine code?

    2. Re:Seriously by MrKaos · · Score: 4, Funny

      Nah, we know who Kernighan is.

      It's rumored he invented Al Gore.

      --
      My ism, it's full of beliefs.
    3. Re:Seriously by sconeu · · Score: 3, Informative

      Reflections on Trusting Trust is by Ken Thompson, not Brian Kernighan.

      --
      General Relativity: Space-time tells matter where to go; Matter tells space-time what shape to be.
    4. Re:Seriously by shutdown+-p+now · · Score: 3, Funny

      Btw, what is C programming language? Is it an obsolete computer language like Visual Basic 6 or machine code?

      It's actually a tool created by communist conspirators to enable the creation of the infamous Lunix operating system intended to subvert our free society. That is why you're well advised to stay away from it if you ever see it, stick to God-blessed, corporate-backed tools such as Java and .NET, and report any sightings of C programmers in the wild (generally identified by the beard) to BSA and NSA.

  7. Re:"Need" an IDE by mauddib~ · · Score: 4, Interesting

    In my very humble opinion, tools such as Emacs and vi are precursors to larger development environments, such as Eclipse or Delphi. In your case, and assuming my argument is true, we would all be going back to flipping switches and pressing buttons, since that's the only true way of understanding the code.

    If you don't accept my argument, then why are syntax highlighting, :make macros and identifier matching part of every vi install nowadays? And don't even get me started about emacs, which design purposes was to help programmers write better code. So, if you don't accept my premise, where do you draw the line?

    For me, this development can't go fast enough. I'm looking forward to languages that integrate completely with an IDE, and leave simple character representation (ASCII e.a.) behind.

    --
    This is a replacement signature.
  8. hello, world by jDeepbeep · · Score: 3, Funny

    I am most impressed with his fine work writing the first known 'Hello, world!' program.

    --
    Reply to That ||
  9. Re:"Need" an IDE by skrolle2 · · Score: 3, Insightful

    Bullshit, you only make this argument based on your comfort zones and your levels of trust.

    When you write code in a language that is not machine code you require some sort of text editor, you require some sort of file system for organizing your text files, and you require a compiler and a linker for making executables out of your human-readable code.You need to trust that all your tools actually do what they're supposed to do, and you need to be comfortable in that environment.

    An IDE is simply one more tool in the chain that might organize your files differently, that might automatically invoke your compiler, and that might automatically highlight and analyze your code for your benefit. It's still just tools in the chain, and you still need to trust them. An IDE does not bring anything fundamentally different.

    You only make your argument that an IDE is unnecessary because you are comfortable not using one, and because you probably don't trust them. And from that you argue that "real programmers" shouldn't use an IDE, because you don't, and you consider yourself a "real programmer".

    However, I might as well make the argument that "real programmers" don't need text editors or compilers or linkers. How can you trust your compiler, hm? No way, a programmer should be able to enter machine code directly, and that text editor and compiler should only be for convenience, not necessity. And get off my lawn!

    But that argument is of course stupid, text editors and compilers and higher level languages add to the productivity of the programmer, in the same way that IDEs add to the productivity of the programmer. Not using the best tools available is just stupid masochism.

    Then again, in 10 or 20 years there will be something on top of IDEs that make them look as primitive as a simple text editor does to Eclipse, and I'll probably be whining about the young folks and their newfangled thingies, and I won't trust them, because my comfort level is in an IDE as we know them today. Hopefully, I'll not be as old and stuck in my ways as you are though.

  10. Re:"Need" an IDE by Anonymous Coward · · Score: 5, Insightful

    I think you draw the line when a language "requires" an IDE so bloated that it runs slow on a Core 2 Duo machine, and makes you want to code in Notepad instead, except you can't because the language is too convoluted.

  11. Re:"Need" an IDE by Anonymous Coward · · Score: 3, Insightful

    Bullshit, you only make this argument based on your comfort zones and your levels of trust.

    Profanity, straw-man, pseudo-psychology.

    When you write code in a language that is not machine code you require some sort of text editor, you require some sort of file system for organizing your text files, and you require a compiler and a linker for making executables out of your human-readable code.You need to trust that all your tools actually do what they're supposed to do, and you need to be comfortable in that environment.

    Appeal to the obvious.

    An IDE does not bring anything fundamentally different.

    Opinion presented as fact.

    You only make your argument that an IDE is unnecessary because you are comfortable not using one,

    Straw man.

    and because you probably don't trust them.

    Straw man.

    And from that you argue that "real programmers" shouldn't use an IDE, because you don't, and you consider yourself a "real programmer".

    Changing the content of parent comment.

    However, I might as well make the argument that "real programmers" don't need text editors or compilers or linkers. How can you trust your compiler, hm? No way, a programmer should be able to enter machine code directly, and that text editor and compiler should only be for convenience, not necessity.

    Extending parent's position to absurdity.

    And get off my lawn!

    Ad hominem.

    But that argument is of course stupid, text editors and compilers and higher level languages add to the productivity of the programmer, in the same way that IDEs add to the productivity of the programmer. Not using the best tools available is just stupid masochism.

    Ridiculous comparison between programming languages and GUI widgets.

    Then again, in 10 or 20 years there will be something on top of IDEs that make them look as primitive as a simple text editor does to Eclipse, and I'll probably be whining about the young folks and their newfangled thingies, and I won't trust them, because my comfort level is in an IDE as we know them today.

    Unjustified extrapolation.

    Hopefully, I'll not be as old and stuck in my ways as you are though.

    Ad hominem.

  12. Re:"Need" an IDE by MaraDNS · · Score: 3, Interesting

    The original Usenet posting from 1983 actually wasn't pseudo-poetry; it was prose. The original groups.google.com article has disappeared, but a web version of the article in its original prose is here.

    --
    MaraDNS is an open-source DNS server.
  13. "Need" != "Helpful tool" by betterunixthanunix · · Score: 3, Interesting

    I personally use Emacs, with syntax highlighting and various other modes, because it is helpful and speeds up the process of writing code. There have been times, however, where I have not been able to use Emacs for some reason (e.g. I had to write some code on a system that did not have it installed). Once I was reduced to using a line editor to write some code (yes, in the 21st century), and while I hope to never experience such a situation again, I was able to deal with it and get the work done.

    All too often I see programmers who are completely helpless when they cannot use their favorite IDE, which is the problem I was alluding to. An IDE is a great tool that can save a lot of time, but when it gets to the point where people cannot figure out how to run a Java program without starting up Eclipse, something very bad is going on.

    --
    Palm trees and 8
  14. Re:"Need" an IDE by Just+Some+Guy · · Score: 4, Insightful

    I'm looking forward to languages that integrate completely with an IDE, and leave simple character representation (ASCII e.a.) behind.

    Oh, me too! I can't wait until diff and patch no longer work, and every version control system has to explicitly support every distinct language, and examples on Stack Overflow are files you have to download and open in an IDE before you can examine them, and Google has to learn each language's binary serialization so that it can search code snippets.

    In a time when every other type of file is moving to standardized formats, I just love the idea of my industry balkanizing into a million crap representations. That is certain to make us all more productive.

    --
    Dewey, what part of this looks like authorities should be involved?
  15. Re:"Need" an IDE by corbettw · · Score: 3, Interesting

    From the postscript at the end of this version: "The original submission to the net was not in free verse, nor any approximation to it --- it was straight prose style, in non-justified paragraphs. In bouncing around the net it apparently got modified into the `free verse' form now popular. In other words, it got hacked on the net. That seems appropriate, somehow."

    --
    God invented whiskey so the Irish would not rule the world.
  16. Re:"Need" an IDE by Abcd1234 · · Score: 3, Insightful

    I think you draw the line when a language "requires" an IDE so bloated that it runs slow on a Core 2 Duo machine, and makes you want to code in Notepad instead, except you can't because the language is too convoluted.

    1) Uh, since when did the nature of a language dictate how fast/slow an IDE implementation is?
    2) Why, dear god, would a slow IDE be evidence that a language sucks?
    3) What language are you using that is "too convoluted" to use outside of an IDE? Because I've used quite a few, and I've yet to come across *any* language that "requires" an IDE.

  17. Re:"Need" an IDE by rsborg · · Score: 4, Insightful

    For me, this development can't go fast enough. I'm looking forward to languages that integrate completely with an IDE, and leave simple character representation (ASCII e.a.) behind.

    That platform arrived in the 70's and it was called Smalltalk. All current mouse-based GUI systems are an offshoot of the original Smalltalk system. Wiki link. In reference to your dream-system, things like this were pretty potent and ahead of their time:

    Smalltalk is a structurally reflective system whose structure is defined by Smalltalk-80 objects. The classes and methods that define the system are themselves objects and fully part of the system that they help define.

    This would obviously allow you to edit your IDE/OS in real-time/at runtime.

    --
    Make sure everyone's vote counts: Verified Voting
  18. Re:Labview by shutdown+-p+now · · Score: 5, Interesting

    There may be a non-character-based program representation (useful for developing and maintaining non-trivial projects) in the future, but I fear we'll all be retired or expired by then

    This has been tried numerous times. It just doesn't work, period.

    More recently, I recall reading an interesting interview with Microsoft "project Oslo" guys. Oslo is supposed to be a DSL framework for .NET. Now, existing releases already have something called "DSL SDK", integrated into VS, but the "DSLs" that it lets you create are purely graphical, like flowcharts, and have to be "coded" using a visual designer.

    That didn't exactly catch on, and Oslo guys explained that one of the most repeated customer feedbacks was that, while visual designers are occasionally useful, in the end it's still faster and easier to spend half an hour training, and then write DSL code as actual text in a text editor. Note: not for a programmer, but for a business analyst, or some other guy who haven't ever seen any code before!

    So they ditched the visual designer idea in Oslo, and instead came up with the tried and proven approach of parser generators (going for LL(*) over LALR as it's simpler to use and less restrictive, even if slower), and coupled it with a text editor that can load a grammar for the parser generator, and automatically provide syntax highlighting and simple completion for it.

  19. Re:"Need" an IDE by spitzak · · Score: 5, Informative

    I'm looking forward to languages that ... leave simple character representation (ASCII e.a.) behind.

    I worked on such a thing in 1983 at DEC (look up my MIT thesis to see). Structural editing.

    Conclusion: it was an absolute disaster. Programmers cannot use this. Most of the work was in altering it to be as much like a plain text editor as possible.

    Don't think you have an amazing new idea.

  20. Re:"Need" an IDE by AuMatar · · Score: 4, Interesting

    When the hell did laying out graphical forms become programming?

    --
    I still have more fans than freaks. WTF is wrong with you people?