>> Sean: What does "Implementation" actually mean? >> DFB: Well, at its simplest, you could say:
"It's writing a program to do it". But, of course, there's a lot of infrastructure
behind that. When you're devising a strategy a program, to do it one of the first
things you have to think about is, first of all, what's the logical progression of
what I'm trying to do in the program? And secondly what kind of data structures
arrays, structures, whatever. What infrastructure is needed to support all
that data while you're processing it? And different people can have different ideas
about what the best implementation is. I mean, for example, we've had recently from
Alex Pinkney, linked lists. >> AJP: And this points to NULL because we're browsing NASA and then - read a bit about NASA -
clicked on the Neil Armstrong article! >> DFB: I mean, some people are so mad about
linked lists they'd use them for anything! And so, yes, I implemented it with linked lists
because it was the right data structure for this particular thing. And then once you've
got the data structure you say: "Ah! but I felt that the best algorithm to use for this
because it's so similar to what he did .... "
Dijkstra's algorithm, you know, finding your way from A to B, as it were.
So the algorithm and the data structure. In fact it was, I think, Niklaus Wirth
did a book once called 'Algorithms + Data Structures = Programs'. So it's down
to saying: "What's your choice of both of these things? Justify why you did it that
way". And your implementation may differ from other people's implementations
because they don't agree with you that that's the way to do it.
There's no absolute right and wrong. One's always amazed that what seems to be
absolutely the definitive way to do it - very often it doesn't ... is never proved
completely wrong. But there's always some little tweak that you can put on the end
and you find this in things like coding theory, y'know, we thought this was the
best way to handle ..... No, somebody came up and said: "Actually
no, the basis of what you've done is right but why not at the tail-end do it
this way, because that makes no end of difference." It's a bit,in a way, like saying Newton
was not wrong - he just only told part of the story and Einstein supplied the
rest. And that can so often happen in programming. Very occasionally you do
get a completely new idea comes along. And you say: "Hey, we could tear that up and do
it this way". That's once in a very long time. that is.
>> Sean: Is there the equivalent sometimes of somebody turning up to a Formula 1 track in a tractor ?!
Yes it's going to go around the track
but is it completely unsuitable?" >> DFB : To all the wonderful undergrad. students in
Computer Science out there, forgive me. Yes, certainly sometimes you
look at programs that have been handed in and they really are
tractors trying to compete with MacLaren Formula 1 cars.
Yeah, they get round, but y'know, in a very non-optimal way. But sometimes, yes,
sometimes yeah one is amazed and delighted by the ingenuity that people
can show in their choice of algorithms and data structures. Something really new.
And, I mean, back to the other video I've done about "Poetry to
Programming". A lot of us feel - and somebody actually said this - was it
Tony Hoare, or Dijkstra, or Don Knuth ... ? It is like writing a poem! If you get your
implementation, your program, to work and you think it's beautiful
you get a great sense of satisfaction. and somebody does ... somebody out there tell
me who it is?. Somebody does call their completed programs 'poems'.
As we well know. Yeah! I know the feeling. Turing was a shocker for wanting to do it even
though it had been done before. And finding it all out for himself. Because he
didn't want the grooves in his mind to be polluted by knowing how other people
had done it. Now that's fine, but at the end, when you've done it, you've got to
say: "Has anybody done it differently before?" And you've then got to take stock.
Turing was a bit of a shocker for doing it his way and not checking whether anybody
had done it before. If you remember he got his Fellowship [at King's College Cambridge] with tackling a problem
and he didn't realize until he'd done it. Because he didn't want to look at how the people might
have done it! They give him the Fellowship anyway but he
found it had been done four years earlier. But actually his way had some nice
little tweaks in it. and his tutor thought:
"That's nice that little extra tweak you've done there - it's worth it!"
>> Sean: So, Implementation: sometimes you re-invent the wheel; sometimes just go your own way?"
>> DFB: Yes, that's right. Yeah!