Python for my 13 year old?

GunsMadeAmericaFree

Golden Member
Jan 23, 2007
1,245
290
136
My 13 year old has been playing a game on his PC that has some aspects that remind me a bit of programming. He also seems to be able to educate himself watching videos, trying things on his own, etc. He has expressed interest in programming several times, but in the past I wasn't sure which language, or how he should get started.

I think that Python might be a good language for him to start with. Can any of you suggest a good way he could learn more about it, or perhaps some place online with videos and things he could try to learn more?

Thanks so much!
 
  • Like
Reactions: hiyexen188

GunsMadeAmericaFree

Golden Member
Jan 23, 2007
1,245
290
136
I've heard that it is easy to learn, and is expected to be one of the top 3 languages for at least the next 10 years.....
 

purbeast0

No Lifer
Sep 13, 2001
52,850
5,724
126
I'd first see what your son is interested in building before picking a technology and then go from there.

For instance, if he's interested in building anything with a UI, python probably isn't the best language of choice for that.

I personally would go with Java over Python if I were to start with a backend type of language. Being in the industry for nearly 2 decades I am just personally not a big fan of Python. I'm also not the biggest Java fan but I prefer that over Python and Java is everywhere.

No matter what language you pick, make sure he is learning HOW to program and theory/concepts rather than learning the language itself. He will learn the language itself as he is picking up the theory and concepts.
 
  • Like
Reactions: dank69

purbeast0

No Lifer
Sep 13, 2001
52,850
5,724
126
Why Java over Python? Do you feel that it is easier to learn?
Let me preface this with I don't have much Python experience and the last project I worked on had a backend in Python, and the backend dev was bad and wrote bad code, so it could be part of the reason I am not a big fan of it.

Java feels a lot more object oriented than Python does to me, again, this is just based on my experience. The docs for it are also very good although for a new person it might be a bit intimidating. I also do not like the formatting in Python where, for instance, you have to use tabs to "enter" a loop instead of brackets in most other common languages.

The Java console is also very straight forward and easy to interact with. There are tons of "built in" classes in Java too that wrap all of the concepts you learn about such as sets, maps, arrays, lists, etc, which is nice when you are learning. It also has built in garbage collecting which is nice when learning. I don't know if Python does or not though so that may not be a benefit over Python.

As someone who learned C++ as my first language, Java is just more similar to that than Python is, and that is also probably why I'm a bit biased towards it.

Again, this is all just personal preference and whatever he learns, as long as he gets the concepts down, he'll be able to go between languages.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
Java / Javascript in my opinion too hard/complex for kids (from the viewpoint creating interactive webpage)

My feeling and according to internet:

App Inventor & Scracth from MIT
SmallBasic from MS
Blockly from Google

then

Basic (ex. https://www.freebasic.net for Windows, or http://gambas.sourceforge.net/en/main.html for Linux)

Lua

Python (Python syntax is simple, it's hard when it comes to debugging if you import modules, it's all over the places), very good for math (complex/imaginary number, etc) teahcing, however.
You can use Python's built-in debugger IDLE. Pyscripter is very good for debugging, however. https://sourceforge.net/projects/pyscripter/

Golang from Google

==

some links

==

It's best if you can go over them first.

==

Another way to get him started probably is buy Arduino kit & let him do some projects
seems a much simplified c/c++ language

==

By the way, if you have MS Office installed on your machine, all of them (Excel, Word, Outlook, Powerpoint, Access) came with Visual Basic for Applications (VBA)

==

You should be able to find many tutorials on youtube.

There is no definite answer, you have to see what he can pick up.
 
Last edited:
  • Like
Reactions: blckgrffn

sze5003

Lifer
Aug 18, 2012
14,182
625
126
I would say Scratch would be good for kids to learn. It's simple enough and built by MIT with story block style functionality. It should be easy to learn and fun at the same time.

For a UI as they learn more and become better, start off with simple html for the basics.

I've been working at my company for a little over 10 years and I primarily use Java. It's great for learning object oriented design, structure, and data types. This all can come later.

We have a middle tier app that's all Java and some lambdas that are python. I'm a tech lead so whenever I have to code review our devs' python stuff I always grimace. It's just not my type of language but I do have to know the basics of it since we interface with a machine learning model.

Python is great for that but like others have said, going from an object oriented, structured syntax language to one that kind of has goofy rules/syntax and is all over the place is annoying.

I probably would hold off on the python stuff until later because simple stuff is easy to write in python but it won't have very good programming fundamentals to learn.
 

blckgrffn

Diamond Member
May 1, 2003
9,123
3,056
136
www.teamjuchems.com
@purbeast0 had the best point.

What problem are they trying to solve?

It's like talking about which brand of tools to buy without having a hobby that requires usage of the tools. Languages always are going to solve all the worlds problems when they are new and shiny and are going to be the next big thing but realistically have usage scenarios where they work best.

I've seen a solid amount of robotics that seem to use Python. Our entire ecommerce suite is PHP/Javascript, but you know what I write in? MySQL, bashscript and Ruby because I using puppet to maintain our server configurations. Heck, puppet has it's own Syntax and Linter, so I guess that's what I've written the most of lately.

When you have the hobby and purpose in front of you, pick the tools that are predominant in that area and learn those. Many times you'll want to make use of groundwork that others have worked hard to establish and using the language those tools are written in makes a ton of sense.

IMO, coding is more about solving problems than "learning a language" - knowing english doesn't do much if you don't have anything interesting to say or a reason to use it.

FWIW, in college I got to pick between Java and Python. I picked Java and while its never been that big of a deal, it's clear to me that Python is more useful to dabble in than Java if you want to create simple custom solutions. For example, I wrote Python scripts to use the USPS and UPS APIs to mark our orders as delivered. This was a couple of libraries and hundred lines of code and does a standalone thing that is useful. I hadn't used Python in 15+ years and it was a fun little day of work.

****

Sorry, my brain has continued to work on this. It's sort of like saying you want your guy to learn to "music" - and while it's true you can learn the notes and the scales and how to read and write music, it's the songs that make the whole enterprise fun, worthwhile and rewarding. I think that the whole "teach your child to code!" industry seems to play lip service to this and while they do have games that teach about loops, etc (played several with my own kiddos) it's not at the same level as the kiddo realizing they are plunking out twinkle twinkle little star perfectly or shredding the smoke on the water intro.

Anyway, those are my run on thoughts. In college we used advanced math and algorithm analysis as our problems to solve, and those were fun and effective because that was why I was at school and I had the benefit of a whole cohort struggling, succeeding, gaming and doing all the things with at that same time. For soloing it I think the pull would have to be deeper and associated with something they find joy in.
 
Last edited:

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
Last edited:

Atari2600

Golden Member
Nov 22, 2016
1,409
1,655
136
If its pure software, I'd just get something accessible. So python is fine - maybe just install anaconda to get them up and running.

Nothing more off putting than not even getting to the start line due to dependencies etc.

Of course, if you want to run robotics etc, then your looking at arduino or pi.


As for the object oriented stuff. Utterly ignore it for the first few months, keep it simple. Then try to get them to rebuild some of what they've done* using OO so they'll perhaps get a bit of understanding of its advantages and disadvantages.

*ideally something that they've later tried to extend.

Get them enthused first of all - which means quick initial rewards. Then show them the paths of learning when they're keen to explore it themselves.
 

lakedude

Platinum Member
Mar 14, 2009
2,549
262
126
So how does one get started with Python? I did Fortran on punch cards, Pascal on the university's DEC and picked up BASIC on the PC.

Or should I learn some version of C?
 

blckgrffn

Diamond Member
May 1, 2003
9,123
3,056
136
www.teamjuchems.com
So how does one get started with Python? I did Fortran on punch cards, Pascal on the university's DEC and picked up BASIC on the PC.

Or should I learn some version of C?

Haha, find a problem to solve, look to see if their are Python libraries, go for it :)

I use VScode to do the things with the code.
 

Atari2600

Golden Member
Nov 22, 2016
1,409
1,655
136
So how does one get started with Python? I did Fortran on punch cards, Pascal on the university's DEC and picked up BASIC on the PC.

Or should I learn some version of C?

Anaconda.org for a single click installer of everything you'll initially need.

Then just google for tutorials.
 
  • Like
Reactions: lakedude

VirtualLarry

No Lifer
Aug 25, 2001
56,326
10,034
126
I first learned on various micro-computer BASIC interpreters. (Yes, BillG and PaulA were behind most of those, if you didn't know.)

Learned C and Pascal on the VAX, along with C/C++ and ASM (MASM 5.1!) on PC. Taught myself game programming along the way.
 
Jul 27, 2020
16,153
10,234
106
I think that Python might be a good language for him to start with. Can any of you suggest a good way he could learn more about it, or perhaps some place online with videos and things he could try to learn more?
There's a boring way here: https://python-course.eu/

Then there's the fun ways:
Games and animation section here: https://www.openbookproject.net/py4fun/

Once he is fairly confident in his abilities, he can try the following coding projects: https://www.upgrad.com/blog/python-projects-ideas-topics-beginners/

Personally, I learnt a lot about coding by tinkering with existing code. Even though a lot of times I really didn't understand what I was doing, I still had tons of fun changing things here and there in code and making it do what I wanted and getting super excited when I got the desired results. That's the best thing about programming when your brain manages to figure out how to hack the code.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,326
10,034
126
No indie projects? How come???
I did plenty of indy projects for fun, but nothing complete.

I did a ray-casting engine, following LaMothe's book at the time. I did a Space Invaders, Pac-Mac, Tetris, -alike engine, which helped me get the job working on A.C.

Basic game-programming bootstap stuff, gotta re-make the classics. Nothing really polished and release-worthy, although I was thinking of releasing my tools as an engine development kit (for DOS)... then DOS ceased to be much of a thing.

Although I worked on A.C., none of my code made it into the final release build, that I am aware of. (I did some development on the unreleased DOS version, which was abandoned early on for a DirectX version.)

That was basically a Previous Life, however. Not really into, nor capable of that stuff any more.
 
Jul 27, 2020
16,153
10,234
106
I did plenty of indy projects for fun, but nothing complete.

I did a ray-casting engine, following LaMothe's book at the time. I did a Space Invaders, Pac-Mac, Tetris, -alike engine, which helped me get the job working on A.C.

Basic game-programming bootstap stuff, gotta re-make the classics. Nothing really polished and release-worthy, although I was thinking of releasing my tools as an engine development kit (for DOS)... then DOS ceased to be much of a thing.
Put the stuff you have on Github and share please :p

You never know who you might inspire to create great stuff. Someone may need to see and learn from your exact coding style to get their creative juices flowing.
 

Greyguy1948

Member
Nov 29, 2008
156
16
91
My 13 year old has been playing a game on his PC that has some aspects that remind me a bit of programming. He also seems to be able to educate himself watching videos, trying things on his own, etc. He has expressed interest in programming several times, but in the past I wasn't sure which language, or how he should get started.

I think that Python might be a good language for him to start with. Can any of you suggest a good way he could learn more about it, or perhaps some place online with videos and things he could try to learn more?

Thanks so much!

Is he interested in games?
I have some versions of Raspberry Pi
All of them have Python2 and 3 as standard.
There are some games with code in Python.
This is much like Basic code in the DOS age.

RPi also have C,C++ and Java.
Take a look at Rosettacode.org and find something to test!
 
Jul 27, 2020
16,153
10,234
106

The course linked in that post is pretty good. I like the "Meet the programmer" section. That should be very inspiring for a budding programmer.