My son wants me to teach him Python

R

russ.pobox

I couldn't read every post here so don't know if this has been suggested, or if there is perhaps a better suggestion which I haven't read in this thread, but in as far as I've read I feel the need to recommend:
learnpythonthehardway.org

Knowing a little JavaScript and even allot of HTML doesn't take him out of the total noob category when it comes to programming (did someone say game programming? Hold your horses!). I took a visual basic course (which I dropped out of admittedly after 3 months) and still knew absolutely nothing, which isn't necessarily just because I'm dumb.

After eventually learning Python in incremental and sporadic episodes of free time, I did come across a few resources and by virtue of the frustrationof having taken so long to learn to code in the easiest damn programming language to learn, I found myself scrutinizing allot of the tutorials I'd been passing by.

I noticed developers.google.com somewhere up there. That's just a no no. Sorry. Maybe some of the people here are more than "pretty smart" but there'sa good chance it'll be over his head at first, and at first is a bad placeto be in over your head when you're learning the fundamentals.

I also notice Invent with python. I personally would go for 2.x rather than3 but that aside, for reasons I'm too tired to word, I didn't find it a good fit for me. I takes a "dive right in" approach and well, I never did learn to swim.

Udacity was the third suggestion I noticed. This is also a no no. I completed the cs101 udacity course which I'm sure is the course in question here, and I loved it! Really I learn crap load from it, but at every step I askedmyself, would this had helped if it was the first place I went to to learnto code? No. There were allot of gaps I noticed when looking from a complete beginners perspective and even though the course claims to has no prerequisites, I would have hated if I started with that. However that was last year and I think it was only a few months old, so it may be allot different now, I haven't checked.

I read How to think like a computer scientist, A byte of python, and even the official docs. The only one I came across that made me say "&*#! why didn't I google that?" was learnpythonthehardway.

I do think it depends a great deal on the individual, and for me personally, that style of learning was just it. For one you learn from the bottom up.It's a compulsion for some to know that that know a thing before they're brave enough to move forward. In cases where a "leap" is the only way forward, the tutor pulls you across that divide by your ankles. You feel a sense of obligation to take to his instruction. And above all, it greatly emphasizes the "learn by doing" approach, in small steps, not big projects that you end up completing just to get through it but don't learn much from.

So that's my recommendation. But all that aside, my biggest point would be,just pick one do it. As you can see if you read that, my biggest flaw was simply the lack of devotion to one path.

Game programming if he still wants to do that is another question entirely I feel. Fundamentals are fundamentals. The only variable is how long it might take him to get passed it. Even with Python, some people just never get it.
 
J

Joshua Landau

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.

Hey - Haskell is realistic [1].
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.

[1] http://xmonad.org/
 
S

Steven D'Aprano

Python-the-language has strengths that are undermined by the biases in
the culture of Python.

This implies that there are strengths in Python-the-language which are
not just missed or ignored by Python programmers immersed in the culture,
but actively (if unconsciously) fought against.

As someone immersed in that culture, and therefore at risk of being
unaware of my biases, I am *very* curious as to what you think they are,
and what strengths of Python you think I might be missing.
 
C

Cameron Simpson

| 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.

Oh good.

Please communicate entirely in animations from now on. This text
medium you're using is crude, low bandwidth, and not sparkly enough.

But regrettably, I think Rick may be on the money here. All children
want to write games. I did, my friend's son did, etc. But by starting
with something functional but crude, he will be forced to encounter
the basic tools of coding anyway.

Cheers,
--
Cameron Simpson <[email protected]>

This is not my farewell to you. My only wish is to fight as a soldier
in the battle of ideas. I shall continue to write under the heading of
'Reflections by comrade Fidel.' It will be just another weapon you can
count on. Perhaps my voice will be heard. I shall be careful.
- Fidel Castro Ruz, 18feb2008
 
S

Steven D'Aprano

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.

So is Python.

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).

I consider IDEs to be an attractive nuisance. It's like learning to be a
chef by putting food in a microwave and pushing the pre-set buttons.
 
R

rusi

This implies that there are strengths in Python-the-language which are
not just missed or ignored by Python programmers immersed in the culture,
but actively (if unconsciously) fought against.

As someone immersed in that culture, and therefore at risk of being
unaware of my biases, I am *very* curious as to what you think they are,
and what strengths of Python you think I might be missing.

[This is more of an example than a full answer]
Lets say I have a 'kid' -- son, niece, student, whatever -- and for
some reason, we, both me and 'kid', feel its important to master
regular expressions.

Now regular expressions are there everywhere -- vi, emacs, perl,
python, awk, egrep, lex, ragel ... -- and so *technically* they are
quite orthogonal to the programming language issue.
Let us also assume that as a programming language, I definitely prefer
python over perl, in particular, REs in perl and python are more or
less equipotent.

However once we go beyond the technical basics of REs to a cultural
question -- asking more intricate questions on a forum -- I expect the
following to happen.

If (s)he asks an RE question on a perl forum I expect answers that are
cute, one-liner, zany etc but in a SE sense promote bad programming.
As a (cultural) rebound from that, when the same is asked on a python
forum, (s)he may get the hi-power RE answer. He is more more likely to
get a lecture on why REs are bad.

Now from a programming/SE angle, this is fine -- certainly writing an
ugly, buggy, inefficient RE where a few lines of beautiful soup (say)
would do better is poor practice. However lets remember that mastering
RE for its own sake is our agenda in addition to mastering
programming.

In short, I am not interested in perl for its own sake, yet the path
to RE-mastery in perl-culture is shorter.

So as guardian to my ward I have a simple evaluation to make:
"learn perl + python, learn REs in both, learn to translate REs across
the two"
is more or less work than
"Do everything in python"

Common sense suggests that the second is the less-work option.
Experience (may) suggest otherwise.

So much for my toy example. Now to more directly answer your question.

Here's Richard O'Keefe on the Erlang mailing list. Note particularly
the COBOL-Scheme reference.

-----------------------------------------
Once upon a time (about 1992ish) in a land where the moles
have beaks and swim and the deer jump on their hind legs
(Australia), a certain computer science department (RMIT)
decided that Pascal had reached its use-by date. What shall
we do? What shall we replace it with? Set up a committee!
I was on the committee. We set up a short list.
(1) Scheme.
Tiny language, amazingly capable, REPL so you can try
things out, implementations for all the machines we
cared about. And Rob Hagan at Monash had shown that
you could teach students more COBOL with one semester
of Scheme and one semester of COBOL than you could
with three semesters of COBOL.
(2) Miranda.
The commercial precursor of Haskell.
Melbourne University were also looking at this (or had
already switched to it) which would make it easier to
pick up some of their students.
(3) Ada.
Close enough to Pascal that our staff were comfortable with
it and our material would not need major revision.
A better Pascal than Pascal.
Handled concurrency about as nicely as an imperative language
can.

Personal Note:
For years Ive taught programming using two languages, one FPL, one
imperative language.
FPL one of {Miranda, Gofer, Scheme, Haskell}
Imp. Lang one of {Pascal, C, Python}
If I had to do it again (and had the choice!) I would evaluate the
sets again. I would not go from 2 to 1.

------------------------------
tl;dr:

The shortest route to mastery of programming in some chosen language,
say python, may be to learn a bunch of contrasting, competing
languages. Which others and how much, needs care and experience to
decide.
 
D

Dennis Lee Bieber

I consider IDEs to be an attractive nuisance. It's like learning to be a
chef by putting food in a microwave and pushing the pre-set buttons.

Next up on Kitchen Nightmares... Python on the loose!
 
A

aliencat777

Hi,

I am an IT and Learning Research professor. I wrote a set of lessons that became a beginning programming book for my two sons. They loved it because is it was simple, hands on, and funny. It covers the basics of programming, introducing; software design, planning a game, making/getting free assets, version systems, and packaging. This course takes the beginner from ground zero to making arcade style games complete with sound, music, graphics, andan installation package in 21 lessons. It also includes vast resources in the index. It is called; "Start Here: Python 3x Programming Made Fun and Easier," and can be found at http://www.quantumsight.mobi or http://www.toonzcat.com/book.html This site also introduces graphics for web sites, animation, and games.

J.S.G, PhD
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top