I hate posts that pretend to answer the question Which Programming Language Should I Learn First? So regardless of the title of this post I’m not going to answer the question. Well not exactly. One problem with most such posts is that they answer it in the context of someone looking to make a career of software development. Lots of people just want to have some fun or perhaps solve a particular problem. Another is that they assume a motivated mature adult. That is of little help to a parent who wants to get their child started in coding because “that’s the future!” The next problem is the assumption that there is a single answer. Ha! As if.
For children, especially elementary school aged children, traditional text based languages are a problem. Syntax gets them all the time. Plus the graphics on traditional IDEs are boring. I like block based programming tools for kids. I have a list of block programming languages that is getting to be scary long. It’s by far the most read blog post I’ve written. So which one should you use with your children? I have no idea because I don’t know your children.
My recommendation is to look through several of them and see which one or two appeal to you and the child or children you are working with. Scratch including Scratch Jr are very popular. So is Alice. Both are used in many schools. I find that some students love Scratch and dislike Alice while others love Alice and dislike Scratch. There are iPad apps such as Hopscotch which are very basic. They may appeal more to younger children. At some point you may want to move along to something new and more challenging
If you don’t want to learn on your own trying to keep up with let alone ahead of your children take a look at code.org and their code studio. Code.org is a wonderful resource for home schoolers, parents who want to help their children learn and other who want a friendly environment for true beginners.
Now maybe your child is more interested in moving atoms than pixels. Robots might be the thing for them. I have a post on Robots for Teaching Programming if you’re interested. I just found out that there is an extension to Small Basic (a very nice language for beginners) that lets one program LEGO Mindstorm EV 3 robots called EV3 Basic. That post has more options as well including robots that are programmed with apps suitable for younger children. Again personal taste and interest is likely to be a big factor in success.
For more traditional languages there are too many options to name. Which one is best? That all depends on what you want to do. The language of the existing Advanced Placement Computer Science course is Java. I don’t recommend it as a first language. Others like it fine but not me. I like Visual Basic which some people hate because they have old fashioned ideas about what BASIC is like. If your second language will be Java (for what ever reason) perhaps C# will work. It has the curly braces and semi colons but also lets you do graphics much easier than Java does.
The new Advanced Placement Computer Science Principles (APCSP) course does not require a specific language but some favorites are already showing up. Snap!, App Inventor are two of them (see I told you they scale up to high school) but Python and it’s cousin Processing are gaining widespread popularity from middle school to university level as first languages. You may want to find out what language your local high school is using – assuming they teach computer science at all. Most high schools do not.
If you are in high school and your school does not offer real computer science courses you may also want to look into what languages the universities you are looking at applying to use in their first course.
If you know that you want to write phone apps then your choices become narrower. For iPhones you used to be limited to Objective C and Swift and you’d have to have a Mac to develop on. If you want to develop for Android you can start with App Inventor or move along to the more advanced Android developer environment.
Or if you want to go multi-platform there is the Xamarin platform that lets you create native iOS, Android, Mac and Windows apps in C#. Since I love C# that is something I plan to learn more about over the summer. So many options I just can’t see trying to give one definitive answer.