Subject:
|
Re: What are all those lego companies?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Mon, 19 Feb 2001 07:28:34 GMT
|
Original-From:
|
Malcolm S Powell <msp@umbra.co.AVOIDSPAMuk>
|
Viewed:
|
935 times
|
| |
| |
Matthias Jetleb wrote:
> You might consider the possibility that he actually wrote these small
> snippets of code over his 30 years of programming. Done properly, the
> code can be written in general terms such that it can be linked
> anywhere it is needed. As long as the code receives and returns
> parameters and doesn't therefor use any program-specific variables it
> can be reused. It is more difficult to do, and requires a bit more
> forethought but the long-term benefits are enormous. Only a fool would
> re-write something that they had done before.
Yes, this was the gist of my point. Getting the high level organization right
reduces the amount of source text you need to produce to get the job done far
more than the odd keystrokes you save by missing out layout characters.
In the 30 plus years you correctly deduce, I have written in many assembly
languages, high level programming languages (imperative and declarative) and
even non executable specification languages and have always been looking for
common structures that can be reused on a regular basis. This is often called
"Template Based Programming". It can be practised in any language and supported
directly by using syntax directed rather than text editing techniques. It is
also central to designing type hierarchies in object oriented languages.
The other crucial lesson I have learnt is that, unless you are writing device
drivers or similar low level things, the structures (class or routine
hierarchies) found in a program that solves a real world problem should reflect
the nature of the problem and not the nature of the computer that executes it.
It is only during the final optimization phase that it ever makes any sense to
modify this. However, over the years two things have reduced the number of
occasions on which I have had to do such optimization. One is the ever
increasing speed of computer hardware. Fast hardware is cheap. My time is
expensive. Let the processor do the work. The other is getting the overall
structure of the software right to start off with. Having also taught computer
science, in amongst all this programming, I am well aware these high level
issues are the most difficult ones to teach.
One final point is that when I program the RCX I am going back in time around
20 years to a period when memory was very limited and processors were so much
slower than they are now. Fortunately, I can remember how to cope with that
situation and the machine I cross develop from is so much faster!
Malcolm S Powell
|
|
Message is in Reply To:
| | Re: What are all those lego companies?
|
| (...) Evidently a Microsoft employee. (or maybe Lego S@H webpage designer??) :-) (Sorry, I tried, but I just couldn't let that one go.) (-: (...) A touch grumpy today are we? Did you wake up on the wrong side of bed this morning?? You might consider (...) (24 years ago, 17-Feb-01, to lugnet.robotics)
|
24 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|