For a long time, coding was text-based. It pretty much went without saying. You would need to write a computer program using letters, numbers, and words. For example, letās say you had a picture of a monkey, and you wanted it to move across the screen. You might write something like this:
monkey.move(10)
This code would tell the monkey to move a distance of 10 units. If you changed the number in the brackets, you could make it move more or less. This is an example of text-based coding. There are loads of text-based programming languages, which work in different ways, but they all use letters, numbers, and words to tell the monkey what to do.
In the 1980s, people began to experiment with a new type of programming language. Visual coding, as itās usually known, doesnāt use words and numbers. Instead, it uses pictures and symbols. For example:
šµā”ļøš
Those are just emojis. They wouldnāt actually do anything. But they should help you to imagine what a visual language looks like. The pictures are nice, clear, and intuitive, and a lot easier to work with than text-based code. But at the same time, itās more limited than text-based coding ā thereās only so much you can do with it.
In general, visual coding (which is also called codificaciĆ³n moviendo bloques) is great for beginners, but if someone wants to code at a higher level, theyāll need to learn to use a text-based language eventually. You can use visual code to move a monkey around, but not to build a complex website or app.
Should kids start with visual coding?
In a lot of cases: yes.
A visual coding language will help a child to understand some basic coding principles in a nice, easy way. They donāt need to worry about remembering syntax, or spelling words correctly, or anything else like that. They can just drop pictures into place, and run the code, and watch the monkey slide across the screen.
Pictures are more fun than words. Theyāre bright, interesting, and nice to look at. For a child, it can often feel boring and daunting to stare at a wall of text. Thatās why childrenās books have pictures in them ā itās more likely to grab their attention.
Because of all this, most kids do better when they start with a visual programming language. They can use something like RasguƱo o Blockly, which let them drag colorful blocks around the computer screen, and arrange them into lines of code. Kids can even get started with this before theyāve learned how to read and write. With no words to worry about, reading levels are irrelevant.Ā
At some point, children will outgrow whichever visual language theyāre working with. When they do, theyāll need to move on to a text-based language. This is the most popular way of doing things: learn the basics of code through a visual language, then progress onto text-based when youāre ready.
Thatās how we do things at CodeMonkey. Our courses start with movimiento de bloques, before moving on to text-based languages like CoffeeScript and Python.Ā
But is that the only way to do things? Of course not. Even though it isnāt the norm, thereās nothing stopping a kid from learning a text-based language first. Itās a lot more work, but it has some benefits. Thatās what weāll be talking about next.
Getting started with text-based coding
If a child is old enough to read and write, they can give text-based programming a go. In terms of choosing a language, there are a number of options out there, including Python, JavaScript, and Ruby.
Of the three, PitĆ³n is probably the best place to start. It uses simplified syntax, which makes it easier to read and write compared to other text-based languages. There are also lots of apps and websites which can help a child learn Python. One thingās for certain: when youāre learning Python, youāll never run out of resources.
- Codecademy is a great option for this. They have a rich curriculum and offer free courses to help a child learn to use Python. They also cover other coding languages, such as JavaScript and Ruby, but those are slightly harder.Ā
- Cuentos de Bananas is also an excellent resource for Python learning. This is an educational video game, where players need to control their character by writing lines of code. For example, they might tell their character to move forward, stop, pick up a key, turn left, move forward, and pick a banana.Ā
- āPython for Kidsā is a book written by Jason Briggs, with an emphasis on fun and excitement. The book guides kids through all kinds of Python-based coding challenges, featuring monsters, secret agents, and more.Ā
Whichever resources you choose, there is something important to remember. This wonāt be as easy as visual coding. Even the simplified syntax of the Python language is considerably harder than learning to code with nice, simple pictures.
For starters, thereās the keyboard to think about. You canāt write a text-based coding language without knowing how to type. But small children donāt have the best motor skills, and high-speed typing is usually out of reach. They donāt even know where to find all the letters. Theyāll type an M, then spend several seconds searching for the O, then several more seconds searching for the N, the K, the E, the Yā¦
monkey.move(10)
It could take a child well over a minute to type that out. Well over a minute, with some typos and backspaces along the way. When thatās the kind of speed youāre working at, coding can feel like a slog. Especially compared to visual code, when you donāt need to type a thing.
Text-based programming is also more likely to go wrong. A misspelled word, or a missing bracket, will stop a program in its tracks. Children will find themselves debugging, and debugging, and debugging again ā far more than they would when theyāre using a visual programming language.
In summary: a text-based language like Python or JavaScript takes a lot of time and patience. Thatās really the name of the game here: patience, patience, patience.
And we arenāt just talking about the kid here. As a teacher or parent, you must also be patient with the process. Support them, encourage them, and congratulate them on every small achievement, even if itās as small and simple as finishing a line of code. This long journey will feel a lot more bearable if you celebrate every step.
Is it worth all that time?
For most kids, probably not. It would be easier to start with a visual language, which lets them relax, have fun, and worry about learning a text-based language later. In some cases, starting with a text-based language will even cause more harm than good. Children will decide that they hate coding, and never touch it again when theyāre older.
But it definitely depends on the kid. While some children will hate the slow process of text-based languages, others will excel, and rise to the challenge. They love how difficult it is, and feel proud and excited when they finally manage to fix a bug and get the code to run.
For a kid like this, text-based programming might be worth a go. After all, there are some benefits of starting early, without learning a visual language first.
#1. Text-based languages have a higher ceiling
With a visual language, the ceiling is extremely low. Kids can have some fun, and build some cool little programs, but thatās all they can really do. Text-based languages donāt have that problem. As kids get better and better, they create more and more things ā the sky is the only limit.
Eventually, they might even find themselves using this language in a professional setting. Google programmers work in Python. Most of the internet runs on JavaScript. If these are the languages your kids will be using when theyāre older, why not start learning them now?
#2. You can get through the struggles early on
Letās say your kid starts off with a visual programming language. They learn the basics, have some fun, then hit that ceiling we just talked about. They realize itās time to move on to a text-based coding language, just as so many children do.
Theyāll still need to go through a bunch of struggles and mistakes. Theyāll have to unlearn some of the things they used to take for granted with their visual language, and start over with a bunch of new rules and techniques for their text-based language. Theyāll also need to practice typing, and get into the habit of debugging lines of code.
It might be slightly easier after doing some visual coding first, but it will still be slow, and a lot of hard work. Some people think, if youāre going to go through this process anyway, it makes more sense just to get it out the way as early as possible.
#3. The struggles are good for character building
In the past, weāve talked about the transferable skills that children can learn through coding. They become more patient, and resilient, and calm in the face of problems. Theyāll still learn these skills through visual coding, but if they manage to navigate a text-based language, their patience and resilience will develop on a whole other level.Ā
Just to be clear, this will only work if a child is already strong, and hard-working, and really wants to do this. It wonāt help anyone if you force them to learn a text-based language when it isnāt something they want to do. Instead of becoming more patient and resilient, theyāll be left feeling sad, frustrated and demoralized.
Final words
As weāve already mentioned, in the majority of cases, itās better to start with a visual language. Once children have learned the basics of coding ā and most importantly, decided if they like it ā they can start to learn a text-based language later. Itās like learning any skill: itās best to start with something fun and simple, and worry about complexity later.
But in certain cases, if a child is keen to learn a text-based language, and you think they have the patience to see it through, thereās no harm in giving it a go. At the end of the day, theyāll be getting a headstart on the kids who donāt start a text-based language until theyāre older.
But remember: if your kid finds it slow, or boring, or difficult, donāt force them to keep going forever. The last thing you want is for them to develop a hatred of coding in general because they started text-based coding too soon. If theyāre not having fun, itās never too late for them to change their mind, and try visual coding instead.