Al Sweigart writes free books and tutorials teaching Python through games, ciphers, and practical projects for beginners.
Commenters recommend his books for beginners who want to learn by building things rather than through academic study, especially for game programming.
My kid is 13.
He didn't ask to learn, I suggested it as a possible activity. I stressed that he doesn't have to want to. We'll know whether he's trying to please his old man or not after awhile. So far he's liked the new and foreign concepts.
We did a little bit last summer. Based on that experience I'm changing it up a little, in part by teaching a little more about surrounding concepts like the shell, and what processes are. This video came around at exactly the right time.
I showed him how to set up VirtualBox, create and destroy a VM, take snapshots and why you'd want to, how to install Linux on the box, and the basics of navigating the shell and running programs.
He's learning Python, with Vim and the Python REPL. Last summer I started him on Python 3.0, but this year I've had misgivings about that and he's doing 2.7, because if he does remain interested then any framework or other tool he's likely to use next will be pre-3.0-based.
He's admin on his own VM, because I want him to learn "Dad, how do I do this?" and then do it for himself, rather than "Dad, it says it needs your password again."
Last year we focused on Invent Your Own Computer Games With Python, http://inventwithpython.com/. It's a fine tutorial, and he/we got through as far as the hangman game. This summer I want to take a more broad perspective, so we'll probably work a little more holistically, sometimes focusing on the little things we're doing to get something working. Like, what is this shell…
I recently had a kid that wanted to program as well. He's about 12. Wanted to program games, but didn't get very far in a directX book.
I had a couple choices for him, due to some requirements:
1) Something easy to install or didn't have lots of things to install
2) Something with a all-in-one gaming library
3) Something with some sort of community around it.
4) It'd be nice if there was a book for it.
So with those there, there was:
Ruby and HacketyHack. http://hacketyhack.heroku.com/ It also has a app framework called shoes that you can use to build both games and apps. However, since _why left, all this requires a lot of hand hold to set up.
Lua and Love. http://love2d.org/
Lua is an easy language to pick up as it's pretty minimal, and love's 2D engine is pretty fantastic. I've used it before and it's pretty easy to get started with, and plenty of examples, as well as a vibrant community.
Python and Pygame. http://www.pygame.org/news.html
Pygame has all of the above, and for me, the final winner, since there was a book that walks the kid along from basic text games to the graphics part. http://inventwithpython.com/
I'm trying to learn python and I picked learn python the hard way by Zed Shaw, I don't have a programming background I'm more like a sys-admin combined with a degree in Electrical - Electronic Engineer and the book is really good.
I was able to follow the book very well until I got into chapter 23 "Read Some Code", I thought it was a good idea to learn the lansom code as he created it but as I'm learning python and at the same time learning to program the concepts of packages and API's all combined together just didn't help me, so I started reading code from http://inventwithpython.com/, chapter 9 specifically where the real code start to show up; the code in the book is just one file so you can leave packages and API's until you get more background.
I providing my personal experience because I'm sure that even HN is a site for programmers there is a fair amount of guys here like me just starting in the world of programming and this can help them a bit.
BTW, if some one drops the offer I'll willing to take his place because I really want to learn python + django.
Python comes with a turtle module, which means you can do all the neat drawing stuff you could do in Logo back in the days.
Also Python's interactive console provides two helpful functions: help and dir, which let you stay in the console even when you have to look up documentation, check properties of an object or find what else is contained in an imported module. There are other shells for Python that provide other functionality like saving your session's input in a file so you can actually write entire programs in Python for later use.
Also there's http://www.inventwithpython.com/, which is aimed at children and lets them create simple games to see results early on.
My first programming language was PHP at age 15, so I never had to make the jump from BASIC, but I've seen people stick with BASIC way past its expiry date just because they were used to it, becoming increasingly frustrated with its limitations. I think Python has the advantage that you don't easily hit a wall like that because you are writing in a "real" programming language from the get-go.
If you have absolutely no experience programming, start with Python. There are three things to learn when programming: 1) language syntax, 2) concepts (conditionals, logic gates, loops, etc.), and 3) how to solve problems.
What makes python a good choice is that you don't have to spend too much overhead learning language syntax in order to implement concepts, and you'll easily be able to keep the learning of those two items separate.
Once you have a strong foundation in concepts, you can much more easily pick up a different language. The biggest downfall there is that if you decide to later learn Ruby or JavaScript, you might approach a solution as, "This is how I would do it in Python." Don't fall into that trap. Learn the features each language provides and how to use them.
Since you mentioned games, there's a couple of books on the topic that are free: http://inventwithpython.com/
This repo maintains list of free programming books [0].
Many of the books at Green Tea Press[1] are available for free:
- Think Python: How To Think Like a Computer Scientist
- Think Bayes: Bayesian Statistics in Python
- Think Complexity: Exploring Complexity Science with Python
- Think Stats: Probability and Statistics for Programmers
- The Little Book of Semaphores
- Physical Modeling in MATLAB
- Learning Perl the Hard Way
few others. Do check the site.
Secondly, books by Al Sweigart[2] are also freely available. They include:
- Automate the Boring Stuff with Python[3]
- Hacking Secret Ciphers with Python
- Invent Your Own Computer Games with Python
- Making Games with Python & Pygame
[0] - https://github.com/vhf/free-programming-books
[1] - http://www.greenteapress.com/
[2] - https://inventwithpython.com/
[3] - https://automatetheboringstuff.com/