[MWForum]Madlibs......
Harvey Bornfield
mwforum@lists.mathcats.com
Tue, 05 Aug 2003 20:53:42 -0700
--=====================_40522277==.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Marsha,
This is a wonderful project, especially as conceived with user input from
the children. I want to creatively visualize some of the challenges in
grounding such a project in actual code. I'll postpone sharing the literal
programming code for a short while, but attempt to touch down on the
sequence of chores and adventures in such a way as puts spin and leaven on
the enterprise, and yet reveals some of the logo commands necessary to put
the project together.
To do Madlibs justice, on the level of allowing children to feed the
program with original contributions, one first envisions an archive of
stories, named in 'hybrid_titled" files, files that could be stored and
retrieved utilizing "loadtext <author_storytitle> . Using the files
command, an inventory of current offerings in a single directory, can first
present to the user choices. You could author a 'splash' page, in which
these files could be turned into the titles of buttons, which when clicked
would summon the file onscreen.
You'll name a textbox to receive, that is, to display whatever textfile is
chosen, perhaps something named "Storyline"; you'll be feeding the
user-selected <author_title> into Storyline. Which may be showing or
hidden. The story has to be typed in such a way that it's possible to
distinguish which words to retrieve, that is, words "earmarked" for user
input. A decision might be made to embed those words formatted in a say to
distinguish them from the inert components of the tale. for example, I have
fooled around with this:
In a <SEASON> of the year a <PROFESSION> set off with <NAME>, his trusty
sidekick <PET>.
The words in blue are, as Tolkein might say, "destined to become, each and
every one, the sprawling title of a noble textbox" to accept user-input.
One wants to automate this with loops, which creates epic challenges to new
programmers. So a description of how this comes about in English is
valuable to confronting and comprehending the mechanics at a later time.
So there follows developing routines to scan the "Storyline" textbox, and
'tweeze out' those <words>. One of the very interesting and sophisticated
features of Microworlds, is that analyzing the "lines" in a textbox
requires knowledge of applying commands and reporters like TEXTITEM and
TEXTCOUNT, commands peculiar to dealing only with the contents of
a textbox. Each textitem, referred to in MW code as as TEXTITEM 1
"storyline, TEXTITEM 2 "storyline, etc, is a collection of one or more
sentences which seem glued together and which end when a carraige return
(the Enter Key) is encountered. Carraige returns separate these typically
multi-sentence lines which keep their identity as part of a single textitem
even when a textbox window is resized. Magically convenient from a graphics
standpoint.
But we have to find a way to take our mental scalpel and slicing textitems
apart, be able to look at individual words embedded within a textitem; here
is where you encounter the PARSE command, which, (when you're dealing with
texts - it has other uses also), chops a textitem into a list of component
words. This is an essential tool. So first you must convert textitems into
lists, (for now, consider them collections of words), lists which are
manipulated through the use of commands like COUNT and ITEM 1, ITEM 2,
FIRST, LAST, etc.
So, this is gear-shifting, a bit tedious, but essential, and it is the
PARSE command which bridges us across the gulf of how textfiles are
organized and analyzed, into lists. Now you get to continue the exciting
adventure.
But first!
INTERMISSION: Peanuts, Popcorn, Ice-cream, Sprint no more, kneel and
Exhale. Think velour, rotating snowflakes, rainbow zebras, zephyrs,
awestruck, motionless hummingbirds, the original biological hovercrafts,
and seagulls, balsa-less gliders that silently float at two miles an hour
while meditating.
So? Where were we?
You determine how many pieces of information are in that parsed textitem
utilizing the COUNT reporter, and with bravura, you sweep (looping commands
like: REPEAT, DOTIMES, DOLIST), soaring elegantly through every word in
each list that was once a textitem of a file, asking each word, as it were:
"Are you one of those guys like <SEASON>, <PROFESSION> and <PET> ?,
delimited by "< and >" If so, you get to have your own textbox, named
exactly like the word, and of perfect size for entering the user input.
Now, to make life more challenging, If you're asking the madlib player to
enter parts of speech, it is almost entirely impossible that the input
textbox titles will not require duplication. This MW won't let you do at
least on the same page, so then you have to learn to "Weld" numbers like
"01, "02, etc off the end of the part of speech, ending up with input text
boxes which look like VERB_01, VERB_02. This is a matter that would take us
a little far afield for today. Not having a life, this is what people like
me love to do. :-)
Next task: Once you've identified the names for the collection of
user-input textboxes that you're going to let your programming skill spawn
for you using the "NEWTEXT" command inside a loop, you need a game plan to
spray the boxes out on the screen. So you creatively visualize how many
textboxes would be a maximum, and call up your CRT Visual Handyman or Feng
Shui consultant to landscape your monitor in symmetrical, uncluttered ways.
Do you want the original story, with the <CREATIVEWORDS> replaced by
underscores "______". Do you even want it to be visible while the end-user
is busy spicing it up?
Do you need to have all the text windows present on screen, or do you want
to present them in randomized debuts, one at a time?
When the story is done, do you want to print it?
Finally, the Madlibs has all the components for a fill in the blanks or a
matching test. It would be possible to add programming code to grade
performance, and store the grades in a teacher-accessible file. And for a
variation, turtles might replace words, as visual clues. Multiple
Intelligence is an inspiration.
I will leave these ideas with you all. I have already written the code
which reads up the Storyline textbox (but not yet loaded it from an
external file), and which can generate a textbox, appropriately named for
every "< delimited word. But it does not yet work whan <two words> are
presented, and it steals commas off the end of words. When these chores are
solved, I'll share the project (in MW 2.05)
These are my own approaches to Madlib. Anyone who wants to take the vision
in another direction, should describe the course of the game, and what will
present itself on the screen. Then we can have ammo for collaboration, and
may succeed at sharing and expanding, or downsizing an epic idea and so
making doable, this, as a prelude for figuring out how we might be able to
delegate the creation of and sharing of code in the future. But in the last
analysis, the perfection of the brainstorming, and the focusing of it into
the action sequences is everything. Next to that, writing code is truly
almost trivial.
Best regards,
Harvey Bornfield
www.mythologics.org
At 07:32 AM 8/5/2003, you wrote:
>Wendy, This question made me stop and think about how
>students think about doing this. And I guess when I think about how they
>work with MadLibs I see them interacting in two different ways. When they
>are completing one, they use words one at a time. That would seem like
>text boxes tied to the part of speech....one for nouns, one for verbs, and
>so on.
>
>But your question seemed to ask what if they wanted to enter their own
>story. Well, that seemed to be a different question. In that case I
>don't think they would look at it in such small parts. I think they would
>enter a whole story at once. So, to me, that would be better handled by
>asking them a question to which they could enter their story.
>
>I'm anxious to work with whomever is interested in this. I don't know
>that I can contribute much because I've only been introduced to MW about a
>month ago. But I'm more than willing to try and put forward my best
>effort. And I really appreciate your interest and hope that others will
>also want to collaborate.
>
>marsha
>_______________________________________________
>MWForum mailing list
>MWForum@lists.mathcats.com
>http://lists.mathcats.com/mailman/listinfo/mwforum
>attachments archived at:
>http://www.mathcats.com/mwforum/attachments.html
"Music is the one incorporeal entrance into the higher world of knowledge
which comprehends mankind, but mankind cannot comprehend."
Ludwig van Beethoven
--=====================_40522277==.ALT
Content-Type: text/html; charset="us-ascii"
<html>
<body>
Marsha,<br>
This is a wonderful project, especially as conceived with user input from
the children. I want to creatively visualize some of the challenges in
grounding such a project in actual code. I'll postpone sharing the
literal programming code for a short while, but attempt to touch down on
the sequence of chores and adventures in such a way as puts spin and
leaven on the enterprise, and yet reveals some of the logo commands
necessary to put the project together.<br><br>
To do Madlibs justice, on the level of allowing children to feed the
program with original contributions, one first envisions an archive of
stories, named in 'hybrid_titled" files, files that could be stored
and retrieved utilizing "loadtext <author_storytitle> .
Using the files command, an inventory of current offerings in a single
directory, can first present to the user choices. You could author a
'splash' page, in which these files could be turned into the titles of
buttons, which when clicked would summon the file onscreen. <br><br>
You'll name a textbox to receive, that is, to display whatever textfile
is chosen, perhaps something named "Storyline"; you'll be
feeding the user-selected <author_title> into Storyline. Which may
be showing or hidden. The story has to be typed in such a way that it's
possible to distinguish which words to retrieve, that is, words
"earmarked" for user input. A decision might be made to embed
those words formatted in a say to distinguish them from the inert
components of the tale. for example, I have fooled around with
this:<br><br>
In a <font color="#0000FF"><SEASON></font> of the year a
<font color="#0000FF"><PROFESSION></font> set off with
<font color="#0000FF"><NAME></font>, his trusty sidekick
<font color="#0000FF"><PET></font>.<br><br>
The words in blue are, as Tolkein might say, "destined to become,
each and every one, the sprawling title of a noble textbox" to
accept user-input. One wants to automate this with loops, which creates
epic challenges to new programmers. So a description of how this comes
about in English is valuable to confronting and comprehending the
mechanics at a later time.<br><br>
So there follows developing routines to scan the "Storyline"
textbox, and 'tweeze out' those
<font color="#0000FF"><words></font>. One of the very interesting
and sophisticated features of Microworlds, is that analyzing the
"lines" in a textbox requires knowledge of applying commands
and reporters like <font color="#0000FF">TEXTITEM</font> and
<font color="#0000FF">TEXTCOUNT</font>, commands peculiar to dealing only
with the contents of a textbox. Each textitem, referred to in MW
code as as <font color="#0000FF">TEXTITEM</font> 1 "storyline,
<font color="#0000FF">TEXTITEM </font>2 "storyline, etc, is a
collection of one or more sentences which seem glued together and which
end when a carraige return (the Enter Key) is encountered. Carraige
returns separate these typically multi-sentence lines which keep their
identity as part of a single textitem even when a textbox window is
resized. Magically convenient from a graphics standpoint. <br><br>
But we have to find a way to take our mental scalpel and slicing
textitems apart, be able to look at individual words embedded within a
textitem; here is where you encounter the
<font color="#0000FF">PARSE</font> command, which, (when you're dealing
with texts - it has other uses also), chops a textitem into a list of
component words. This is an essential tool. So first you must convert
textitems into lists, (for now, consider them collections of words),
lists which are manipulated through the use of commands like
<font color="#0000FF">COUNT</font> and <font color="#0000FF">ITEM</font>
1, <font color="#0000FF">ITEM</font> 2, <font color="#0000FF">FIRST</font>, <font color="#0000FF">LAST</font>, etc. <br><br>
So, this is gear-shifting, a bit tedious, but essential, and it is the <font color="#0000FF">PARSE</font> command which bridges us across the gulf of how textfiles are organized and analyzed, into lists. Now you get to continue the exciting adventure.<br><br>
<font color="#FF00FF">But first!<br>
INTERMISSION: Peanuts, Popcorn, Ice-cream, Sprint no more, kneel and Exhale. Think velour, rotating snowflakes, </font><font color="#00FF00">r</font><font color="#FF0000">a</font><font color="#808000">i</font><font color="#808080">n</font><font color="#0000FF">b</font><font color="#800000">o</font><font color="#00FFFF">w</font><font color="#FF00FF"> zebras, zephyrs, awestruck, motionless hummingbirds, the original biological hovercrafts, and seagulls, balsa-less gliders that silently float at two miles an hour while meditating.<br><br>
<br>
</font>So? Where were we?<br>
You determine how many pieces of information are in that parsed textitem utilizing the <font color="#0000FF">COUNT</font> reporter, and with bravura, you sweep (looping commands like: <font color="#0000FF">REPEAT, DOTIMES, DOLIST</font>), soaring elegantly through every word in each list that was once a textitem of a file, asking each word, as it were: "Are you one of those guys like <SEASON>, <PROFESSION> and <PET> ?, delimited by "< and >" If so, you get to have your own textbox, named exactly like the word, and of perfect size for entering the user input.<br><br>
Now, to make life more challenging, If you're asking the madlib player to enter parts of speech, it is almost entirely impossible that the input textbox titles will not require duplication. This MW won't let you do at least on the same page, so then you have to learn to "Weld" numbers like "01, "02, etc off the end of the part of speech, ending up with input text boxes which look like VERB_01, VERB_02. This is a matter that would take us a little far afield for today. Not having a life, this is what people like me love to do. :-)<br><br>
Next task: Once you've identified the names for the collection of user-input textboxes that you're going to let your programming skill spawn for you using the "NEWTEXT" command inside a loop, you need a game plan to spray the boxes out on the screen. So you creatively visualize how many textboxes would be a maximum, and call up your CRT Visual Handyman or Feng Shui consultant to landscape your monitor in symmetrical, uncluttered ways. <br><br>
Do you want the original story, with the <CREATIVEWORDS> replaced by underscores "______". Do you even want it to be <font color="#0000FF">visible </font>while the end-user is busy spicing it up? <br><br>
Do you need to have all the text windows present on screen, or do you want to present them in randomized debuts, one at a time?<br><br>
When the story is done, do you want to print it?<br><br>
Finally, the Madlibs has all the components for a fill in the blanks or a matching test. It would be possible to add programming code to grade performance, and store the grades in a teacher-accessible file. And for a variation, turtles might replace words, as visual clues. Multiple Intelligence is an inspiration.<br><br>
I will leave these ideas with you all. I have already written the code which reads up the Storyline textbox (but not yet loaded it from an external file), and which can generate a textbox, appropriately named for every "< delimited word. But it does not yet work whan <two words> are presented, and it steals commas off the end of words. When these chores are solved, I'll share the project (in MW 2.05)<br><br>
These are my own approaches to Madlib. Anyone who wants to take the vision in another direction, should describe the course of the game, and what will present itself on the screen. Then we can have ammo for collaboration, and may succeed at sharing and expanding, or downsizing an epic idea and so making doable, this, as a prelude for figuring out how we might be able to delegate the creation of and sharing of code in the future. But in the last analysis, the perfection of the brainstorming, and the focusing of it into the action sequences is everything. Next to that, writing code is truly almost trivial. <br><br>
Best regards,<br>
Harvey Bornfield<br>
<a href="http://www.mythologics.org/" eudora="autourl">www.mythologics.org</a><br><br>
At 07:32 AM 8/5/2003, you wrote:<br>
<blockquote type=cite class=cite cite>Wendy, This question made me stop and think about how students think about doing this. And I guess when I think about how they work with MadLibs I see them interacting in two different ways. When they are completing one, they use words one at a time. That would seem like text boxes tied to the part of speech....one for nouns, one for verbs, and so on.<br><br>
But your question seemed to ask what if they wanted to enter their own story. Well, that seemed to be a different question. In that case I don't think they would look at it in such small parts. I think they would enter a whole story at once. So, to me, that would be better handled by asking them a question to which they could enter their story. <br><br>
I'm anxious to work with whomever is interested in this. I don't know that I can contribute much because I've only been introduced to MW about a month ago. But I'm more than willing to try and put forward my best effort. And I really appreciate your interest and hope that others will also want to collaborate. <br><br>
marsha<br>
_______________________________________________<br>
MWForum mailing list<br>
MWForum@lists.mathcats.com<br>
<a href="http://lists.mathcats.com/mailman/listinfo/mwforum" eudora="autourl">http://lists.mathcats.com/mailman/listinfo/mwforum</a><br>
attachments archived at:<br>
<a href="http://www.mathcats.com/mwforum/attachments.html" eudora="autourl">http://www.mathcats.com/mwforum/attachments.html</a> </blockquote>
<x-sigsep><p></x-sigsep>
<font face="Bell MT">"Music is the one incorporeal entrance into the higher world of knowledge which comprehends mankind, but mankind cannot comprehend." <br>
Ludwig van Beethoven <br><br>
<br>
</font></body>
</html>
--=====================_40522277==.ALT--