The Artima Developer Community
Sponsored Link

The Art of Computer Programming
A Conversation with James Gosling, Part I
by Bill Venners
First Published in JavaWorld, March 25, 2002

<<  Page 2 of 3  >>


The Art of Computer Programming

Bill Venners: I recently dusted off Donald Knuth's The Art of Computer Programming (Addison-Wesley Pub Co., 1998; ISBN: 0201485419), which extensively covers algorithms. It struck me as funny that of all the work I've done in my career, I've rarely done hard-core algorithm design. Do you think algorithms are the art of computer programming, or has something changed since the '60s and '70s?

James Gosling: Whether you're doing intense algorithm design or not, I think computer programming is always an art. Many people don't understand how to put software pieces together when performance counts, or understand a software piece's performance characteristics -- how to reasonably analyze what does what.

People rarely ask: "Could I do it a faster way?" They'll layer APIs 10 deep. You'll see these 10- or 100-levels-deep call stacks and say, "Oh my God!" These people lay abstractions upon abstractions upon abstractions. They build things out of, in some sense, an accidental complexity that is mind-boggling.

Bill Venners: You once said you were flabbergasted that so many people get into software development without taking an algorithm analysis course. You said the systems people build limp along on bad design. Would that be bad algorithm design, or bad object-oriented design, or what?

James Gosling: Oh, it's bad everything design. Bad algorithm design comes from not appreciating how things work. Say you're adding stuff to a table or an array, and you want to grow it. Do you make it 10 bytes larger each time, or 10 percent larger each time? That sounds like the same thing. But if you make it larger by 10 bytes each time, the performance is quadratic in the number of bytes you add. If you increase the length by 10 percent, instead of 10 bytes, it goes from being quadratic to being linear. It's a simple distinction.

<<  Page 2 of 3  >>

Sponsored Links

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use