Kid's Programming Language

Published 31 October 06 09:48 AM | Coding4Fun 
  Kid's Programming Language (KPL) is a language modeled on the simplicity and readability of BASIC, but it is a structured rather than linear programming language. KPL lets kids see eye-catching and immediate results from their programs, while teaching them fundamental concepts like variables, data types, loops, decision structures, methods and functions.

Difficulty: Intermediate
Time Required: 3-6 hours
Cost: Free
Software: Kids Programming Language
Hardware:
Download: Download

    Coding4Fun is the point, right?

    I bet if you took a poll, a lot of coders were gamers before they were coders—and that they got started by coding games. The cool thing is, after you learn to code and start making stuff work in the real world—stuff that isn't games—it's still fun! People reading this at Coding4Fun obviously think so, right?

    So we all learned how to code and we know coding is fun, what do we do with that? Well, I think we want to give other people a chance to try coding, see what it's like, and figure out whether it's as fun for them as it is for us. If it is, they'll be coders too, and glad they are.

    So how do we help them try coding? And when? We think kids can learn coding as early as they can learn reading and typing and math, and that learning coding helps with and complements other learning—so the sooner the better. Kids are all about fun, too: Harry Potter, Nintendo, Legos... So if you want kids to learn to code, make it easy. Make it fun. Help them make it a game.

    Those are some of the things we were thinking about as we came up with KPL—our Kid's Programming Language. Coding4Fun makes a lot of sense to us, and is about a lot of these same thoughts, so we're very glad to have the chance to write an article introducing KPL here.

    Kid's Programming Language

    KPL is composed of:

    • a readable and modular programming language
    • a kid-usable but functionally complete integrated development environment
    • a growing collection of fun sample programs and games
    • an experience designed to make it fun for kids learning to code

    KPL is available as a freeware download from http://www.ms-inc.net/kpl.aspx. The default KPL download is English-language, but a Polish-language download is available now, and Spanish, Swedish, Hebrew, Norwegian, German and Romanian translations are under way.

    The Programming Language

    KPL's language is modeled on the simplicity and readability of BASIC, but it is a structured rather than linear programming language. KPL lets kids see eye-catching and immediate results from their programs, while teaching them fundamental concepts like variables, data types, loops, decision structures, methods and functions. KPL's data types include integers, decimals, strings, booleans, arrays, and user-defined structures.

    Here is a representative KPL method, which draws a parabola on the screen:

    Method DrawParabola()
    Var X As Decimal = -199.0
    Var Y As Decimal = -200

    Color( Blue )

    Var LastX As Decimal
    Var LastY As Decimal While X < 200

    LastX = X
    LastY = Y

    Y = (X * X / 200) * -1
    X = X + 3

    DrawLine( LastX, LastY, X, Y )
    Trace( "X = " + X + ", Y = " + Y )
       //Want to watch it draw slowly? Uncomment the next line:
       //Delay( 1 )      
        End While
    End Method
    

    The IDE automatically applies color to code based on language syntax as shown. Other language features this example shows include built-in support for run-time trace messages, the use of code commenting, and the use of system methods like Color() and Delay().

    The Integrated Development Environment

    KPL presents a modern and full-featured Integrated Development Environment with features including:

    • Windows-standard menus, toolbars and mouse-over tooltips
    • Code editor features such as syntax color coding, bookmarking, indent/outdent and comment/uncomment
    • Informational tooltips on mouse-over of variable or method names
    • Multiple program files presented on tabs and shortcutted on the Window menu
    • A program explorer pane for viewing and navigating the code hierarchically
    • Dockable and pinnable IDE panes
    • Collapsible and expandable code regions for all methods and functions—on mouseover, collapsed regions show underlying code in a tooltip
    • Message pane for trace, debug and status messages
    • C# and VB.NET code can be generated from the KPL source

    The KPL IDE offers many productivity and usability features. Its visual design and feature set are specifically built to prepare a user to 'graduate' to Visual Studio.NET.

    Figure 1. A screenshot of the KPL Integrated Development Environment

    In this screenshot, the mouse is over the method call to ColorRGB and a tooltip describing that system method is displayed. Also, the right-side pane has been unpinned, and is collapsed to the edge of the window. The program has just been checked for errors, as is shown in the Messages pane.

    Fun Sample Programs and Games

    Helping kids code games, and showing them immediate graphical results from their coding—these are great ways to get them and keep them excited and interested in coding. This is the idea behind the sample programs and games included with KPL.

    Of the many fun graphics capabilities KPL supports, Sprites offer the best graphical bang for a kid's coding buck. Graphics files in lots of different formats can be used to create a Sprite, which can then be displayed, moved, animated, rotated, scaled, and can interact with other Sprites. This allows someone to create an interactive program without having to learn the usual technical details of window creation, file handling, device contexts, alpha blending, collision detection, etc...

    In our experience, starting off a new coder with their first program displaying a spaceship or other Sprite running around the screen—in only a few lines of code!—is a great way to catch their interest, make them believe they can program, and make them want to learn more.

    Figure 2. Screenshot of a running KPL sample program

    The sample program shown in Figure 2 is a fully functional game, with a scrolling screen, animated target Sprites moving at varying speeds, and a keyboard-controlled spaceship. This particular sample game, as functional as it is, is a KPL program of only 210 lines of code. Such a small but functional game demonstrates the graphical leverage and power offered by KPL—and it provides a game example and working code that a kid can modify and expand on to build more complex games.

    KPL and its graphical engine can be used for more than just games, of course. Fractals are fun, too, right?

    Figure 3. A KPL-rendered Mandelbrot set, plotted with 70 lines of KPL code

    Do you want to play a game?

    If you know any kids who might have fun coding games, KPL is as free as it is fun. Check it out, and tell us what you and they think?

    We will also be working on a series of articles about coding games in KPL. Keep an eye out for them here on the Coding4Fun site. Some of them may remind you of arcade hits from oh so long ago...

    Comment Notification

    If you would like to receive an email when updates are made to this post, please register here

    Subscribe to this post's comments using RSS

    Comments

    # Tom said on May 15, 2007 9:30 AM:

    It's a trap!  They're Ruby evangelists here to steal your children!

    # a said on July 26, 2007 10:01 AM:

    By watching the screenshots i think this sofware would be great but i tried at least 1 hour to find this software but was unable .please help meout .(i am anshuman chandel from India)

    # mae said on September 6, 2007 11:47 PM:

    We cant compile the code to create a standalone program ?

    # nparker said on September 18, 2007 10:03 AM:

    i am a 10 year old who really wants to learn how to program.I think KPL is a great idea.i will ask my father if I can download it because it sounds such a great idea.

    # Jevans said on December 3, 2007 2:56 PM:

    Anything to get kids coding is good, but the code in the screenshots looks almost like VB with no qualifiation on methods.

    # Speedoox said on December 26, 2007 4:31 PM:

    KPL is a great program, it is so much fun, i have been working on it for like a half year now, it's very simple when you learn it( takes like 24 hours ) but it's so fun,

    and they wont steal your childrens, maybe from this website, but not on www.kidsprogramminglanguage.com

    thats the phrogram company, you can trust'em

    # David Witus said on May 2, 2008 8:06 PM:

    The Software link needs to be updated on the Kids Programming Language page. It should go to http://kidsprogramminglanguage.com, not to http://ms-inc.net, as that website has now been discontinued. Thanks.

    # Coding4Fun said on May 24, 2008 3:47 AM:

    @David Witus:  Thanks for the heads up, link fixed

    # Kendon said on July 19, 2008 11:46 PM:

    nparker

    Try Visual Basic, KPL is a ripoff of it.

    VB is a little harder but you get more control.

    # David Zmick said on August 19, 2008 1:41 PM:

    AHHHH, WHY, It has Microsoft syntax!!!!

    Check out Squeak Smalltalk(http://squeak.org)

    # CodingIsFun said on April 12, 2009 9:29 PM:

    If you wanna stay simple use HTML. Plain and simple

    # Coding4Fun said on April 15, 2009 3:16 PM:

    @CodingIsFun HTML isn't coding really.  It is static.  To get it to do stuff you need JavaScript at that point.

    Leave a Comment

    (required) 
    (optional)
    (required) 

      
    Enter Code Here: Required

    Search

    This Blog

    Syndication

    Page view tracker