My son's first program

I am a programmer and I also would like to teach all I know for years to my son. He is 5 years old and know a little bit English. Actually, I want to try teaching Python but it might be too difficult for a kids who are not familiar to English language. I don't know which the best language for kid but my first programming language is Logo so I decied to give it a try.

The Logo implementaion I decided to use is FMSLogo which is absolutely open source. I shown him the first command to control the turtle.

FD 100

And he liked it at the first glance. The reason is he loves to control everything and the turtle served his desire as expected. Then I shown him another command.

LT 90

Then repeat above 2 commands.

FD 100 LT 90

After the fourth repeat, we got a square! I continued to extend this square by moving to the upper right conner and starting to draw a triangle.

FD 100
LT 30
FD 100
LT 120
FD 100

To make it clean, I then moved the turtle back home.

LT 120
FD 100
LT 90
BK 100

As a result, my son and I wrote a simple program to draw a home.

FD 100 LT 90
FD 100 LT 90
FD 100 LT 90
FD 100 LT 90
FD 100
LT 30
FD 100
LT 120
FD 100
LT 120
FD 100
LT 90
BK 100

Now it is my turn to explore more for next lesson tomorrow. Since my laptop is Ubuntu Feisty, I tried to run Logo using [KTurtle][] which included in Edubuntu. The problem is incompatibility of KTurtle and FMSLogo. I have to modify above program as follows to let it run correctly in KTurtle.

learn FD x [
    forward x
]
learn BK x [
    backward x
]
learn LT x [
    turnleft x
]
FD 100 LT 90
FD 100 LT 90
FD 100 LT 90
FD 100 LT 90
FD 100
LT 30
FD 100
LT 120
FD 100
LT 120
FD 100
LT 90
BK 100

This is not good at all. I expect to have cross-platform Logo interpreter. Fortunately, I tried to run FMSLogo on Linux using Wine and it works almost perfect. KTurtle might be a good software but in this case, I chose FMSLogo as long as there is no KTurtle for Win32 patform.

Tags: , ,

ขอบคุณครั

ขอบคุณครับ ตอนนี้ลูกผม 4 ขวบแล้ว ไว้โตกว่านี้ ว่่าจะลองสอนอยู่เหมือนกัน

Try aUCBLogo on GNU/Linux

Hello, I'm the maintainer of FMSLogo. I may be able to help with your cross-platform problem. FMSLogo is derived from UCBLogo (cross platform, no frills) and uses the same command names. These are the same ones used by the original version of Logo that was developed at MIT. There are other versions of Logo that are derived from UCBLogo and run on Windows and GNU/Linux. I've heard good things about aUCBLogo (http://www.physik.uni-augsburg.de/~micheler/). FYI, KTurtle is not a Logo, which is probably why it is incompatible with FMSLogo. http://ccgi.frindsbury.force9.co.uk/greatlogoatlas/?Live_implementations:KTurtle-_no_longer_a_LOGO

Post new comment