Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Yabasic => Topic started by: combatking0 on July 13, 2010

Title: Teaching my son BASIC
Post by: combatking0 on July 13, 2010
I have started to teach my son BASIC using our PS2. I'd use the C64, but it's in the loft and I cannot reach it :(

Still, he's learning about classic commands such as PRINT, GOTO, FOR, NEXT, IF, THEN and ENDIF.

I'm tempted to move him onto a more contemporary language as soon as he's got the hang of variables and arrays, but he's only 6.

I started coding at 7 - am I pushing him too fast?
Title: Re: Teaching my son BASIC
Post by: Jim on July 13, 2010
I can't imagine it would be a bad thing even if he doesn't get it.
My mum was asking me last night about trying to encourage my nephew who's a similar age.  I was thinking of using ps2yabasic and to have some basic commands along with some pretty graphics to make it attractive.

Jim
Title: Re: Teaching my son BASIC
Post by: rain_storm on July 14, 2010
I was a late beginner but I think the sooner the better. If nothing else it will teach him problem solving and trouble shooting. That beats watching TV in my books.
Title: Re: Teaching my son BASIC
Post by: combatking0 on July 14, 2010
He'll also have a working knowledge of algebra before he starts secondary school. A lot of the leavers at the school where I work don't have that :)

I often find a fun pair of commands for a young child are as follows:

Code: [Select]
10 PRINT "NAME"
20 GOTO 10

Where NAME is replaced by the kid's name.

We then went on to cover FOR loops:

Code: [Select]
10 FOR A = 1 TO 10
20 PRINT "NAME " + STR$(A)
30 NEXT A

Not that we covered what the STR$ command does. I'll tell him next time.

Finally we did some maths (he loves seeing times tables for some reason), using an IF statement to end the program:

Code: [Select]
10 B=0
20 C=13
30 B=B+C
40 PRINT STR$(C) + " X " + STR$(B/C) + " = " + STR$(B)
50 IF B<200 THEN
60 GOTO 30
70 ENDIF

I know GOTO is a messy form of program control, but it is simple to understand for beginners.
Title: Re: Teaching my son BASIC
Post by: Jim on July 14, 2010
It's hard to teach str$ without going into the whole thing about types which is a pretty complex place - it'd be better to use a language where that doesn't matter.  And one without line numbers.  Maybe javascript?

Jim
Title: Re: Teaching my son BASIC
Post by: combatking0 on July 15, 2010
That's probably a good idea, although setting up JavaScript from scratch takes longer than PS2 YABASIC.

I'll stick to single type programs (either numerical or string) in BASIC for now, then move him on to JavaScript or ActionScript (which are very similar).
Title: Re: Teaching my son BASIC
Post by: Jim on July 15, 2010
Keep at it, I'd like to know how you get on and what you find that works and what doesn't.

Jim
Title: Re: Teaching my son BASIC
Post by: zawran on July 15, 2010
Quote
it'd be better to use a language where that doesn't matter.  And one without line numbers.

If I remember correctly then BlitzBasic does not use line numbers, and can be used without having to think about using signs for variable definitions. It has been a while since I have used it last, because I have been using BlitzMax for a few years now, so I am not 100% sure on the variable definitions.

[edit] It is rather easy to setup and fairly easy to get stuff to happen on the screen, which I am thinking would be a must for someone that young.
Title: Re: Teaching my son BASIC
Post by: combatking0 on July 15, 2010
I'll get him started with coordinates next. He likes numbers, and we've fleetingly covered position and motion on paper, so he might like to see a dot drawing lines on screen. I'll see if I still have my etch-ya-sketch program.
Title: Re: Teaching my son BASIC
Post by: va!n on July 16, 2010
hi guys...
i am not sure and its long time ago when i read something about a special basic esp. for kids... Afaik it was a language created by microsoft... However, if its not from Microsoft, there are special easy to learn basic languages for kids around afaik. Just check out: http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx (http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx)

http://www.readwriteweb.com/archives/small_basic_teaches_kids_how_t.php (http://www.readwriteweb.com/archives/small_basic_teaches_kids_how_t.php) (incl link to a 62 page pdf)

Best regards...
Title: Re: Teaching my son BASIC
Post by: hellfire on July 17, 2010
It's hard to teach str$ without going into the whole thing about types which is a pretty complex place
In my opinion it's easy to understand that "text" and "numbers" are different things.
It doesn't really matter how those work in detail. You just have to know there's a function to make text from numbers so you can print them.
Title: Re: Teaching my son BASIC
Post by: Jim on July 17, 2010
It's hard not to be clouded with 30yrs of experience.  I can't see how anyone without any computer knowledge can understand the difference between 5 and "5" without having to be told they are arbitrarily different.
The fact that
print 5
and
print "5"
write out the same result, but
print 5+5
and
print 5+"5"
don't is not at all intuitive.

Jim
Title: Re: Teaching my son BASIC
Post by: combatking0 on July 17, 2010
I think I know how to get him to understand the difference between 5 and "5" - I'll see what works with him and report back.
Title: Re: Teaching my son BASIC
Post by: rain_storm on October 01, 2010
http://www.strchr.com/first_language
an interesting list of links that I think you might like to have a look at
Title: Re: Teaching my son BASIC
Post by: ninogenio on November 02, 2010
hows this working out ck. iv recently been letting my 4 year old girl mash the keys of my old spectrum. she sits beside me and could watch me programing it ages its funny watching her expressions when doing some flashy color stuff.

im really hoping over the next few years she starts to take to it. my son on the other hand runs around in the back ground trying to crash his cars and bikes into the wall/tv/any thing thats crashible :)
Title: Re: Teaching my son BASIC
Post by: combatking0 on November 03, 2010
Sorry, we've lapsed a bit with this. I'll try to get him interested again.
Title: Re: Teaching my son BASIC
Post by: ninogenio on November 03, 2010
you dont have too on my behalf mate :)

iv just been wondering how folks got there kids interested. i was thinking about it and does it seem to you guys that todays computers/gadgets is in danger of losing a lot of tomorows coders. do yous think that kids have it too easy now a days where its quicker and more sparkly to pick a ds up than code a bit of basic etc. when i was a kid every one around me messed around in various basics on different computers.

now when people come to my house if im messing around coding i get either "aw your a tottal geek like" or looks like im practicing witch craft :).

i dont understand why sony and other big companys dont push basic forward with there consolse like the ones of yesteryears at least so that kids knew what it was and to let them express a bit of creativity. it would be in there best intrest in the long run i mean how many of us would be here without spectrums c64's amigas etc.
Title: Re: Teaching my son BASIC
Post by: combatking0 on November 06, 2010
That's certainly a good argument - if they did that, it would certainly encourage the next generation of bed-room game coding enthusiasts, and hopefully bring them the recognition they need to be snapped up by the big companies for high budget development teams.
Title: Re: Teaching my son BASIC
Post by: Xetick on November 07, 2010
You could always try with processing (http://www.processing.org). There are a lot of sketches at openprocessing (http://www.openprocessing.org/). Based on java, so it's useful knowledge, simple to get you started, cross platform, lots of neat examples, runs in a browser (so if he makes the next unreal engine your set ;D)
Title: Re: Teaching my son BASIC
Post by: combatking0 on November 09, 2010
That sounds a bit advanced for his age, but it's worth looking at.