[Newbies] Newbieology

Ron Teitelbaum Ron at USMedRec.com
Mon Jul 3 01:04:54 UTC 2006


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
Ron at USMedRec.com 

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

> On 02/07/06, Ron Teitelbaum <Ron at usmedrec.com> 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
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

More information about the Beginners mailing list