Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Learning how to program (for youngsters of any age)

by pmas (Hermit)
on Aug 03, 2001 at 08:39 UTC ( #101881=perlmeditation: print w/ replies, xml ) Need Help??

This meditation is rather off-topic. It is not related to perl at all. It is about looking for a right tool for a job, where job is very special and dear to me: how to introduce programming to my son, 10, not boringly, but funny and interesting way.

I was looking for different options for couple of weeks, and here is what I found:

First, IMO perl is not appropriate as first programming language for 10 year old. So even if I like perl for my job duties, it's out as teaching tool. Somebody mentioned he is teaching his young brother C, so brother will appreciate perl later. I am not so sure about that - brother might decide that programming is not for him and never "upgrade" to perl.
What other language are for beginners? BASIC was intended to beginners, but I believe we can do better than that. Pascal? Maybe for a college student, but does not feel appropriate for 10 years old. I was hoping for something fun, with graphic interface, graphic output. Where language is desined to solve tasks tasks relevant to 10 year old boy. Something graphic, some games.

For a while I was looking to LOGO. Defining new procedures is easy and makes sense, it has excellent turtle graphics, so programming is telling turtle how to move (and make line while moving). You can immediatelly see graphic trace.
There is even LOGO for PalmPilot available (as I posted at (pmas) Re2 : Junior Perl), but my son was not excited. Palm is small, and he wanted more to play games and write his own games, not just learn programming per se. And also LOGO newsgroup is alive, but not exactly exciting. Having LOGO on Palm is very convenient, but screen is small, writing code is a mess (for 10 years old), he was confused. LOGO is OK, but not a good fit for him.

I was even looking into languages to write text adventure games, but they were too complex (to allow creating interesting games), and programming was rather boring: plain coding - just type text in editor, stare into screen, edit, compile, run, try to make sense of statements, exactly like I am doing in my job.. ;-) So again, I was hoping to find something more visual, and more fun to interact with.

Then - bingo! I found GameMaker. It has fully graphic environment for programming games. You can create objects (not OO objects - just pictures with behavior), add your own images (even moving) for objects, active objects can have different events. "To program" means drag-and-dropping statements "buttons" into event "areas", then setting properties for your statements vie right-click. Programming is event-based, and C-like language is available to implement any complex concepts. But you will be surprised how interesting and complex games can be done by using just basic statements!
Package comes with examples of GameMaker games, from simple bouncing balls to pacman, asteroids, sokoban, and simple arcade game.

So now my son spends his computer time not killing monsters in dungeons, but designing (and lot of testing = actual playing) his own games. He tried to create pacman-like game, and he went through full lifecycle of code development: research how implement which feature, seting priorities, coding, and then debugging code (and cancelling the project). We were able together to look into example games to find out how some tricks are implemented, researching, explaining, tweaking something to see how it works and how it may change the game.

We are really programming. Heck, I was so excited myself when I downloaded GameMaker, I spent 2 hours tweaking one simple example game and playing it, and I do not recall last time I had this kind of fun myself! Yes, perl is satysfing, but not this much fun.

GameMaker has also own designers community (although I had some problems to subscribe - but it kind of works now), I downloaded version 3 month ago, version 4 was just released - so it is alive and kicking.

So if you have somebody around who might be interested in learning how to program by programming his/her own games, and spare PC (GameMaker is Windows only), try GameMaker. You'll be glad you did.

Your reward: After couple hours of hiking, when your son is tired a lot, the only thing making him forget tirednes and walk some more is: You discuss how to implement some new game, and you can tell that he is designing it in his head, and his design makes sense.
Another reward: you are not the only person home your wife asks to stop programmning and go to sleep. :^)

I wanted to post this before weekend, so if you are interested, you can research it over the weekend. I do hope you will have at least as much fun as I had.

Update I forgot to mention that GameMaker is free!

I am leaving to vacation for a week, so I will not be able to answer your comments. Just have fun!

pmas
To make errors is human. But to make million errors per second, you need a computer.

Comment on Learning how to program (for youngsters of any age)
Re: Learning how to program (for youngsters of any age)
by IndyZ (Friar) on Aug 03, 2001 at 10:08 UTC
    This reminds me of a Maxis product called Klik 'n Play. First of all, I hate purposely mispelling words to draw attention (Limp Bizkit?). Second, I really liked KnP. It got me back into "creating" on a computer, after I got tired of programming BASIC. The concept was great: You had a library of sprites and sound effects, or you could import your own. You could setup different "physics" models, like platform, directional (like pacman, a topdown view), and others. You could set counters, loops, etc. You would use a point and click event based system to do basically everything.

    For example:

    'When player 1 presses "fire", shoot object "bullet" at angle="current player 1 angle'.
    Then you would have something like:
    'When player 2 contacts "bullet" reduce "player 2 life counter" "1"'
    It was a fun product, that taught me the basics of event based programming very quickly. That experience came in handy when I went to learn Visual BASIC (*ducks*, repents).

    That, in turn, carried over to Tcl/Tk, Perl/Tk, and most other GUI tools that I have used. The only disadvantage was that complete games took a long time to create. Their example app, which was Donkey Kong but with Romeo trying to rescue Juliet, would have taken me a few weeks of free time to do, even without having to create the graphics.

    I should point out that the language that got me into programming was, in fact, LOGO. It was sweet. PEN UP. PEN DOWN. RIGHT 90. I was so impressed with myself when I figured out that I could get a circle by going forwards a little, then making a tiny turn, and repeating. I am still convinced that one of the best ways to learn looping is to draw polygons or stars in LOGO.

    On a sadder, personal note, I threw Klik 'n Play in the garbage the other day while I was cleaning out my room in preparation for the move to college.

      i have klik 'n play sitting in a box in my closet. it, along with qbasic and things like PILOT and TURTLE are what got me interested in programming. oh man, now i'm being all nostalgic.
Re: Learning how to program (for youngsters of any age)
by (:smiley:) (Initiate) on Aug 03, 2001 at 12:41 UTC
    Thanks for the info, This should be fun to play with. When I first played with QBasic, I especially liked doing graphics type stuff. I usually made circles leave a trail across the screen in many different colors, bounce off the walls and go a different direction. I still don't know how to do stuff like that in perl, but that doesn't mater anyway, this sounds more fun to me.

    (:smiley:)

      For graphics-based programming you could try looking at Squeak. I've just started playing with it and the documentation isn't as good as Perl but there are some interesting tutorials.

      As it's a Smalltalk variant it's also extremely object-oriented.

      Kevin O'Rourke

        I also looked at Squeak, but what decided for GameMaker was: you do not need to write a line of code to program. You just drag images of statements, drop them into action "slots", and maybe right-click them to change some properties.

        In example, simple game "Catch The Dog" is implemented by just 1 object (image of a dog), and 3 statements: in slot of "on MouseClick" action:
        SCORE (+1, relative),
        DELETE (self)
        CREATE OBJECT AT RANDOM PLACE (dog).
        All these statements are basic for GameMaker buttons with cute icons. SCORE "knows" to display current score in title bar.

        My first "program" was to add:
        to action slot for "when leaving playing area", DELETE (self), and SCORE (-1), and
        to action slot "when created": MOVE IN RANDOM DIRECTION.
        add some "walls" (images), with attribute "solid" - so dog will bounce after collision - it knows how to bounce from solid object.

        That's it - I created new fully playable simple game. Dog lurked out at random place, was running away, bounced from wall, and if I did not click on it fast enough, I lost a point.

        Sorry for off-topic node, but I just want to show how is possible to "program" without writing any code, if you have high-level statements in a language carefully targeted to very specific area. We may forget it is possible, because we are using perl - "swiss army chainsaw" universal language all the time.

        pmas
        To make errors is human. But to make million errors per second, you need a computer.

Re: Learning how to program (for youngsters of any age)
by Mission (Hermit) on Aug 03, 2001 at 16:53 UTC

    pmas, I like the concept. My son is only 4, so I don't think I'll try programming yet, but it is on the horizon. The first thing I thought of for a kid about that age (10) was Lego Mindstorms. It's programmable Lego's. It's a bit like robotics, but everything is run through a program.

    I know the Lego sets are a bit expensive, but if you (or anyone else) would like to demo the language, there is a 3D simmulator off of the Mindstorms site. The simmulator is built with Director 8, so if you don't have the most recent Director plugin, you would have to down load it. Just follow the link to the 3D:simmulator. Their simmulator uses the exact language format that the actual Mindstorms use, so what you learn there is the 'real' thing.

    If you complete all of the 'Missions' then they'll even make an online Mindstorms Certificate for you to print out. It's a way that you can sample the programming language and see if it's right for a kid (or big kids) before spending lots of money on Legos.

    - Mission
    "Heck I don't know how to do it either, but do you think that's going to stop me?!!"
      Thank you for the link. Sure my son is a big fan of the Lego, but Mindstorm is quite expensive. Did I mentioned that GameMaker is free? And also, my son specifically asked to program games - and I like he plays games he developed/tweaked with instead of violent thrash from cracker sites...
      I am (and my son is) big fan of Civilisation, but playing a game takes too long...

      pmas
      To make errors is human. But to make million errors per second, you need a computer.

Re: Learning how to program (for youngsters of any age)
by c-era (Curate) on Aug 03, 2001 at 17:18 UTC
    I've been teaching my 11 year old nephiew. I started out with perl, but it wasn't long until he wanted to make something "cool". I desided to use blender. It's a 3-d modeling and rendering program that also has a game engine. I just made some 3-d models for him to use in his games. The language used for many things in blender is . . . on second thought I won't speak that unholy word ;) He is now also interested in learning how to create 3-d models. All in all it has worked out well.
Re: Learning how to program (for youngsters of any age)
by rchiav (Deacon) on Aug 03, 2001 at 17:46 UTC
    Actually, I think you were referring to my comment about teaching my brother(15) C.

    I think your observation about someone finding it not fun and then never choosing to "upgrade" is appropriate for some. What I think it important is evaluating the person and determining what language would be most appropriate for them. In your son's case, GameMaker might very well be the most appropriate thing for him. You're probably the best judge of that. I don't think that anyone else could profess to know your son better than you. But that doesn't mean that something like GameMaker is appropriate for everyone learning how to program.

    For instance, in my brothers case, I think he'd actually get bored with something like GameMaker. My first thought as far as a programming language was something like VB, because it's graphical, quicker to develop GUI's and the editor reduces the need to look up syntactical things. But the downside was that he wouldn't know what was really going on. If he was younger, I might have introduced him to VB, but not where he is now.

    There were quite a few things I took into consideration (and I think that others should take into consideration when trying to introduce someone to programming). The first was (and I hate to use the term), IQ. That's not the exact term I'm looking for, but it's as close as I can come at the moment. I might just be biased, but I consider him to be extremely bright. At 15, he has logic and deductive reasoning skills beyond people I've worked with. Straight A student who's taking the AP math and science courses for the grade above him. Math and general logical thinking has always come naturally to him.

    Next was his general disposition towards problem solving. He loves solving problems. You could even say he thrives on it. So there isn't a need to introduce him to problem solving, just to show him how people go about that when designing a program.

    Next was taking a look at where he might go with programming. I knew that he was planning on taking a C++ class next year (this fall now) in school.

    With all of that, I felt that C would be the place to start. So far so good. He has a pretty good understanding of pointers and malloc and that's what I was hoping for. Now, when he's using any other language, he'll know that there's much more that goes on behind the scenes. I'm a firm beliver that you should, at some point, teach a person the building blocks. When I've taught anyone about general PC functionality, I always start with DOS. Down to the level of what really happens when you turn the computer on. I think things like that go a long way to demystifiying the process. But again, that might not be for everyone.

    So I guess my point is that there's probably no one language that is appropriate to teach everyone. As with anything, the material should be adapted to the audience by figureing out what is going to give you the best distance/mileage ratio.

    Rich

      You are glad you have brother this bright - and you are right.
      I agree with you completely. If he is already a programmer, and his interest is to know exactly how computer works in detail level, C is excellent language - is is basically assembly language on steroids. I remember how I felt after couple of courses and programs in assember, when I got my hand on C. C, and Big Blue C book (written with wit - almost as Camel book is) was like a godsend! Perl is the mostly same, plus excellent string capabilities, minus need to declare types of everything. Then, what is your reason not to introduce perl? I know perl debugger is not as good, but new free Open Perl @ sourceforge.net. might solve this problem. OTOH, learning pointers C-way makes sense, if he plans taking C++ classes. Also, getting used that all variables should be declared and have certain type, is good. Laziness can come later.

      As always, find out what the job is, and then use right tool.

      pmas
      To make errors is human. But to make million errors per second, you need a computer.

Re: Learning how to program (for youngsters of any age)
by mystik (Sexton) on Aug 04, 2001 at 08:18 UTC
    Ah -- back in the day when designing games was all the rage ;) Anyone remember ZZT ? Although just ASCII graphics, that games sported a whole programming system and board creation. The game was so versitle that you could create a world w/ a completely different gameplay than the original board they gave you.

    I wonder why it hasn't been ported to my favorite OS, GNU/Linux ;) (Perl port anyone?)

Re: Learning how to program (for youngsters of any age)
by Anonymous Monk on Aug 05, 2001 at 08:34 UTC
    why fly to the moon, when you can just read the book of thoose who flew? Language has come a long way. It takes approximately 2,000 lines of script to write awk or sed. 37 for echo and hundreds of lines of text in c in order to make up many of the other powerful utilities. I am a teacher of c and unix. I suggest that you start your son as I'm starting mine. Not because I'm doing it, but because it is the easiest and most powerful way to write a program with very little lines of script. Unix comes with bsh ksh and csh. They each have something to offer. Scripting in the shell is easy since you can pipe and combine utilities. Like, my son, c, would put him to sleep. He's 10 by the way. Unix is shorthand for c. Perl and c will follow. Good luck
Re: Learning how to program (for youngsters of any age)
by hsweet (Pilgrim) on Aug 06, 2001 at 04:31 UTC

    What works probably depends on the kid as much as the language. Not everybody (me for example) is ready for c.

    One thing that is important is that you can find an engaging project. If your child thinks games are dumb, then gamemaker would not be the best vehicle. It sounds great, though and I am in the middle of download.

    I introduced my kids to perl a little this summer. We wrote a program that made Captain Underpants names (you have to read the book). I did the bit that transforms the names and they had to fill 3 hashes with the new names. My daughter caught on to the idea of scalars as nouns and that the ; at the end of a line is like a period. And they got to use a text editor. It's a start, but thats not programming yet. And we had fun with all the stupid names.

    What I want to figure out is how to help them (and my high school students) make the jump to the point where they can solve simple programming problems themselves. It's a large step from filling in some blanks to designing and building working software.

Re: Learning how to program (for youngsters of any age)
by Zaxo (Archbishop) on Aug 06, 2001 at 07:35 UTC

    For more comments on teaching perl to kids, see Junior Perl and its replies. My own view is there as (shameless plug for one of my favorites) Heresy Re: Junior Perl.

    After Compline,
    Zaxo

$name vs. NAME$
by tadman (Prior) on Aug 07, 2001 at 01:22 UTC
    If you think Perl is too difficult to teach kids, then you are either underestimating their power to learn, or you are overestimating how difficult Perl is compared to BASIC. Here's a classic:
    print "What is your name?\n"; $name = <>; print "Hello $name, have a nice day.\n";
    Come on, is that really that much tougher? You don't have to teach them structured, OO-based programming from the get go.

    Besides, how many languages have a "spaceship operator"?

    Pascal, in my opinion, is harder to learn than Perl, and yet Pascal is promoted as a "learning tool". Go figure.
      I'd have to agree. Learning EVERYTHING about Perl is of course difficult, rather maybe even impossible.
      But doing the equivalent of small programs in basic or C I think is just as easy. Move on to tougher stuff
      when the pupil is ready. Then by the time college rolls around (assuming they stuck with it) they will be able to
      run circles around their fellow students, and probably be a lot more confident about themselves. That would
      be true for any more advanced language, not just Perl, but you get the point.

      Challenge! Much better to have gone a little to far and have to just back up a bit, then not reach their potential at all!

      -T Belich

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://101881]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (16)
As of 2014-12-19 16:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (88 votes), past polls