My son wants me to teach him Python

Discussion in 'Python' started by John Ladasky, Jun 12, 2013.

  1. John Ladasky

    John Ladasky Guest

    Hi folks,

    My son is 17 years old. He just took a one-year course in web page design at his high school. HTML is worth knowing, I suppose, and I think he has also done a little Javascript. He has expressed an interest in eventually wanting to program 3D video games.

    For that purpose, HTML and Javascript are too limited. I hardly consider either one to be a real programming language. I want to get him started with a real applications programming language -- Python, of course. And he's ready to learn. OK, so it's not necessarily a fast enough language for theepic video games he envisions, but it's a darn good start. I'll tax his brain with a compiled language like C at some other time.

    He's a smart kid, but prefers to be shown, to be tutored, rather than having the patience to sit down and RTFM. Have any of you been down this road before? I would appreciate it if you would share your experiences, or provide resource material.

    Thanks!
     
    John Ladasky, Jun 12, 2013
    #1
    1. Advertising

  2. On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky
    <> wrote:
    > He's a smart kid, but prefers to be shown, to be tutored, rather than having the patience to sit down and RTFM. Have any of you been down this road before? I would appreciate it if you would share your experiences, or provide resource material.
    >


    Actually yes! My dad (whose name is also John) asked me the same
    question, regarding one of my siblings. I put the question to the
    list, and got back a number of excellent and most useful answers
    regarding book recommendations, and we ended up going with (if memory
    serves me) Think Python [1]. It seems to be doing fine, though I've
    overheard some issues regarding Tkinter, Python 3.3, and Debian
    Squeeze. So be aware that you may have to compile your own Python, and
    if you do, you may have to look at what modules get compiled in. But
    from my experience of building Python, that's not difficult.

    [1] http://www.greenteapress.com/thinkpython/ I think, but DNS on this
    computer is broken at the moment so I can't verify that link

    ChrisA
     
    Chris Angelico, Jun 12, 2013
    #2
    1. Advertising

  3. On Thu, Jun 13, 2013 at 6:23 AM, Joel Goldstick
    <> wrote:
    >
    >
    >
    > On Wed, Jun 12, 2013 at 4:02 PM, Chris Angelico <> wrote:
    >>
    >> On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky
    >> <> wrote:
    >> > He's a smart kid, but prefers to be shown, to be tutored, rather than
    >> > having the patience to sit down and RTFM. Have any of you been down this
    >> > road before? I would appreciate it if you would share your experiences, or
    >> > provide resource material.
    >> >

    >
    >
    > There is a google course in python on videos. I believe it has time outs
    > for doing assignments. Here is where you go to get started
    > https://developers.google.com/edu/python/


    Went digging to see what version they support, and found it - buried -
    and with some FUD:

    https://developers.google.com/edu/python/set-up
    "For Google's Python Class, you want a python version that is 2.4 or
    later, and avoiding the 3.x versions for now is probably best."

    I would recommend going with Python 3, preferably 3.3, because that's
    the future of Python. Unless you have a good reason for sticking with
    2.x, go with 3.x.

    ChrisA
     
    Chris Angelico, Jun 12, 2013
    #3
  4. John Ladasky

    Ethan Furman Guest

    While I agree with Chris that 3.x is best, there is a free class from Udacity that is actually pretty good, even if it
    does target Python2 (.7 I believe).

    https://www.udacity.com/course/cs101

    --
    ~Ethan~
     
    Ethan Furman, Jun 12, 2013
    #4
  5. John Ladasky

    John Ladasky Guest

    On Wednesday, June 12, 2013 8:34:15 PM UTC, Chris Angelico wrote:
    >Unless you have a good reason for sticking with 2.x, go with 3.x.


    I agree, Chris, I will be teaching my son Python 3 from the start. In fact, I'm in the middle of a messy upgrade of my own computer to get everythingready for Python 3. Upgrading my son's machine should be less painful, because he doesn't need cutting-edge versions of scipy, wxPython or Matplotlib... but I do hope that some of the game packages, like PyGame, are Python 3-compatible. I haven't checked into that yet.
     
    John Ladasky, Jun 12, 2013
    #5
  6. John Ladasky

    John Ladasky Guest

    On Wednesday, June 12, 2013 8:02:46 PM UTC, Chris Angelico wrote:

    > [1] http://www.greenteapress.com/thinkpython/ I think, but DNS on this
    > computer is broken at the moment so I can't verify that link


    Your link is correct, thank you!
     
    John Ladasky, Jun 12, 2013
    #6
  7. John Ladasky

    Ian Kelly Guest

    On Wed, Jun 12, 2013 at 4:06 PM, John Ladasky
    <> wrote:
    > On Wednesday, June 12, 2013 8:34:15 PM UTC, Chris Angelico wrote:
    >>Unless you have a good reason for sticking with 2.x, go with 3.x.

    >
    > I agree, Chris, I will be teaching my son Python 3 from the start. In fact, I'm in the middle of a messy upgrade of my own computer to get everything ready for Python 3. Upgrading my son's machine should be less painful, because he doesn't need cutting-edge versions of scipy, wxPython or Matplotlib... but I do hope that some of the game packages, like PyGame, are Python 3-compatible. I haven't checked into that yet.


    I've used pygame with Python 3, so it's definitely compatible.
     
    Ian Kelly, Jun 12, 2013
    #7
  8. On Thu, Jun 13, 2013 at 6:34 AM, Chris Angelico <> wrote:
    > Went digging to see what version they support, and found it - buried -
    > and with some FUD:
    >
    > https://developers.google.com/edu/python/set-up
    > "For Google's Python Class, you want a python version that is 2.4 or
    > later, and avoiding the 3.x versions for now is probably best."
    >
    > I would recommend going with Python 3, preferably 3.3, because that's
    > the future of Python. Unless you have a good reason for sticking with
    > 2.x, go with 3.x.


    BTW, just to clarify this statement: I don't object to there being
    courses for 2.x that don't touch 3.x (though I'd still use this as a
    strong criterion in choosing a course); the bit I object to is the
    vague FUD about "avoiding" 3.x, as though that branch isn't stable
    yet. If it simply said "For Google's Python Class, you want a Python
    version between 2.4 and 2.7.x", that'd be much better.

    ChrisA
     
    Chris Angelico, Jun 13, 2013
    #8
  9. John Ladasky

    Rick Johnson Guest

    On Wednesday, June 12, 2013 2:46:13 PM UTC-5, John Ladasky wrote:
    > [...]
    > He's a smart kid, but prefers to be shown, to be tutored,
    > rather than having the patience to sit down and RTFM.
    > Have any of you been down this road before? I would
    > appreciate it if you would share your experiences, or
    > provide resource material.


    Hello John.

    I'm going to suggest a completely different path to enlightenment for the lad. A path that has the potential for semi-instant gratification whilst also humbling the boy to the grim realities of computer graphics and application development. *evil grin*

    Since your son has zero experience with both graphical and application based programming i would suggest starting at (near) the very bottom of the GUIspectrum, which, in the Python world would be the Tkinter Canvas.

    Some people would suggest starting with "turtle.py", and yes this is a goodsuggestion, however, i highly suggest that he begin by coding a python turtle program HIMSELF.

    But first i would let him use the existing turtle program, play around withit, understand some of the commands, etc... but whatever you do: DON'T LETHIM SEE THE SOURCE CODE! Then i would ask him to think about how this program works in a general manner (psst: remember, he's not a programmer "yet"!).

    For starters we know we need to create a "window" (this is where you would explain what a GUI library is. And to satisfy the instant gratification, weshould create a window very soon.

    After we can create a blank window, we should take this opportunity to quickly cover some of the common subwidgets that can be placed into a window, such as:: "Text", "Entry", "Label", "Button", etc.., and maybe some simple code to display each of them will be fun.

    Now that we know "generally" what a GUI is, and we know about windows and sub-widgets, it's time to refocus on the turtle program. We will need to create a drawing area within the window for which to draw the turtle -- enter the Tk::Canvas!

    Next we can take a slight tangential meandering and learn about common Canvas primitives (like rectangles and lines and whatever!) Then we should decide which primitive would best suit a turtle, and draw that primitive.

    Once we have drawn the turtle, we quickly realize that it needs to sprout some legs and move around. This is where the fun really starts to begin... Ithink you can figure out where to go from there. Math functions, event processing... fun times!

    After he gets a simple turtle program running i would point out that even though he went to quite bit of work to solve this fairly simple problem, most of the really difficult code, like turning pixels on and off, drawing andordering GUI windows, event loops, etc, etc... has been abstracted away into multiple layers of low level code. Even though the starting point of our project could be considered "slightly low level" relative to Python, there are vast libraries of millions of lines of code, layered one atop the other, making all this possible.

    The point of this exercise would be to get him thinking about solving problems instead of just reaching for a prepackaged library, and then not fully appreciating (or furthermore, truly *understanding*) the vast scope of *real* software design.

    Anybody can grab PyGame and start making simple games, but do they understand what is going on under the hood? I don't think they need to understand the science behind the internal combustion engine, however, if they cannot explain the basics of how the major components like: electrical, fuel, suspension, drive-train, braking, etc... work, then they lack a fundamental insight into solving complex problems that can arise later.

    For instance, if you hear a knocking sound whilst driving but the sound is absent whist idling, you can deduce that the problem most likely exists in the drive-train. From there you'd need to focus in at an even smaller levelof detail -- but you could not come to that conclusion if you did not possess (at minimum) a basic understanding of the underlying component systems.

    Of course some might say: "Rick, why go to all that trouble when you couldtraumatize him with openGL instead". And to that i would reply: "Save OpenGL for lesson number two!"

    *wink*
     
    Rick Johnson, Jun 13, 2013
    #9
  10. On Thu, Jun 13, 2013 at 2:00 PM, Rick Johnson
    <> wrote:
    > On Wednesday, June 12, 2013 2:46:13 PM UTC-5, John Ladasky wrote:
    >> [...]
    >> He's a smart kid, but prefers to be shown, to be tutored,
    >> rather than having the patience to sit down and RTFM.
    >> Have any of you been down this road before? I would
    >> appreciate it if you would share your experiences, or
    >> provide resource material.

    >
    > Hello John.
    >
    > I'm going to suggest a completely different path to enlightenment for the lad. A path that has the potential for semi-instant gratification whilst also humbling the boy to the grim realities of computer graphics and application development. *evil grin*
    >
    > Since your son has zero experience with both graphical and application based programming i would suggest starting at (near) the very bottom of the GUI spectrum, which, in the Python world would be the Tkinter Canvas.



    No. Definitely not. Programming does NOT begin with a GUI. It begins
    with something *simple*, so you're not stuck fiddling around with the
    unnecessary. On today's computers, that usually means console I/O
    (actually console output, with console input coming along much later).

    ChrisA
     
    Chris Angelico, Jun 13, 2013
    #10
  11. John Ladasky

    Rick Johnson Guest

    On Wednesday, June 12, 2013 11:08:44 PM UTC-5, Chris Angelico wrote:

    > No. Definitely not. Programming does NOT begin with a GUI. It begins
    > with something *simple*, so you're not stuck fiddling around with the
    > unnecessary. On today's computers, that usually means console I/O
    > (actually console output, with console input coming along much later).


    Chris, you're a dinosaur, only thing is, somebody forgot to tell you.

    *Everything* these days revolves around graphical interfaces. The console, which was once the dark and mystical battlefield where knighted geeks would slay the plagues of exception demons, has been reduced to a mere: "little black box of nostalgia".

    1. Rock is dead...
    2. The console is dead...
    3. Welcome to the 21st century Chris!

    PS: Although i'll bet you think the "rock is dead" mantra is relatively recent, nope! Jim Morrison was singing about it waaay back in 1969!
     
    Rick Johnson, Jun 13, 2013
    #11
  12. On Thu, Jun 13, 2013 at 2:47 PM, Rick Johnson
    <> wrote:
    > On Wednesday, June 12, 2013 11:08:44 PM UTC-5, Chris Angelico wrote:
    >
    >> No. Definitely not. Programming does NOT begin with a GUI. It begins
    >> with something *simple*, so you're not stuck fiddling around with the
    >> unnecessary. On today's computers, that usually means console I/O
    >> (actually console output, with console input coming along much later).

    >
    > Chris, you're a dinosaur, only thing is, somebody forgot to tell you.
    >
    > *Everything* these days revolves around graphical interfaces. The console, which was once the dark and mystical battlefield where knighted geeks would slay the plagues of exception demons, has been reduced to a mere: "little black box of nostalgia".
    >
    > 1. Rock is dead...
    > 2. The console is dead...
    > 3. Welcome to the 21st century Chris!
    >
    > PS: Although i'll bet you think the "rock is dead" mantra is relatively recent, nope! Jim Morrison was singing about it waaay back in 1969!


    1. Rock is not dead, remove the covering paper and you'll find it's
    happily smashed scissors.

    2. The console is healthy. It's often now seen alongside a GUI, with
    neither being by any means dead. And "glass teletype" is still the
    easiest UI to program for in any language.

    3. Thanks! I've been here for a while, but it's still nice to be made welcome.

    ChrisA
     
    Chris Angelico, Jun 13, 2013
    #12
  13. John Ladasky

    Andrew Berg Guest

    On 2013.06.12 23:47, Rick Johnson wrote:
    > 1. Rock is dead...

    Nah, he just does movies now.

    Seriously, though, GUI stuff might be okay to learn early on since he's interested in making games. There's no reason to focus heavily on it
    this early, however.
    --
    CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1
     
    Andrew Berg, Jun 13, 2013
    #13
  14. John Ladasky

    Ethan Furman Guest

    On 06/12/2013 10:30 PM, Modulok wrote:
    >
    > If he wants to learn game programming, teach him game programming. [. . .]


    Oh, that reminds me:

    http://inventwithpython.com/

    Which has a number of free books; the two of interest for your son being:

    Invent Your Own Computer Games with Python

    Making Games with Python & Pygame

    Both are for Python 3.x.

    --
    ~Ethan~
     
    Ethan Furman, Jun 13, 2013
    #14
  15. On Thu, Jun 13, 2013 at 6:35 PM, TP <> wrote:
    > Also Chris has an "unnatural" abhorrence of Python 2.7 :) --- at least as
    > far as learning Python books.


    Thanks for hunting that thread down, I probably should have back when
    I mentioned it :)

    As to my abhorrence of Py2 - I don't hate the language (and do use it
    at times), but if someone's going to learn programming, s/he should
    really learn from something with native Unicode strings. Yes, you
    could use Python 2 and open with some future directives, but unless
    the course/book is written with that in mind, you'll end up having to
    unlearn and relearn to master true Unicode handling. No point doing
    that when you can just learn on Python 3!

    ChrisA
     
    Chris Angelico, Jun 13, 2013
    #15
  16. John Ladasky

    rusi Guest

    On Jun 13, 12:46 am, John Ladasky <> wrote:
    > Hi folks,
    >
    > My son is 17 years old.  He just took a one-year course in web page design at his high school.  HTML is worth knowing, I suppose, and I think hehas also done a little Javascript.  He has expressed an interest in eventually wanting to program 3D video games.
    >
    > For that purpose, HTML and Javascript are too limited.  I hardly consider either one to be a real programming language.  I want to get him started with a real applications programming language -- Python, of course.  And he's ready to learn.  OK, so it's not necessarily a fast enough language for the epic video games he envisions, but it's a darn good start.  I'll tax his brain with a compiled language like C at some other time.
    >
    > He's a smart kid, but prefers to be shown, to be tutored, rather than having the patience to sit down and RTFM.  Have any of you been down this road before?  I would appreciate it if you would share your experiences, orprovide resource material.
    >
    > Thanks!


    Some views of mine (controversial!).

    Python is at least two things, a language and a culture.
    As a language its exceptionally dogma-neutral.
    You can do OO or FP, throwaway one-off scripts or long-term system
    building etc

    However as a culture it seems to prefer the OO style to the FP style.
    This is unfortunate given that OO is on the down and FP is on a rise.
    Some thoughts re OOP: http://blog.languager.org/2012/07/we-dont-need-no-ooooo-orientation-4.html

    So my suggestion is use some rigorous FPL like Haskell to learn/teach
    programming.
    After that you can switch to python or some other realistic language.

    Note: I have some serious reservations regarding Haskell
    http://blog.languager.org/2012/08/functional-programming-philosophical.html
    Nevertheless it seems to be the best there is at the moment.

    tl;dr: Haskell is in 2013 what Pascal was in 1970 -- good for
    programming pedagogy.
     
    rusi, Jun 13, 2013
    #16
  17. John Ladasky

    Roy Smith Guest

    In article
    <>,
    rusi <> wrote:

    > Python is at least two things, a language and a culture.


    This is true of all languages. Hang out on the PHP, Ruby, Python, etc,
    forums and you quickly learn that the cultures are as different (or more
    so) than the languages.

    The same is true for the human race. The human race is what it is
    partly because of the DNA we mix-and-match every generation, but also
    because of the information we pass from brain to brain. Neither one
    tells the full story of what we are.
     
    Roy Smith, Jun 13, 2013
    #17
  18. John Ladasky

    rusi Guest

    On Jun 13, 6:07 pm, Roy Smith <> wrote:
    > In article
    > <>,
    >
    >  rusi <> wrote:
    > > Python is at least two things, a language and a culture.

    >
    > This is true of all languages.  Hang out on the PHP, Ruby, Python, etc,
    > forums and you quickly learn that the cultures are as different (or more
    > so) than the languages.


    Umm... Of course. I dont know though how that relates to the OP's
    question.
    So let me try state my point differently:

    Python-the-language has strengths that are undermined by the biases in
    the culture of Python.
    A father wanting to give his son the best may want to apply correcting
    anti-biases.
     
    rusi, Jun 13, 2013
    #18
  19. John Ladasky

    Tomasz Rola Guest

    On Thu, 13 Jun 2013, rusi wrote:

    > On Jun 13, 12:46 am, John Ladasky <> wrote:
    > > Hi folks,
    > >
    > > My son is 17 years old.  He just took a one-year course in web page
    > > design at his high school.  HTML is worth knowing, I suppose, and I
    > > think he has also done a little Javascript.  He has expressed an
    > > interest in eventually wanting to program 3D video games.

    [...]
    >
    > Some views of mine (controversial!).


    Not really :)

    >
    > Python is at least two things, a language and a culture.
    > As a language its exceptionally dogma-neutral.
    > You can do OO or FP, throwaway one-off scripts or long-term system
    > building etc
    >
    > However as a culture it seems to prefer the OO style to the FP style.
    > This is unfortunate given that OO is on the down and FP is on a rise.
    > Some thoughts re OOP: http://blog.languager.org/2012/07/we-dont-need-no-ooooo-orientation-4.html
    >
    > So my suggestion is use some rigorous FPL like Haskell to learn/teach
    > programming.
    > After that you can switch to python or some other realistic language.


    If he (son) learns Haskell, he may as well stay with it, because it's
    quite decent lang as far as I can tell. And it's compiled, too.

    I would also consider Racket, which is a Scheme superset. It too, comes
    with compiler/JIT, plus IDE, plus libraries plus I understand examples
    from "Structure and Interpretation of Computer Programs",
    ( http://mitpress.mit.edu/sicp/ ) can be run on it. I have heard some
    folks are doing real life stuff with it, too and IDE might help beginner a
    lot (this one is very nice, not just magnified editor).

    > Note: I have some serious reservations regarding Haskell
    > http://blog.languager.org/2012/08/functional-programming-philosophical.html
    > Nevertheless it seems to be the best there is at the moment.


    Mee too! For this reason I am exploring Ocaml and SML.

    Regards,
    Tomasz Rola

    --
    ** A C programmer asked whether computer had Buddha's nature. **
    ** As the answer, master did "rm -rif" on the programmer's home **
    ** directory. And then the C programmer became enlightened... **
    ** **
    ** Tomasz Rola mailto: **
     
    Tomasz Rola, Jun 13, 2013
    #19
  20. John Ladasky

    Mark Janssen Guest

    > Despite not want to RTFM as you say, you might set him in front of
    > VPython, type


    I totally forgot PyGame -- another likely source of self-motivated
    learning for a teen programmer.
    --
    MarkJ
    Tacoma, Washington
     
    Mark Janssen, Jun 13, 2013
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. B.julien
    Replies:
    0
    Views:
    414
    B.julien
    Apr 9, 2004
  2. Tomasz Rola

    Re: My son wants me to teach him Python

    Tomasz Rola, Jun 13, 2013, in forum: Python
    Replies:
    2
    Views:
    110
  3. Joshua Landau

    Re: My son wants me to teach him Python

    Joshua Landau, Jun 13, 2013, in forum: Python
    Replies:
    17
    Views:
    189
    Rick Johnson
    Jun 16, 2013
  4. Cameron Simpson

    Re: My son wants me to teach him Python

    Cameron Simpson, Jun 16, 2013, in forum: Python
    Replies:
    0
    Views:
    136
    Cameron Simpson
    Jun 16, 2013
  5. Ian Kelly
    Replies:
    0
    Views:
    112
    Ian Kelly
    Jun 17, 2013
Loading...

Share This Page