[Edu-sig] Executable pseudocode / executable flowcharts
Kirby Urner
urnerk@qwest.net
Mon, 18 Feb 2002 10:26:13 -0800
At 01:00 PM 2/15/2002 -0500, Todd Whittaker wrote:
>Yes, I know that most folks don't use flowcharts, that
>the belief is that they're outdated tools, pseudo-code is
>better, and so on. But, for visual learners, an executable
>flowchart can be a great tool (especially one that can be
>stepped through like a debugger, complete with watch windows).
Although not exactly what you have in mind, the Lego Mindstorms
system is good for children and adults with no previous
programming experience, in allowing the construction of
programs as flowcharts.
http://mindstorms.lego.com/
In the GUI, you drag canned actions (forward, turn left) as
icons and sequence them vertically (called a "stack"). The
canned actions come with tabs which open up wizards allowing
some user-customizable parameters to be set.
You can group sequences and give them names, at which point
they condense into single blocks and list in the "My Blocks"
palette (user-defined functions). You can sandwich blocks
inside of repeat loops (Repeat Forever, Repeat Until etc.),
define variables, insert conditional branches.
Once you've defined a stack, you download it via infrared
light beam to the RCX, a brick-shaped unit with sensor
inputs and power outputs, to which motors are connected.
Although there's no debugger per se, individual blocks
can be "tried" (test download and execute).
In a lot of ways, the experience from a kid's point of view
is similar to controlling a graphical turtle through Logo,
except here the "turtle" is a physical device, and the
whole engineering angle of building robust "robots" is
brought into the learning experience. On screen, a program
is an executable flowchart (savable of course).
A curriculum might start with Mindstorms at the 4th grade
level, then move to a more fully developed concept of
a programming language. The O'Reilly book introduces
NQC (not quite C) as a way to program the RCX, and moves
on to a version of FORTH. Kids would already have the
algorithm-as-flowchart exposure through the introductory
GUI.
http://www.oreilly.com/catalog/lmstorms/desc.html
Agilent has a product (looks like a reincarnation of what
was formerly HP VEE) that allows graphical programming by
hooking boxes together, using conditional branching. The
same idea of user-definable parameters per box is implemented.
Here the boxes may contain signal processing algorithms,
such as a Fourier Transform or something.
For many students, this would be a logical follow-on to
the Mindstorms curriculum, as the robot has touch, light
and other sensors, to which the algorithms respond.
The VEE product is likewise all about processing sensor
data in the lab.
There's a freely downloadable trial version:
http://www.get.agilent.com/gpinstruments/products/vee/download.shtml
Kirby