What programming language would you teach a kid first?

To celebrate Ada Lovelace Day, we want to know what programming language you think is best for introducing kids to coding. Take our poll.
159 readers like this.
kids in a classroom learning about Raspberry Pi programming

Raspberry Pi Foundation. CC BY-SA 4.0.

For the 10th year in a row, the Finding Ada Network celebrates Ada Lovelace Day on the second Tuesday of October. It is a global celebration with flagship and grassroots events honoring the achievements and contributions of women in science, technology, engineering, and math (STEM).

According to Girls Who Code, the gender gap is widening in the computing industry, with only 24% of computer scientists being female. However, 66% of girls are interested in computer science as young children. What can we do to support girls and young women throughout their education and early career? The Finding Ada Network believes that mentorship is critical.

We want to hear about your experience as a mentor or mentee. What programming language would you want to teach a kid first? Would you teach a teenager the same language you'd teach an elementary school student? What tips do you have for getting kids interested in computer programming? Take our poll and share your mentorship story.

What to read next
User profile image.
Lauren is the managing editor for Opensource.com. When she's not organizing the editorial calendar or digging into the data, she can be found going on adventures with her family and German shepherd rescue dog, Quailford. She is passionate about spreading awareness of how open source technology and principles can be applied to areas outside the tech industry such as education and government.

29 Comments

Go, for better understanding of objective and non objective languages. Good start

More important than a programming language is to understand the programming concepts obviously adapted to kids.

To echo Marco somewhat, you should first consider what sorts of programming tasks kids will both understand and be interested in pursuing on their own.
As far as language, I would tend to favor Perl or Python. Perl has some tighter syntax rules, which actually is better since it can make debugging easy. Python is a bit looser (for example, variable naming rules and absence of any character to end a line with).
I think especially important for kids is to early on show a lot of examples of bad syntax, with associated error messages. Sometimes the error messages from the compiler are less than obvious about what is wrong or what to look for in the broken script.

Python or rust. Maybe python first, then rust. It's not that important what the first language is as long it's a highly popular one today and not one chosen simply because of ones personal history.

Great article. I used to think Scratch was the way to go for a first language but I've changed my mind. I think Python can be a good starting point and there are lots of ways to make that choice even simpler with Mu-editor and EduBlocks, BBC Microbit and AdaFruit's CircuitPython.

C

The first programming language I've learned was C when I was 11-12, and it was very hard at first... I think that python would be a far better alternative, since you can do so much with it with very little effort.
I would give the kids a great satisfaction for doing something besides the usual printf() and linked lists of C(and caring about pointers and mallocs is a total nightmare)

Only one language on the list of options with static types - and the Java ecosystem and tooling is likely too much for a kid to start with.

I would suggest Pascal - I know it's not very popular in this day and age, but it's really a great starter language: you won't have to struggle with the complexities of manual memory management, but it will teach you the basics of data types and how they're stored in the computer's memory.

Highly dynamic languages like JS, Ruby, Python or PERL will make you think that the distinction between numbers and strings and other types aren't important, when really, this is fundamental to understanding computers and programming.

I know a lot of people will disagree - some concerns about scaring kids away by making programming seem too hard, but... Programming is hard. If you want to do something easy, don't start programming.

That's not to say it can't be fun - but those of us who succeed at it in the long term tend to think that it's fun *because* it's hard, not because it's easy. If you don't enjoy challenging yourself, if you're not prepared for a line of work that requires you to keep learning and improving throughout your entire career, it's probably not for you.

So I would choose C for my kid. I think it is most important to learn how memory management works using pointers. This will earn a great appreciation for garbage collection. Also static typed languages makes for an easy transition to dynamically typed languages, in my opinion. Also, learning C structs lays a great foundation for learning object oriented programming.

This is in addition to the typical control flows and loops that are found in most traditional programming languages (if/else, for, while, switch/case, etc)

I will choose C.
Of course, python could be used to generate application fast.
But when children raise questions about how computer/parallelism works or does cache matter or what is done to make the application executable ... some questions like these are all underlying the language. IMHO, a reduced C material will be better to teach children for knowing about computer.

Scheme.

In my time it was BASIC and Pascal. Too bad that Pascal went away, it was a pretty good language.

>> Too bad that Pascal went away, it was a pretty good language

Aaah, but you're wrong on that assertion. Pascal lives on. In fact, it's a thriving language thanks to the 25+ year FreePascal compiler which spits out binaries for every platform imaginable.
In addition, the free Delphi-like LazarusIDE project makes creating cross-platform GUI apps a piece of cake.
Also, don't forget the RemObjects Elements compiler which supports 4 languages: Swift, C#, Oxygene (Object Pascal for the 21st Century) & Java. Finally, take a peek at Smart Mobile Studio which compiles DelphiScript to JavaScript for creating mobile/web apps. It's a fabulous piece of technology.

For more info, see this --->

** Free Pascal is a 32, 64 and 16 bit professional Pascal compiler. It can target many processor architectures: Intel x86 (including 8086), AMD64/x86-64, PowerPC, PowerPC64, SPARC, ARM, AArch64, MIPS and the JVM. Supported operating systems include Linux, FreeBSD, Haiku, Mac OS X/iOS/iPhoneSimulator/Darwin, DOS (16 and 32 bit), Win32, Win64, WinCE, OS/2, MorphOS, Nintendo GBA, Nintendo DS, Nintendo Wii, Android, AIX and AROS. Additionally, support for the Motorola 68k architecture is available in the development versions. ** https://www.freepascal.org

** Lazarus is a Delphi compatible cross-platform IDE for Free Pascal. It includes LCL which is more or less compatible with Delphi's VCL. Free Pascal is a GPL'ed compiler that runs on Linux, Win32, OS/2, 68K and more. Free Pascal is designed to be able to understand and compile Delphi syntax, which is OOP. Lazarus is the part of the missing puzzle that will allow you to develop Delphi like programs in all of the above platforms. Unlike Java which strives to be a write once run anywhere, Lazarus and Free Pascal strives for write once compile anywhere. Since the exact same compiler is available on all of the above platforms it means you don't need to do any recoding to produce identical products for different platforms. **
https://www.lazarus-ide.org/

** Elements is a modern multi-purpose software development tool chain.
It supports four popular programming languages: Oxygene (Object Pascal), Swift, C#, and Java, for all modern platforms. With Elements, you program for any platform you like – whether individually, or while sharing code between projects and platforms. ** https://www.elementscompiler.com/elements/

** Delphi is still the king! You can compile to Mac. You can do Linux. You can write FireMonkey apps for the phones. And now… you can develop wonderful apps for the browsers, thanks to Smart Mobile Studio 3.

With Smart Mobile Studio you can write Object Pascal , which is compiled to JavaScript. You get all the advantages of a strongly typed language, which prevents you from making bugs. You also don’t have to fight with all the differences between browsers and mobile environments. The RTL takes care of the quirks just like Delphi did with WinApi. ** https://smartmobilestudio.com/

In reply to by NonSequiTourDeForce (not verified)

Lisp?

I think all these languages are interesting, but some of them have the worst IDEs or are hard to teach on just command line for some 8- 10 year old kid, Java is great but some of the IDEs used by it are just difficult for kids, Python is great but not something I will start with either, I like C++ as a starting language but then I will go with Microsoft C# with a free version of Visual Studio and then start slow and show them how they can make games and how it integrates with Xbox, because kids relates only to fun and I think something like that will get them interested in coding, then show them how Java and Python can do the same since they are the most high in demand languages today

Pascal

Texas Instruments and Casio programmable calculators both use their own variants of Basic.

Not a bad place to start.

C++

Cobol

It depends. With younger kids I'd probably look for some language or suite created for that purpose (Scratch, Karel, etc.), python for teenagers. I'd consider C for good programming habits, but then famous Stroustrup quote comes into mind.[1]

In python the memory allocation is hidden and it's implicit typed language, it's not designed for complex desktop programs, but that doesn't mean it cannot handle complex tasks along with serving as a better calculator. After all it's one option to teach adults to program (other being C or C++), but in basic form it can be used for kids too. Maybe python first, then some basics of C or Qt C++.

[1] https://www.reddit.com/r/ProgrammerHumor/comments/8odd6r/c_makes_it_eas…

Great poll! It's fascinating to see all the different responses and the reasons behind them.

I personally start with paper "code" and activities that help very young children understand basic programming concepts without a digital device.

Starting around age 8 and going to about age 10 I teach Scratch. I will still teach some paper "code" activities that relate to the learning. This is also the age range I introduce robotics with block-based programming languages.

Once students have a clear understanding of graphical coding I move into Python. I used to teach Processing, but don't think it has enough real-world value to resonate with my students. It's important to help students make the connection between new Python keywords and the Scratch blocks they already know.

Over the years I've noticed younger students with previous Scratch experience find text-based coding easier than older students who jump straight into text-based programming with no Scratch experience.

I also like how Scratch makes it easy to participate in an open community by empowering users to share and remix projects.

You make a good point about using tactile activities to introduce very young children to coding. We've got to meet kids (of all ages/abilities) where they are and then they can learn anything!

In reply to by Cyanide Cupcake

For small kids, Sketch or any Logo dialects. For older kids, Lisp (or any dialect thereof, like Clojure). Stop brainwashing your children to the "one and true way" of C.

Probably Julia. But you can't go wrong with Python that's for sure.

lisp

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.