About The Book

This is my first attempt to write something for school students. The idea is to write a small book which will teach elementary programming concepts in a fun way . What age am I targetting at? Maybe, 7th standard (12 years) and above.

Plan

The book will have 3 `parts’. In part one, students will write programs to animate a cat (Neko) in its simulated world. The idea is to introduce the concept of functions, iteration etc in an interesting way.

In part 2, I will try another “game” - Conway’s famous Game-of-life. I don’t know whether this is realistic, but the idea is to show kids how to build an interesting system step-by-step. Have to think hard about how to go about doing this …

In part 3, I will try to demonstrate programs based on mathematical/logical puzzles - concepts from number theory, combinatorics, geometry etc will be used. Again, not much of an idea as to how to go about doing this …

I love reading technical books which have historical references and interesting anecdotes sprinkled all around - they tend to give a `human touch’ to the material being presented. I should see whether I can take this approach …

Philosophy

Don’t try to teach syntax-for-the-sake-of-syntax. The idea is to demonstrate how we can write programs to do fun stuff. Focus on application.

Framework for part 1

Neko is a smart little cat, and he is going to teach a bit about computer programming to school kids (and their parents)!

PyNeko is still in its infancy. Try the following at the Python prompt:

from neko import *

and you can see a window popping up:

Try the following commands:

sleep()
wakeup()
right()
left()

Now, try:

place_mouse(0, 2)
right(); right();
mouse_pos()
place_mouse(0,3)
mouse_pos()
mouse_at(0, 3)
kill_mouse()
mouse_at(0, 3)
mouse_pos()

You can place walls between cells. Here is how to do it (start with Neko at (0,0)):

right(); down()
build_wall(1,1,'up')
up()
destroy_wall(1,1,'up')
up()

Here are the most recent source files:

6 Comments

  1. Posted January 14, 2008 at 5:18 pm | Permalink

    Testing … ignore

  2. Raghesh
    Posted January 17, 2008 at 2:17 pm | Permalink

    Sir, This will be a great effort. I think we can even suggest this book as a reference to the first year Engineering students, who don’t have any background in programming, before they try to learn C, where they have to struggle a lot with the syntax involved, which may discourage them.

  3. Posted January 17, 2008 at 3:37 pm | Permalink

    Thank you for the encouragement, Raghesh!

    I am trying to write with a typical 12 - 15 year old Indian student in mind - what I am very much afraid of is how appropriate the language is
    for this age group - it shouldn’t sound too childish and it shouldn’t be like my typical `Hack XYZ’ article … I think the only way to find out is by trying it out on such students …

  4. Anonymous
    Posted January 17, 2008 at 6:00 pm | Permalink

    gr8 work. keep going

  5. Bristow
    Posted January 18, 2008 at 6:32 am | Permalink

    Sir, This ‘ll be a great work. And for sure not only school students but also the engineering students up to s3 can use this to study the basics of programming. I know many people in our batch are struggling with programming in C, not just because of the strict syntax but the lack of basic programming knowledge.

    And we are happy to join you sir.

  6. Posted January 19, 2008 at 8:29 am | Permalink

    Thank you Bristow!

    I am looking for contributions from your part …

Post a Comment

Your email is never published nor shared.