To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 23714
23713  |  23715
Subject: 
Re: Robolab as a tool for teaching programming
Newsgroups: 
lugnet.robotics
Date: 
Wed, 16 Mar 2005 19:53:23 GMT
Viewed: 
3784 times
  
On Wed, March 16, 2005 11:01 am, John Hansen said:
In lugnet.robotics, Steve Hassenplug wrote:
On Tue, March 15, 2005 12:01 pm, John Hansen said:
And
I don't feel angry or even particularly annoyed that FLL doesn't allow using
a real programming language in its competitions.  Just discouraged and
frustrated, mostly.

So, this is the same argument we've been hearing for the last couple weeks,
right? NQC is the only "Real" programming language that can be used on the RCX
(with standard firmware).  If we can't use NQC, I won't participate.

I apologize for the "doesn't allow using a real programming language" statement.
It was clearly false and I realized it immediately after I posted.

My only reason for commenting was that this has been used as an argument before.
You've done a nice job of conveying the fact that you're willing to consider that
other languages may be 'real'.

It's nice to see a reasonable discussion on Lugnet...


Others here seem to have suggested that Robolab teaches
kids good programming skills (flowcharting being one of them).  I was rebutting
what I believe is a demonstrably false assertion.  I demonstrated that it was
false.

1) I think flowcharting is a good skill to have as a programmer.
2) I don't think a programming language should 'teach' flowcharting
3) I think someone who can create a flowchart could program in Robolab
better/faster/easier than they could program in NQC.
4) I don't think this is inconsistant with what you said.  (at least 1 & 2)

Robolab is a LASM code generator.  LASM doesn't have higher-level
language constructs such as block statements, while loops, etc...  As a result
Robolab teaches kids to use jumps and labels (since that is how you construct
loops using LASM).  Unfortunately, it doesn't allow you to name your labels in a
meaningful way (as far as I can determine) and it doesn't let you draw a process
flow directional arrow connecting the jump icon with the label icon (which a
real flowcharting tool would let you do).

In Tom's program, from earlier in this thread, he showed a couple things that can be
done in Robolab.

http://news.lugnet.com/robotics/?n=23644

It has (A) a loop that doesn't use a 'jump' icon, instead, it uses a "while" type
structure and (B) it shows how 'comments' can be added to the code, pretty much by
creating a text-box whereever you want.

That doesn't allow you to #define values or labels, but it does provide a way to
describe in depth what the values may represent.

NQC does not force kids to learn bad programming patterns.  Yes, it supports
goto but it does not require its use.  Instead it provides numerous modern
higher-level programming constructs that help new programmers develop good
programming habits and skills.

Do you know which of these constructs are (or are not) provided by Mindscript?


Or, they could use Mindscript, which doesn't allow the use of Goto's.

MindScript is a great language.  I'm glad FLL relented and allowed its use
directly.  Unfortunately very few people worldwide, let alone FLL teams, are
familiar with it.  At least that is the strong impression I am left with.  There
is only one tool that I know of which provides extensive support for programming
in MindScript.  And you can't use that tool in FLL competitions.  RIS is a
MindScript code generator but it doesn't give kids the opportunity to experience
the language directly.

I've not seen anything in the rules that says you can't use BricxCC.  But, ScriptEd
seems to work fine for writing code.

I would do it using a flag, like this psudocode:

| set redflag = 0
| if (RotationAmount < 50 && loopCount >= 4) set redflag = 1
| if AmbientTemp < 32 set redflag = 1
| if Message() == 13 set redflag = 1

In your pseudocode you evaluate all three parts of the logical OR which is not
done in NQC or most other modern programming languages.  To account for that you
would need to additionally check the value of redflag prior to the check of
AmbientTemp or Message().

How would adding a 'redflag check' change the results?

I believe that a logical AND in Robolab would require
two "if" icons back to back.

Right.

Of course the logic error in the original example is that the comparison
(AmbientTemp < 32) would more likely be (AmbientTemp <= 32), but that's the
problem with a contrived example.

I'm sorry but I disagree completely.  Why would you say that the comparison
would be <= 32 rather than < 32?  My example was not contrived.  I can think of
innumerable examples where programming logic is best expressed as a check to
ensure a value is below a certain threshold.

You're right, there are cases where you may want to make such a check.  I'm just
nit-picking.  This seems like a place where it's very easy to create an off-by-one
error.

I suspect it's very common to see if the temperature is cold enough that water will
freeze.  Given the variable name, and the value, I assume that's what you wanted to
do.  In that case, the comparison would be AmbientTemp <=32.

Of course, if you had the same piece of code in Robolab, it would be much harder for
someone to tell what you really wanted to do, unless you put some type of comment
text in the code.

Steve



Message has 1 Reply:
  Re: Robolab as a tool for teaching programming
 
(...) I would agree, but it was you who said "Programming with Robolab is much like creating a flow-chart" and "if you really want to know where spaghetti code comes from, we should talk to those who think flow-charting is a waste of time" here: (...) (20 years ago, 16-Mar-05, to lugnet.robotics, FTX)

Message is in Reply To:
  Robolab as a tool for teaching programming
 
(...) I apologize for the "doesn't allow using a real programming language" statement. It was clearly false and I realized it immediately after I posted. I didn't want to issue an immediate correction because I hoped that people would ignore it as (...) (20 years ago, 16-Mar-05, to lugnet.robotics, FTX)

114 Messages in This Thread:
(Inline display suppressed due to large size. Click Dots below to view.)
Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
13 minutes ago
Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR