Spirit rover OS problems - Page 5

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it

So you disagree with the experiments and conclusions of B F Skinner?

I don't quite understand how a programmer can get lazy about the kind of
error that you can make in one language, and you can't make in another.
If you can't make that type of error, how can they get lazy?  

--

Rick "rickman" Collins

snipped-for-privacy@XYarius.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

Lots of people disagree with Skinner. Most of them are psychologists.

Did Skinner actually do much research on human learning?

--
Al Balmer
Balmer Consulting
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it

Funny, they still teach Skinner in the schools around here.  I can show
you many examples of operant conditioning in people.  And I don't really
belive anyone seriously doubts its application to humans either.  It may
not explain all of human behavior, but it is certainly a significant
component.  

--

Rick "rickman" Collins

snipped-for-privacy@XYarius.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

Of course they do, but I hope that's not all they teach. Skinner was
not the first psychologist with a theory, and certainly not the last,
or latest.

--
Al Balmer
Balmer Consulting
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )
           snipped-for-privacy@yahoo.com "rickman" writes:

Quoted text here. Click to load it

He is right only in part and then only in simplistic terms. Engineering
is a much more complex behaviour scenario.
 
Quoted text here. Click to load it

When you have a language that prevents the programmer making errors
(presumably by auto-correcting everything he inputs) the programmer
is no longer analysing why he needs to programme in specific styles.
He may also stop thinking innovatively and ends up churning out
standard "implement this complex logic" type programmes.

When you remove those safety nets the programmer must then continuously
appraise the code he produces. He will look for sensible re-use, novel
ways to simplify the application logic, improve factorisation and
ultimately become a better craftsman programmer. His reward is not
necessarily all in money terms but also in a great deal of self-
satisfaction.

Allowing novice programmers to grow into true craftsmen will yield
programmes that are well thought out, well designed, fully reviewed
and as correct as can be obtained. This software will also be very
maintanable and of very good quality. Also it can be achieved without
very complex procedures or expensive tools.

--
********************************************************************
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

First, I was making a joke.  Second, Skinner is outdated and doesn't
really apply to complex behavior anyway.

As far as the context goes, you'd need the programmer to actually be
rewarded for doing the right thing for this to make sense, and also
know that the reward is linked to the action.  Having to do lots of
work over and over doesn't turn that work into a habit or reduce the
desire to find shortcuts.

If you are prevented from making mistakes, but are never taught that
such mistakes exist, you probably won't learn.  The novice programmer
who is required by the compiler to do extra work with no justification
may just consider it a bunch of hurdles to jump through without a real
understanding about why such hurdles exist.  There is no direct link
in that novices mind between the extra work and the fact his programs
work more often.

--
Darin Johnson
    "Floyd here now!"

Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it
learn?
Quoted text here. Click to load it

Actually, both work fine.
Reward == positive reinforcement.
Consequence of mistake == negative reinforcement.
These are equally powerful. If you are prevented from making mistakes, you
do not get the negative reinforcement that comes from having to locate and
fix them. Therefore you do not learn as well if you are prevented from
making mistakes. "Working without a net" can also lead to operant
conditioning, where the programmer discovers that by performing certain
actions (i.e. adopting certain forms of self discipline with regard to
coding practices), positive reinforcement increases, and negative
reinforcement decreases.
I guess the choice is whether you prefer to prefer to achieve results
through self discipline, or through externally imposed discipline. Often the
answer depends on whether you are applying the theory to yourself, or
someone else.  :-)

Tanya



Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it

That is an assumption on your part and was proven to not be the case by
Skinner's work.  Negative reinforcement is not a good teaching tool.  Do
teachers yell at kids to get them to learn?  Do they punish students
when they make mistakes?  No, they correct them, but offer encouragement
to minimize the negative aspects of failure.  But the absence of
positive reinforcement is very different from negative reinforcement.  


Quoted text here. Click to load it

You can still make mistakes and learn debugging skills even if your
programming language prevents you from making a class of mistakes (the
preventable ones).  And you ideas about negative reinforcement are not
valid (see above).  


Quoted text here. Click to load it

Again, this does not apply.  If you use a language that prevents certain
types of errors, then how is working "without" a net a better way to
learn?  Learning that there are languages that let you make preventable
mistakes is no great revelation.  


Quoted text here. Click to load it

Ok, if you think stopping you from making preventable mistakes is a bad
idea, then maybe we should do away with things like hand rails on
stairs.  Then lots of mistakes could be made and people would learn to
not be so "undisciplined" when walking on stairs.  

Do you not see how silly this rational is?

--

Rick "rickman" Collins

snipped-for-privacy@XYarius.com
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

People here seem to be confusing negative reinforcement with
punishment.  They aren't the same thing.  Reinforcement (either
positive or negative) increases the frequency of preceding
behavior.  Punishment decreases the frequency of preceding
behavior.

Quoted text here. Click to load it

And both are different than punishment.

--
Grant Edwards                   grante             Yow!  I HIJACKED a 747 to
                                  at               get here!! I hope those
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )
           snipped-for-privacy@yahoo.com "rickman" writes:

Quoted text here. Click to load it

I remember that during my school days the teachers were very adept at
making you realise how bad your mistakes were. They were also equally
adept at showering praise when it was due. We were never made to feel
small when our mistakes were pointed out.

Try an find a book called "The One Minute Manager" which I have found
has a much better balance of the carrot and stick aproach.

--
********************************************************************
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it
... snip ...
Quoted text here. Click to load it

However "safer" languages, such as Pascal, apply that negative
reinforcement as close to the point of error as possible, i.e. on
the next compile, or possibly the next test run when the 'out of
range' error appears.  In unsafe languages, such as C, the crash
may occur far removed from the foulup, and the frantic casting
about for a clue does not teach much (apart from methods of
frantically casting about for a clue).  C programs are even more
in need of thorough regression tests than those "safer" languages,
although all should use them.

Contrast this with housebreaking puppies, and you will soon see
parallels.   If you just come home and yell at the poor beastie
hours after the dirty deed, you will simply train him or her to
hide when you come home.  The C tyro applies a cast if he can't
hide.

--
Chuck F ( snipped-for-privacy@yahoo.com) ( snipped-for-privacy@worldnet.att.net)
   Available for consulting/temporary embedded and systems.
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it


That's punishment not negative reinforcement.

--
Grant Edwards                   grante             Yow!  I have no actual
                                  at               hairline...
We've slightly trimmed the long signature. Click to see the full one.
Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

Programmers aren't puppies.  A puppy doesn't understand it when you
try to explain what the bad dead was.  A programmer is fully capable
of understanding that the mistake they made three weeks ago is the
cause of their current headache.  (well, _some_ programmers are :-)

Programmers are also quite able to learn from the mistakes of others.
Ie, assign them the task of fixing a program written by someone else,
and they'll learn how bad style can result in an unmaintainable
mess.

--
Darin Johnson
    I'm not a well adjusted person, but I play one on the net.

Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

I'd love to a see your proof for that statement.

Alan Turing didn't even think it was possible to prove whether or not
any given program would actually come to a finish - but what would he
know?

--
  Max

Re: Spirit rover OS problems ( a reliable language )
I guess there aren't any compilers worth a damn, then.

Here are some of the errors that you are expecting the compiler to handle:
(a)  lexical errors, detected by the scanner recognizing the lexical tokens
of the language
(b)  syntax errors, detected by the parser building the parse tree for a
program
(c)  static semantic errors (i.e., a contextual constraint) detected by
semantic analysis of a program,
(d)  dynamic semantic errors, detected by code generated by the compiler
(e)   logic errors, in which the compiler does what the programmer
specified, rather than what the programmer intended

That last one will get you every time.

Tanya

Quoted text here. Click to load it



Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

No, there are plenty of decent compilers around. It's the job of a
compiler to determine whether or not a given source conforms to the
formal definitions and constraints of the language in question and, if
so, to translate said source into into another form - usually machine
code or some intermediate language. If the source is in error, then
the compiler should explain where and why.
It is NOT the job of a compiler to try and work out whether the code
actually does what the programmer meant it to - that's simply
impossible, both in theory and practice.

Quoted text here. Click to load it

Well.... sort of. Very few errors get caught by the lexer/tokeniser
itself, and pretty well none in symbol table lookup. Nearly all typos
are actually caught by the parser. For example:

int 3teve = 12 ;

No problem for the lexer, it tokenises the line as something like:

1) Keyword 'int'
2) Literal Integer '3'
3) Identifier 'teve'
4) Operator '='
5) Literal Integer '12'
6) Operator ';'

The error is only caught when the parser finds it can't locate any
rule to reduce the sequence
<KEYWORD_INT><LITERAL><IDENT>...

It's rather academic though, since the lexer, dictionary, and parser
are usually highly-integrated in recent compilers, and it's often hard
to see exactly where one ends and the other begins. Such integration
makes the job of error reporting and recovery much easier, somewhat
ironically.

Quoted text here. Click to load it

Not sure what you mean by that. The only real semantic analysis
performed by compilers (for "main-stream" languages, anyway) is of
data-flow, and that's really only there for optimisation purposes, if
it exists at all.

Quoted text here. Click to load it

Huh? That sounds like a compiler bug, to me.
Could you give an example.

Quoted text here. Click to load it

No, I simply do not expect a compiler to "handle" such errors. Nor do
I expect it to handle the other major category of bug you missed -
errors of omission, where the code does not handle unexpected events
or input in a predictable way.

Quoted text here. Click to load it

I don't really think any programmer who expects a compiler to fix his
bugs for him is going to progress very far in his chosen profession,
do you?

--
  Max

Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

Sorta depends on your definition of right
or wrong doesn't it?



Re: Spirit rover OS problems ( a reliable language )

Quoted text here. Click to load it

I'm not sure I understand you.  The following code is type-safe but
doesn't work:

float sqrt(float x) {
  return -1.0;
}

There are certainly better, richer type systems out there, like
dependent types and subtypes.  An issue with that is once you make the
type system rich enough to specify useful things, then it becomes
difficult or impossible for the compiler to automatically decide if the
types are right.  In one environment I use that allows subtyping, you
may have to provide proofs to the system to allow it to accept your
code.

Personally, I'm a big fan of good type systems.  But as long as users
want the convenience of automatic type checking then the type systems
will have to be sufficiently simple that they can't express much in
terms of overall correctness.

Kelly


Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it

That would seem to be true. The reason it is not is that complex types are
built up from simple types. The compiler need only check the simple types.

Now a separate, but relivant idea is if it can be proven that a given set
of types can be proven correct. This is the area of computer theory, not
code. Just as mathemeticians can perform proofs, so can it be proven
that types are safe even if used in unforseen combinations. In many ways,
the mathematical basis for numeric systems is similar to the computer
theory basis for types. In brief, mathematics has the concept of "fields"
for number theory, and computer systems such as types, and even the
Von Neuman computer archetecture we use obey field properties.

Quoted text here. Click to load it

Again, not true. Any type of any complexity can be verified.



Re: Spirit rover OS problems ( a reliable language )
Quoted text here. Click to load it
solution.

Maybe we're talking about different things.  From your statement above,
it sounds like you believe strong typing can remove all errors in
computer programs.  Is that what you mean?

I'd probably agree with that statement, but I believe that a type system
strong enough to specify absolute correctness is undecidable, and thus
not likely to be used by the vast majority of programmers.

If you can demonstrate a decidable type system that can completely
specify the correctness of the floating point square root function, I'd
be grateful to see it.

Kelly


Site Timeline