Newbieology

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbieology

Ron Teitelbaum
Hi John,

Personally I think that each person is trying to get started in their own
way.  For programmers Sax and Dom are newbie activities.  For others it
might not be.  I would be happy to help you with the newbie activities you
are interested in.  I had to look up Tamagotchi to know what it was, but it
looks pretty interesting.  

How far did you get writing your own Etoy Tamagotchi's?  It would seem to me
that Squeak and EToy's is a perfect platform for such an activity.  I could
point you to programming resources, or even Etoy resource, but not really
knowing what you are looking for it's difficult to do.  I don't know what
you have already read or what getting started stuff you have tried.  Have
you already seen www.squeakland.org .  There are some more advanced projects
there.  Also it would help to understand what level you are trying for.  Are
you looking to do programming, or sticking with Etoy scripts?

My feelings about the list so far is that there is much more bandwidth
available then is being used.  It doesn't seem to me that questions from a
beginner programmer should be booted from the newbie list.  What I would
like to see are more simple questions so that everyone can get what they are
looking for.  So if you have a simple question like how can I get my
Tamagotchi to act hungry when it's not fed, that would be cool.   (Or even
how can I turn my Tamagotchi green when it's fed too much!)

Happy coding!

Ron Teitelbaum
President / Principal Software Engineer
US Medical Record Specialists
[hidden email]

> From: John Kershaw
> Sent: Saturday, July 01, 2006 4:53 AM
> Hi all,
>
> As a newcomer to Squeak/eToys I've been searching for info on helping
> my 9-11 year olds write 'Tamagotchi' style simulations, since I've
> been unable to find a straight-forward manual. There's lots of
> 'Getting started' materials, but nothing on getting to the next level.
>
> I signed up this 'Newbies' list but, to be honest, does parsing XMLs
> using the SAX or DOM models really fit into that category?
>
> Can someone point me to resources for real (3-4 weeks experience) newbies?
>
> John.
>
> On 30/06/06, Ron Teitelbaum <[hidden email]> wrote:
> > Cédrick,
> >
> > The basic difference between SAX and DOM is that SAX is like a stream
> that
> > as it is read provides information to you to build the objects you need,
> > while DOM is more like a tree or object model that can be traversed like
> > regular objects.  They both have their advantages.  The big advantage
> for
> > SAX is in parsing large files.  Since it acts like a stream you can
> build
> > objects on the fly and not have to parse the entire file before getting
> a
> > single object.  DOM is much easier to use since it builds a tree for you
> > that can be traversed.
> >
> > For DOM to create an object you need to build your own object form the
> data
> > that each node of the tree provides to you.  The tree is a collection of
> > collections with each item an XMLElement that can respond with queries
> like
> > elementAt: #... you can iterate over the collection creating objects as
> you
> > go.
> >
> > For Sax you wait for a tag that indicates starting a new object then you
> > create the object and for each element that comes after you add data to
> your
> > object until you hit the end object tag.
> >
> > If you are going to XML then you should learn both (which it seems you
> are
> > doing).  Good luck with it and feel free to let us know how you are
> doing
> > with it.  If you need more help let us know.
> >
> > Ron Teitelbaum
> > President / Principal Software Engineer
> > US Medical Record Specialists
> > [hidden email]
> >
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbieology

John Kershaw-2
On 02/07/06, Ron Teitelbaum <[hidden email]> wrote:
> How far did you get writing your own Etoy Tamagotchi's?

For my own 'stay ahead of the kids' learning I modelled my own fish
tank, based on my experiences of keeping fish for all of two months.
What I've found (in real life) is that over-feeding has been the cause
of most of my fishly 'deletions', so I tried to make 'water quality'
the most important factor. In my 'simulation' uneaten food pollutes
the water, and over-fed fish (heavier than 28g) pollute the water too.
The fish's health is directly affected by the water quality.

So... I was about to upload a copy of my file so you could see where
I'm at... and found I didn't know where Squeak was storing its files.
After some searching I found my squarium here:
~/Library/Preferences/Squeak/Internet/My Squeak/Squeaklets/aquarium16.001.pr

Preferences should really only hold preferences - I don't know if
anyone here can pass this on to the right people, but might I suggest
that a better place for Squeak to store its user files would be
something like:
~/Documents/My Squeak/aquarium16.001.pr

Anyhow, I've uploaded my aquarium file to the school website:
http://bradfordchristianschool.com/Squeakland - see 'Mr Kershaw's
aquarium' near the bottom

I also found some useful documentation links there - how ironic is
that, since I created that page myself several weeks ago?

Also I can't seem to get the mime-type correct in my .htaccess file.
I've tried numerous variations on this theme, but to no avail:

AddType application/x-squeak-object .pr

so for now you'll have to download my fish and run them locally.

Regards how far we've got with the kids' Tamagotchi's/pet shop
animals, lesson one (last Friday) consisted of:

1. Draw your rabbit / guinea pig / snake / lizard

2. Create a 'thirst' variable. Drag its tile to below your pet. Set it to 0

3. Drag out a script, call it 'live'

4. Drag a 'thirst' assignment tile, set it to 'thirst, increase by,
1'. Start the ticker. Reduce to 1 execution per second

5. Add a test to the script: thirst > 900. If yes, rotate pet by 90

I have this idea of getting a single pet 'maintainable' (if thirsty
drink water if available, click water to replenish when empty) then
creating siblings with slight random variations in drinking patterns,
and having to keep a whole pet shop fed & watered. Not sure how I'm
going to get there, but that's half the fun of teaching, right - to
stay ahead of the kids? ;)

Are there any pre-built conditional loops I could use on my scripts?
The if-then-else structure is fine, but a bit limiting.

Any/all help appreciated,

John.
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Newbieology

cedreek
In reply to this post by Ron Teitelbaum
Uhmm. To me, there are several kinds of newbie and my newbiness is more on computer science in general as I start to know squeak a bit. That's why I find more approriate to post general questions (like XML processing) here instead of the dev list where subjects are very sharp and where people will probably find trivial all sax and dom related problem and where I might have had a response like use a SAX parser and instead here I have more comprehensible response that can be used by others too (Also, I'd like to thanks you Ron for your time on this list on a lot of points ;) ).

I think here the difference mainly comes from the fact I use squeak as a dev envrionment without using etoys at all as all projects (.pr) stuff... and one other list may be too much ;)

see you

Cédrick

Hi John,

Personally I think that each person is trying to get started in their own
way.  For programmers Sax and Dom are newbie activities.  For others it
might not be.  I would be happy to help you with the newbie activities you
are interested in.  I had to look up Tamagotchi to know what it was, but it
looks pretty interesting.


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: Newbieology

Ron Teitelbaum
In reply to this post by John Kershaw-2
John,

Wow, it sounds like what you are doing is very creative and a whole lot of
fun.  And it sounds like you are having a lot of success modeling the world
the way you see it.  This to me is the biggest step in learning object
oriented programming.  You are still writing scripts, but there is a whole
world of objects behind what you are doing that if you keep trying to find
out more, I can guarantee you will be very pleased with.

There are a number of programmers that I've worked with that have really had
a hard time understanding objects.  They think in terms of processes and
functions when what they really need to do is think of objects.  Things like
fish tank, water quality, food, air, fish waste ...  With object oriented
programming you can model each of these real life things as separate
components that can really interact with each other.  I'm impressed with
what you understand intuitively.  You are very lucky to have found a
platform that can support what it is you are trying to accomplish, you will
find that your ideas will not exceed the platforms capability.

To your question:

> Are there any pre-built conditional loops I could use on my scripts?
> The if-then-else structure is fine, but a bit limiting.

It's important that you understand that you are working with tile
programming.  The structures available to you as tiles are more limited then
what you can do with a browser.  There is a menu button on your script which
will show you the code that the tile is generating, and learning how to
navigate the regular squeak environment and figure out what the messages are
doing would be your first step.  I'm not sure you are interested in going
that route so if you are, please let me know and I will tell you more.

If you are comfortable with writing code in the script instead of using
tiles then there are a number of more advanced control structures available,
and I can help you with those if you like, please let me know.  Also maybe
someone that is more advanced in tile programming will help point you to
other tile structures that I'm not aware of.

Keep at it!  Happy coding!

Ron Teitelbaum
President / Principal Software Engineer
US Medical Record Specialists
[hidden email]




> From: John Kershaw
> Sent: Sunday, July 02, 2006 4:46 AM


> On 02/07/06, Ron Teitelbaum <[hidden email]> wrote:
> > How far did you get writing your own Etoy Tamagotchi's?
>
> For my own 'stay ahead of the kids' learning I modelled my own fish
> tank, based on my experiences of keeping fish for all of two months.
> What I've found (in real life) is that over-feeding has been the cause
> of most of my fishly 'deletions', so I tried to make 'water quality'
> the most important factor. In my 'simulation' uneaten food pollutes
> the water, and over-fed fish (heavier than 28g) pollute the water too.
> The fish's health is directly affected by the water quality.
>
> So... I was about to upload a copy of my file so you could see where
> I'm at... and found I didn't know where Squeak was storing its files.
> After some searching I found my squarium here:
> ~/Library/Preferences/Squeak/Internet/My
> Squeak/Squeaklets/aquarium16.001.pr
>
> Preferences should really only hold preferences - I don't know if
> anyone here can pass this on to the right people, but might I suggest
> that a better place for Squeak to store its user files would be
> something like:
> ~/Documents/My Squeak/aquarium16.001.pr
>
> Anyhow, I've uploaded my aquarium file to the school website:
> http://bradfordchristianschool.com/Squeakland - see 'Mr Kershaw's
> aquarium' near the bottom
>
> I also found some useful documentation links there - how ironic is
> that, since I created that page myself several weeks ago?
>
> Also I can't seem to get the mime-type correct in my .htaccess file.
> I've tried numerous variations on this theme, but to no avail:
>
> AddType application/x-squeak-object .pr
>
> so for now you'll have to download my fish and run them locally.
>
> Regards how far we've got with the kids' Tamagotchi's/pet shop
> animals, lesson one (last Friday) consisted of:
>
> 1. Draw your rabbit / guinea pig / snake / lizard
>
> 2. Create a 'thirst' variable. Drag its tile to below your pet. Set it to
> 0
>
> 3. Drag out a script, call it 'live'
>
> 4. Drag a 'thirst' assignment tile, set it to 'thirst, increase by,
> 1'. Start the ticker. Reduce to 1 execution per second
>
> 5. Add a test to the script: thirst > 900. If yes, rotate pet by 90
>
> I have this idea of getting a single pet 'maintainable' (if thirsty
> drink water if available, click water to replenish when empty) then
> creating siblings with slight random variations in drinking patterns,
> and having to keep a whole pet shop fed & watered. Not sure how I'm
> going to get there, but that's half the fun of teaching, right - to
> stay ahead of the kids? ;)
>
> Are there any pre-built conditional loops I could use on my scripts?
> The if-then-else structure is fine, but a bit limiting.
>
> Any/all help appreciated,
>
> John.
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners