turing-commands-coding-for-beginners

The Best Coding Language For Beginners is…

The Turing Advantage

Turing is a programming language that was written with high schools in mind, which makes it ideal coding language for beginners. It was intended for students with little or no background in coding.

Relatively “Unknown” Language

This beginner coding language was developed by Canadians Rick Holt and Tom West in the 1980s, so most people aren’t aware of it. If you’re trying to teach kids today, using a relatively unknown language can be a huge advantage.

Many kids start coding at an early age. So, if you’re teaching an entire class to code, you may have some very bored students. Coding in an older language means that it’s new for everyone. Experienced coders will pick it up quickly. However, they won’t be driving you crazy.

Coding For Beginners: Top-Down Language

There are advantages to being a top-down language, meaning that Turing interprets the code in a specific order starting at line 1 and ending on the last line. It forces new coders to think about the execution order as well as reduces the chance of ‘spaghetti’ coding. (Convoluted code that is hard to follow and definitely hasn’t been logically organized into its simplest form!)

The one disadvantage is that there’s an extra step if a procedure/function needs to be called before its full definition.

Simple Syntax

Many of the ‘big’ languages have complex syntax. They may require braces, brackets or semi-colons. The complexity of these rules can create confusing compilation errors for an inexperienced coder.

Syntax is much simpler in Turing. While the language reinforces some syntax and structure rules, it is free of tedious syntax.

coding-for-beginners-function-proc-example

Coding For Beginners: Subprograms or Modularization

Most languages can organize code into smaller reusable modules. Turing has two separate subprograms: procedures and functions. A procedure just executes the code within, whereas a function returns a result back to where it was called (think of pressing the square root key on a calculator).

Both have an end statement that Turing uses as a marker to indent the internal code of the structure if the coder presses . This is extremely useful for a new coder. It makes it easier to trace structure errors.

Integrated Graphics

Both text and graphic commands are always available. So it’s quite easy to mix both within a program. Python, Java, and C++ all need extra modules and/or the use of separate output screens to do this.

turing-coding-for-beginners-colour-example

And Then There’s Colour

The colour command has a limit of 256 colours, but you can colour anything: background, text, buttons etc. If you don’t like the 256 limit, you can code with RGB colours.

Common Variable Types

Turing allows for global and local as well as constant variables of the most common types: int, real, boolean, char and string. The only issue is that numeric and string data are limited in their storage capacity, which can be a problem when designing complex programs. Any type can be used in an array.

Coding For Beginners: Common Coding Structures

The ‘normal’ structures are all available: if, for loop, break and case (also known as switch). Because the exit line is moveable, the built-in loop structure can be coded to work as a do-while or while loop. Turing is also capable of reading, writing and searching files in any directory. And it has a random number generator.

turing-builtin-functions

Built-in Functions

Turing has a formidable list of built-in functions: math, string, character, and common conversions (string to integer, etc.). It also has the traditional operators: addition, subtraction, multiplication, division, integer division, modulus and exponent.

turing-button-example

Coding For Beginners: Advanced GUI Commands

This is one of Turing’s trademarks. Buttons: text, picture, radio, or checkbox, drop-down menus, text boxes – with or without scroll bars, dialogue boxes, window control, multiple windows, mouse control, and keyboard controls (such as arrow keys) are all standard commands.

Now, some of them do require importing an extra library, but that also serves a purpose. It introduces the import command, something that is common in other languages. Again, the text, graphics and GUI features all use the same output screen, so the coder doesn’t have to learn a completely new environment.

Other Advanced Commands

A coder can build unique modules or units that can be imported into another program – just like Python or Java. It is also fairly easy to define an enumerated type, record structure, collection or even a class. Surprisingly enough, Turing can handle exceptions, such as division by zero. It can also access the computer’s system time, which can be used to create a timer.

Turing can send and receive data through a TCP/IP internet connection, allowing users to play games over the internet.

For those with older computers, Turing was a wonderful way to teach electronics/robotics because it could send and receive signals through the computer’s parallel port.

turing-font-music-example

‘Fun’ Commands

Music. Everyone wants music or sound in their program. Turing can play .bmp or .wav files. And, it can do them throughout the program without interfering in its execution. Turing even has a built-in play command that emulates a piano keyboard using note names and time values, including a rest command.

Images and Sprites. Turing can read, display and modify .bmp or. jpg files, so you aren’t limited in creating graphics with the draw commands.

Fonts. Any size, any type, any style of any system font on your computer.

Joysticks. Turing can control up to two joysticks.

Coding For Beginners: Executable – Really???

Turing can create an executable version from its source code, ergo the user doesn’t need Turing installed. So, you can create a ‘real’ program! Many languages don’t have that ability.

Versatility

All Turing commands are in English UK as well as English US. For instance, there is a colour() as well as a color() command.

Finally

Turing is a very robust programming language that has been ignored for far too long. It was designed for teens, and it is ideal for new coders, especially those who are beyond the more graphical drag and drop… Share on X

It is now open-source, and it can be downloaded free. Unfortunately, it is only available for Windows computers.

It does have limitations, however, so does everything else in this world! Learning how to manoeuvre around within them is just as important a skill as it is to code logically and succinctly.

Looking for Teaching Resources?

Check these out…

coding-for-beginners-computer-corner