Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > My son wants me to teach him Python

Reply
Thread Tools

My son wants me to teach him Python

 
 
John Ladasky
Guest
Posts: n/a
 
      06-12-2013
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!
 
Reply With Quote
 
 
 
 
Chris Angelico
Guest
Posts: n/a
 
      06-12-2013
On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky
<(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Chris Angelico
Guest
Posts: n/a
 
      06-12-2013
On Thu, Jun 13, 2013 at 6:23 AM, Joel Goldstick
<(E-Mail Removed)> wrote:
>
>
>
> On Wed, Jun 12, 2013 at 4:02 PM, Chris Angelico <(E-Mail Removed)> wrote:
>>
>> On Thu, Jun 13, 2013 at 5:46 AM, John Ladasky
>> <(E-Mail Removed)> 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
 
Reply With Quote
 
Ethan Furman
Guest
Posts: n/a
 
      06-12-2013
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~
 
Reply With Quote
 
John Ladasky
Guest
Posts: n/a
 
      06-12-2013
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.
 
Reply With Quote
 
John Ladasky
Guest
Posts: n/a
 
      06-12-2013
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!
 
Reply With Quote
 
Ian Kelly
Guest
Posts: n/a
 
      06-12-2013
On Wed, Jun 12, 2013 at 4:06 PM, John Ladasky
<(E-Mail Removed)> 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.
 
Reply With Quote
 
Chris Angelico
Guest
Posts: n/a
 
      06-12-2013
On Thu, Jun 13, 2013 at 6:34 AM, Chris Angelico <(E-Mail Removed)> 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
 
Reply With Quote
 
Rick Johnson
Guest
Posts: n/a
 
      06-13-2013
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*





 
Reply With Quote
 
Chris Angelico
Guest
Posts: n/a
 
      06-13-2013
On Thu, Jun 13, 2013 at 2:00 PM, Rick Johnson
<(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Questions on Using Python to Teach Data Structures and Algorithms efrat Python 14 11-09-2007 03:36 AM
Problem of not knowing a famous Star Email Adress, if one of you know him please drop him a note Diplom Kaufmann Hinrichs - Siegert, Knut Computer Support 0 10-12-2007 07:12 PM
Re: Questions on Using Python to Teach Data Structures and Algorithms Brendon Towle Python 8 09-29-2006 02:37 PM
Re: Questions on Using Python to Teach Data Structures and Algorithms Brendon Towle Python 4 09-28-2006 05:16 PM
Questions on Using Python to Teach Data Structures and Algorithms efrat Python 2 09-28-2006 11:42 AM



Advertisments