Unformatted text preview:

Three Letter Acronym TLA An introduction to programming concepts for children Neil Sarkar Cody Hess Jide Atoyebi 1 TLA White Paper Introduction TLA is a programming language designed to help children learn the basics of programming control structures functions problem solving and proper programming convention Children are believed to develop abstract reasoning skills by the fourth fifth grade Given our current level of technology and the extent to which it has permeated everyday life it is not uncommon to see young kids browsing the web and installing software Children are capable of learning much faster than adults It is these abilities we wish to take advantage of as we decrease the code barrier Programmers children will use Three Letter Acronym to give movement instructions to an inchworm so the inchworm may draw a picture with its silk Imagine a perfectly trained pet inchworm that went exactly where you told it according to commands like step and turn This incredibly fun concept will motivate students to learn until and if to move their inchworm to greater achievements Design The program will tell the inchworm how to move within a predetermined environment The language will implement the following features Commands The inchworm receives commands that tell it how to move All programs are built around these commands inch the inch command makes the inchworm move forward according to the direction it is facing by a predetermined amount of space right and left each of these commands will change the direction the inchworm is facing by 90 degrees right or left sright and sleft each of these commands will change the direction the inchworm is facing by 45 degrees right or left silk this command will turn the inchworm s silk on or off allowing it to draw pictures with its silk or to move across space without drawing or to change the color of the silk output It will accept parameters on off green red blue white and other colors Control Structures A for loop will allow the child to give more detailed instructions to his or her inchworm for The keyword of a for loop is times Children can execute a function or command multiple times by typing command number times For example inch 10 times would make the inchworm move forward 10 times Functions function Functions will create reusable code named according to name that executes according to code like function name start code end For example function square start inch 10 times right inch 10 times right inch 10 times right inch 10 times end would draw a square whenever square was called in the code scale This will accept a number and a function as an argument and change the size of the function s drawing according to the number argument For example scale 2 square would draw a square twice as big as the one defined in the function square flip This will accept a function as an argument and draw a mirror image according to the shape of the function as though the function was reflected opposite the direction the inchworm was originally facing An example is flip square rotate This will accept a function and a number as arguments and draw that function s shape with as many 90 degree clockwise rotations away from what was originally intended as is signified by the number argument Syntax Tokens are separated by white space Each keyword has similar syntax as described in its definition and functions execute code within the keywords start and end We ve given syntax as few limitations as possible so children can understand the concepts without worrying about the language Still we ve added two elements of syntax for expert programmers comments and parenthesis Comments Any time a line includes a token the and everything after it on the line will be ignored by the parser Parenthesis Parenthesis can group any set of commands to be repeated by a for loop For example the square function could be shortened by typing it as function square start inch 10 times right 4 times end Example Program DRAWS A SMILEY FACE IN TLA drawing face scale 10 square getting to spot to draw left eye silk off right 2 times inch 2 times left inch 2 times drawing left eye silk on scale 2 square getting to spot to draw right eye silk off inch 4 times drawing right eye silk on scale 2 square getting to spot to draw smile silk off inch 3 times right 2 times inch 5 times drawing smile rotate 2 smile function for square function square start silk on inch right 4 times end function for smile function smile start silk on sright inch 2 times sleft inch 5 times sleft inch 2 times end Conclusion Three Letter Acronym should be an exciting language to introduce young people to computer programming Heck we re old and we had a great time writing the sample program 2 TLA Language Tutorial Introduction TLA is a straightforward language that makes use of control structures functions in an easy to use fashion The language has been designed to facilitate ease of use to that end we have introduced functions These functions enable programmers to nest their desired silkworm commands Variables were omitted to keep pace with the children s in school knowledge Circumventing the variables detracted from the power of the language so TLA offers scalability which enables users to effectively draw according to scale rather than a variable size In conjunction with the nested functions the language offers users children real choices as to what and how they create their respective masterpieces Van Gogh s Hello World Far from the traditional hello world we ve come to know and love the silkworm performs this task with due diligence Using a series of nested inch and right and left commands it is possible to output Hello World for all to see Hello World code drawing HELLO WORLD function for hello world function hw start drawing H silk off right 2 times silk on inch 2 times left 2 times inch right inch right inch left 2 times inch 2 times silk off right inch 2 times right silk on drawing E inch 2 times left inch left 2 times inch right inch right inch left 2 times inch right inch right inch silk off drawing Ls inch 2 times silk on right inch 2 times left inch silk off left inch 2 times right 2 times nesting used to create two L characters drawing O inch 2 times silk on inch right inch 2 times right inch right inch 2 times right silk off inch 4 times drawing W silk on sright inch 2 times left inch right inch left inch 2 times sright silk off inch 2 times drawing O inch 2 times silk on inch right inch 2 times right inch


View Full Document

Columbia COMS W4115 - Three Letter Acronym (TLA)

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

NumLang

NumLang

6 pages

EMPATH

EMPATH

14 pages

La Mesa

La Mesa

9 pages

JTemplate

JTemplate

238 pages

MATVEC

MATVEC

4 pages

TONEDEF

TONEDEF

14 pages

SASSi

SASSi

16 pages

JTemplate

JTemplate

39 pages

BATS

BATS

10 pages

Synapse

Synapse

11 pages

c.def

c.def

116 pages

TweaXML

TweaXML

108 pages

Load more
Loading Unlocking...
Login

Join to view Three Letter Acronym (TLA) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Three Letter Acronym (TLA) and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?