Subject:
|
Re: FLL not allowing NQC; Mindscript is allowed
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 15 Mar 2005 17:01:09 GMT
|
Viewed:
|
3562 times
|
| |
| |
In lugnet.robotics, Steve Hassenplug wrote:
|
On Mon, March 14, 2005 6:54 pm, John Hansen said:
|
Unfortunately it isnt completely
clear what sound is played when a value is not attached to the play sound
icon (Im guessing that it is sound zero)
|
Double-clicking the icon in Robolab shows the help. The default value for the
playsound is 6 (fast rising sweep) and 3 is decending sweep.
|
That is unfortunate.
Robolab requires that kids specify the sound by a number which ranges from 1 to
6 (apparently). No sound name constants can be defined and used to visibly
represent the actual sound they want the RCX to play (I guess). The LASM
generated by Robolab contains the zero-based sound number required by the
standard LEGO firmware. MindScript uses nicely named constants. NQC does as
well. Both use the zero-based values. So Robolab is introducing these kids to
the off-by-one programming error, the sprinkle magic numbers liberally
throughout your code bad practice, the name your variables in meaningless and
confusing ways standard, and the spaghetti code where you jump whenever you
wish to labels identified solely by the color of or an itty-bitty number
attached to a down-pointing arrow in a little square box somewhere else on a
screen full of little square boxes method early in life. :-) Those will be
hard lessons to unlearn.
Dont get me wrong, I have no strong feelings against Robolab. Seriously. And
I dont feel angry or even particularly annoyed that FLL doesnt allow using a
real programming language in its competitions. Just discouraged and frustrated,
mostly.
Robolab is fine for what it does, I suppose. Its a clever way to generate LASM
code using lots of little pictures. But dont even try to argue that it teaches
children good programming skills because it doesnt. It doesnt even teach good
flowcharting skills. In a good flowcharting tool the directional flow of logic
is always clearly shown. The shape of the symbols in a good flow chart suggest
meaning (e.g., different shapes are used for decision points vs process steps).
There arent several different symbols to choose from when you want to represent
a decision. There arent symbols that connect ethereally to other symbols based
solely on their color or an attached magic number. There arent symbols whose
sole purpose is to represent a point at which divergent process paths converge.
Because of the way Robolab hard-codes logic into its staggering collection of
icons you cant even write code that says if the value is less than 50 do this
otherwise do that. Instead you have to use if the value is greater than 49 do
this otherwise do that. The top path out of the many different if icons is
always a greater-than comparison and the bottom path is always less-than or
equal-to. I could be wrong, of course, but that is what I have gathered by
examining the sample programs on the official Robolab website.
In Robolab, how would you represent a choice that involved multiple things
logically combined, i.e., if the value of the rotation sensor is less than 50
and Ive already looped 4 times or the ambient temperature is less than 32
degrees or the mailbox contains a message with the value of 13 then play the
double beep sound, wait 2 seconds, then play the sweeping down sound otherwise
wait 4 seconds then play the click sound? My guess is you need a rather complex
combination of icons. Can a Robolab expert provide a picture? Try using the
values 50, 4, 32, and 13 in the program as well. In NQC it is quite simple and
very concise (meaningful names having been defined elsewhere):
if ((RotationAmount < 50 && loopCount >= 4) ||
AmbientTemp < 32 ||
Message() == 13)
{
PlaySound(SOUND_DOUBLE_BEEP);
Wait(200);
PlaySound(SOUND_DOWN);
}
else
{
Wait(400);
PlaySound(SOUND_CLICK);
}
John Hansen
|
|
Message has 1 Reply: | | Re: FLL not allowing NQC; Mindscript is allowed
|
| On Tue, March 15, 2005 12:01 pm, John Hansen said: (...) 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 (...) (20 years ago, 15-Mar-05, to lugnet.robotics)
|
Message is in Reply To:
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
|
|
|
|