Python newbie help

S

s

Hi all,

I've recently been very interested in learning Python but I seem to
lack direction while reading the tutorials. I understand the syntax
and everything concerning the language itself but the tutorials I have
seen are merely displaying features of the language rather than
teaching you to code while reaching an end goal of a program and I
think that's been my problem with learning the language so slowly. Is
anyone aware of an online tutorial with examples that actually end up
creating a semi-useful program and not just snippets of code
displaying how the code functions?

Thanks
 
A

Alan Gauld

anyone aware of an online tutorial with examples that actually end up
creating a semi-useful program and not just snippets of code
displaying how the code functions?

How useful it is depends on how seriously you need the data but
my tutor ends up with a case study of a grammar counter. It
starts out as a commandline tool (evolved from the word counter
developed in an earlier chapter), takes it to an OO style and
finally to a GUI form using Tkinter.

Its not the last word in accuracy(!!) but is supposed to be
representative of the kind of thing a newbie who has just
finished the tutor could do for themselves...

If you buy the paper book version you get a games framework
example too which is developed into a hangman game, (and on
the CD the code for a mastermind game using the same
framework too). The framework and hangman code(with extra
comments) are available on Useless Python...

But whether you count that as useful I dunno. And its a chapter
at the end rather than being developed as you go through the
tutor (which is what you want I think?)

Anyways, pay a visit if you think it would help.
Just remember its aimed at complete beginnes to programming.

Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld
 
N

none

Your examples follow along with the same thing that I'm describing.
You have code that works and thorough descriptions that explain what's
going on but there is no end goal. I'm not learning how to write a
program, I'm learning how to write snippets of code. While I realize
that some people may like that, I need a more linear style of
tutoring.

I find that if I am told what I will be programming and then show how
to program it, I learn very fast that way. For instance:

Lesson 1: Write a simple mail reader
objective 1: connecting to the mail server
explaining everything involved with connecting with the mail
server and using sockets

objective 2: file I/O
explain how to save email and read email from previous saved
messages

and So on.

Then Lesson 2 could teach new things and then integrate them into the
mail client program.

I'm not saying the program has to be as complicated as a mail reader,
but I thought that would be a good example.
 
G

Gary Feldman

Your examples follow along with the same thing that I'm describing.
You have code that works and thorough descriptions that explain what's
going on but there is no end goal. I'm not learning how to write a
program, I'm learning how to write snippets of code.

Just out of curiousity, what other programming languages do you know? I
ask because the approach currently taken in the tutorial seems appropriate
for people who already know how to program (and that's made obvious by the
opening paragraph in the introduction). However, if you have no
programming experience, or all you know is JavaScript or perhaps Visual
Basic, then I can see how you might need more.

Gary

PS: Your posting doesn't seem to match the base note with respect to the
various author fields. It's ok to hide real email addresses, etc., but it
would be useful if there were some consistent indicator that the two posts
were written by the same person, assuming that's the case. It could just
be a signature line, even if the sig is just "A Python Novice".
 
S

s

Just out of curiousity, what other programming languages do you know? I
ask because the approach currently taken in the tutorial seems appropriate
for people who already know how to program (and that's made obvious by the
opening paragraph in the introduction). However, if you have no
programming experience, or all you know is JavaScript or perhaps Visual
Basic, then I can see how you might need more.

Gary

Well, I know VB from years ago, C/C++ and a little PHP. It's not so
much of a tutorial thing is a motivational thing for me. I want to
have an end goal when I'm learning to program with something. With
python, I have not been presented an end goal so I get bored quickly
looking at code and not putting it to use with anything more than an
example.
PS: Your posting doesn't seem to match the base note with respect to the
various author fields. It's ok to hide real email addresses, etc., but it
would be useful if there were some consistent indicator that the two posts
were written by the same person, assuming that's the case. It could just
be a signature line, even if the sig is just "A Python Novice".

Sorry about that. My NG program wasn't cooperating so I had to use
Google then I got it to cooperate and I realized that I had some of
the preferences screwed up.
 
S

s

I too am new to Python. I found a very good tutorial called Dive Into
Python <http://diveintopython.org/> that explains the idea behind the
language, which seems to be what you want. The tutorial is very
complex and thorough understanding of OOP is a prerequisite.


Dive into Python seems to be more the direction I'm looking for,
however it is not quite there yet. There does seem to be a logical
progression of lessons building into one program which I like. I will
look into it further, thanks!
 
S

s

(e-mail address removed) (s) wrote in


Thanks for the help. I will definitely look into these links very
hard but I must point out that I'm not a teenager or a beginner
programmer, just someone who has lost motivation to learn but would
like to get it back.

I just get bored with examples that don't really contribute to a
program or the like. Thanks for the link.
 
D

Dennis Lee Bieber

none fed this fish to the penguins on Monday 18 August 2003 02:49 pm:
Your examples follow along with the same thing that I'm describing.
You have code that works and thorough descriptions that explain what's
going on but there is no end goal. I'm not learning how to write a
program, I'm learning how to write snippets of code. While I realize
that some people may like that, I need a more linear style of
tutoring.

I find that if I am told what I will be programming and then show how
to program it, I learn very fast that way. For instance:
Very few /decent/ text books do what you want... Because the parts are
not related that way...

The first phase is design -- design is independent of the language
used to implement the program. Design uses more abstract concepts (for
the moment, assume use of a procedural design versus an object oriented
design).

The design describes the logic of /what/ needs to be down. The
implementation translates the /what/ into the /how/ (ie, the language
specific syntax).
Lesson 1: Write a simple mail reader

Okay... So what do you have to do to read mail (and I presume you mean
a client that interfaces to a POP3 server, and SMTP for sending)? This
doesn't involve any programming language, it is still concept level;
you need to know the POP3 protocol, have some idea of how you will
present mail (RFC821/822 or whatever has superceded them), MIME if you
plan to handle those formats, SMTP protocol for sending.

Then refine each of those parts... The POP3 server interface needs to
authenticate the user, query the server for new mail, retrieve each
message for local storage, delete messages from the server,
disconnect...

All languages (well, for the moment lets skip things like Prolog and
strictly functional languages) basically have some way to perform:

sequence of statements
conditional branching
unconditional branching (the infamous GOTO)
(and likely) subroutine/function invocations

The exact syntax for those varies from language to language, but the
concept doesn't... Describe your problem in the concept space, then map
to the language specifics... Then start picking up the more esoteric
features...

--
 
D

Dennis Lee Bieber

s fed this fish to the penguins on Tuesday 19 August 2003 05:42 am:

Thanks for the help. I will definitely look into these links very
hard but I must point out that I'm not a teenager or a beginner
programmer, just someone who has lost motivation to learn but would
like to get it back.
Whereas I'd find a text that basically follows your desired scheme to
be the boring, non-motivational one. Anything that basically says:

We are going to produce a program to do XYZ.

Here's the code for step one...

Here's the code for step two...

Here's the modifications to the code in step one to use the code in
step two...

This may be sufficient to learn the syntax of the language, but it is
not teaching me how to /think/.
I just get bored with examples that don't really contribute to a
program or the like. Thanks for the link.

Then I'd suggest you devise for yourself some project you really would
like to see/use yourself... Then try to design the logic needed for
such a program; finally when you start coding it, use the existing
tutorials and references to determine the actual syntax needed for the
operation you are trying to perform.

--
 
A

Alex Martelli

s said:
Thanks for the help. I will definitely look into these links very
hard but I must point out that I'm not a teenager or a beginner
programmer, just someone who has lost motivation to learn but would
like to get it back.

I just get bored with examples that don't really contribute to a
program or the like. Thanks for the link.

If you're keen on books that present actual, biggish, substantial
programs as the examples, try Magnue Lie Hetland's "Practical Python",
APress -- I personally prefer toy-level examples (which Magnus has
in the first half of his book -- the significant programs make up
the second half) but MLH did a great job working the "real" things
out. Don't think the book's available anywhere online, though.


Alex
 
S

s

I'm not of the opinion that these styles of teaching are bad, it's
just how I learn. Once I feel comfortable with a language and can
write a simple program, I can then branch out into the books and
tutorials that are more like references.

You may have a lower opinion of these types of books but I think
they're really beneficial for people trying to get started and helping
them branch out into something more useful.

I'm still taking in suggestions.
 
C

Clay Shirky

s said:
You may have a lower opinion of these types of books but I think
they're really beneficial for people trying to get started and helping
them branch out into something more useful.

I'm still taking in suggestions.

Have you looked at "How To Think Like A Computer Scientist?" Its a
general intro to programming, using python for the examples.

http://ibiblio.org/obp/thinkCS/python.php

-clay
 

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

Forum statistics

Threads
474,094
Messages
2,570,615
Members
47,231
Latest member
Satyam

Latest Threads

Top