Programming Tutorial for absolute beginners

  • Thread starter Clodoaldo Pinto
  • Start date
B

bill pursell

Clodoaldo said:
I'm starting a programming tutorial for absolute beginners using Python
and I would like your opinions.

http://programming-crash-course.com

Very nicely laid out. Overall, a really nice presentation. 2 minor
points:

1) in the section on the interactive interpreter you have the sentence:
"In Linux open a shell and type python (must be lower case)". It
would be nice if the word 'python' were in a different font, or perhaps

in quotes, or something. You're targetting the "absolute beginner", so
you should assume the reader is not familiar with the CLI.

2) In the section on installing, you begin with:
"Python is an interpreted, interactive, object-oriented programming
language.". The complete novice sees those words and expects
them to be explained, but there is no definition given. I would
recommend simplifying that sentence, or explaining the terms.
 
J

John Salerno

bill said:
1) in the section on the interactive interpreter you have the sentence:
"In Linux open a shell and type python (must be lower case)". It
would be nice if the word 'python' were in a different font, or perhaps

2) In the section on installing, you begin with:
"Python is an interpreted, interactive, object-oriented programming
language.". The complete novice sees those words and expects
them to be explained, but there is no definition given. I would
recommend simplifying that sentence, or explaining the terms.

I had that same thought, actually.

Also, is the section called "pretty printing" mistitled? Doesn't that
name refer to the pprint module?

It looks real nice though.
 
C

Clodoaldo Pinto

bill said:
1) in the section on the interactive interpreter you have the sentence:
"In Linux open a shell and type python (must be lower case)". It
would be nice if the word 'python' were in a different font, or perhaps
in quotes, or something. You're targetting the "absolute beginner", so
you should assume the reader is not familiar with the CLI.

Done, thanks.
2) In the section on installing, you begin with:
"Python is an interpreted, interactive, object-oriented programming
language.". The complete novice sees those words and expects
them to be explained, but there is no definition given. I would
recommend simplifying that sentence, or explaining the terms.

Ok, i will think about something, or just delete it.

Clodoaldo
 
C

Clodoaldo Pinto

John said:
Also, is the section called "pretty printing" mistitled? Doesn't that
name refer to the pprint module?
I didn't think about pprint. I used pretty in the sense of "Pleasing or
attractive in a graceful or delicate way." (dictionary)

If you have any suggestions for that page's title please do so.

Clodoaldo
 
J

John Salerno

Clodoaldo said:
I didn't think about pprint. I used pretty in the sense of "Pleasing or
attractive in a graceful or delicate way." (dictionary)

If you have any suggestions for that page's title please do so.

It may not really be that misleading, especially if you've never heard
of pprint before. But you can always call it something simple like "The
'print' statement"
 
M

malv

Looks pretty good, except for your difficult to read examples.
Don't use black backrounds with green characters.
A plain white background with black text would be a major improvement.
 
J

James

On the calculator page you describe the difference between 3.0 / 2 and
3 / 2, but an absolute beginner probably wouldn't know about the
difference between integers and floats, or even what the two terms
meant. If you don't know much about computers then the fact that they
are separate types would probably be surprising...

James
 
C

Clodoaldo Pinto

Bruno said:
Clodoaldo Pinto a écrit :

FWIW, being "interpreted" is not a feature of a language but of a given
implementation of a language - and actually, the reference
implementation (CPython) is byte-compiled, not interpreted. As for
interactivity, it comes from a program (the Python shell) that ships
with the reference implementation - not from the laguage itself.
That Python definition was taken literally from the old site's "about"
page. The new "about" page is better for the purposes of this course:

"Python is a remarkably powerful dynamic programming language that is
used in a wide variety of application domains. Python is often compared
to Tcl, Perl, Ruby, Scheme or Java. Some of its key distinguishing
features include:..."

Or the first page definition:

"Python® is a dynamic object-oriented programming language that can be
used for many kinds of software development. It offers strong support
for integration with other languages and tools, comes with extensive
standard libraries, and can be learned in a few days. Many Python
programmers report substantial productivity gains and feel the language
encourages the development of higher quality, more maintainable code."

I'm leaning towards the first page one from which i would take this
part out:

"is a dynamic object-oriented programming language"

That would leave this simple text:

"Python® can be used for many kinds of software development. It offers
strong support for integration with other languages and tools, comes
with extensive standard libraries, and can be learned in a few days.
Many Python programmers report substantial productivity gains and feel
the language encourages the development of higher quality, more
maintainable code."

Regards, Clodoaldo
 
C

Clodoaldo Pinto

James said:
On the calculator page you describe the difference between 3.0 / 2 and
3 / 2, but an absolute beginner probably wouldn't know about the
difference between integers and floats, or even what the two terms
meant. If you don't know much about computers then the fact that they
are separate types would probably be surprising...
This point is not easy to aproach. The fact is that it is necessary
that the beginner knows that there is a differerence between 3 / 2 and
3.0 / 2.

I don't want him to now about types, at least not at that stage. I used
the term "integer" for the lack of a better one and I didn't mention
"float". Any suggestions?

Regards, Clodoaldo.
 
J

James

Perhaps use the phrase "whole number" there and mention that in
programming they're called integers. Having a glossary with
definitions for things like integer, float etc etc. would be good if
when you talked about integers it linked to the glossary. And
similarly use "decimals" for floats? Less sure about that one though.
But anyway you don't need to go into the whole type thing, just
mention that Python distinguishes between doing maths with whole
numbers and decimals.
 
J

John Salerno

Clodoaldo said:
"Python is a remarkably powerful dynamic programming language that is
used in a wide variety of application domains. Python is often compared
to Tcl, Perl, Ruby, Scheme or Java. Some of its key distinguishing
features include:..."

I'd be careful with that definition for newbies though. There's nothing
more frustrating (as a newbie myself) when Python (or anything else) is
compared to something as a way to explain it, yet I have no idea what
the other things are either! A programming newbie won't know about, and
maybe won't even have heard of, those other languages.
 
B

Bruno Desthuilliers

malv a écrit :
Looks pretty good, except for your difficult to read examples.
Don't use black backrounds with green characters.
A plain white background with black text would be a major improvement.
May I suggest a system like Trac-Wiki, that knows how to display Python
code with syntax-hilighting and line-numbering ?-) (Not sure but IIRC,
MoinMoin as the same feature).
 
B

Bruno Desthuilliers

Clodoaldo Pinto a écrit :
bill pursell wrote:
(snip)

Ok, i will think about something, or just delete it.

FWIW, being "interpreted" is not a feature of a language but of a given
implementation of a language - and actually, the reference
implementation (CPython) is byte-compiled, not interpreted. As for
interactivity, it comes from a program (the Python shell) that ships
with the reference implementation - not from the laguage itself.

This leaves us with "Python is an object-oriented programming language",
which is not 100% accurate since Python - even if strongly OO - also
supports the procedural and functional paradigms !-)
 
D

Duncan Smith

James said:
Perhaps use the phrase "whole number" there and mention that in
programming they're called integers. Having a glossary with
definitions for things like integer, float etc etc. would be good if
when you talked about integers it linked to the glossary. And
similarly use "decimals" for floats? Less sure about that one though.
But anyway you don't need to go into the whole type thing, just
mention that Python distinguishes between doing maths with whole
numbers and decimals.

In general they are integers, and "integer" is not a Python type, so I
don't see a problem with the term. The problem I saw was that there was
no explanation for the returned value. Using the term "decimal" is
probably a bad idea, given Python decimals. But I'm not sure you need
to come up with a suitable term until you actually get round to
explaining types (at which point the problem disappears).

Duncan
 
C

Clodoaldo Pinto

John said:
I'd be careful with that definition for newbies though. There's nothing
more frustrating (as a newbie myself) when Python (or anything else) is
compared to something as a way to explain it, yet I have no idea what
the other things are either! A programming newbie won't know about, and
maybe won't even have heard of, those other languages.

Good point. I used the Python site front page definition without the
object oriented thing.

Regars, Clodoaldo
 
J

James

If you're serious about this being a real introduction for someone who
knows nothing, then you might want to start off by explaining what a
programming language is (and why there are more than one) and then
what a standard library is - perhaps explain it in terms of a large
set of tools you can use straight away?

James
 
C

Clodoaldo Pinto

Duncan said:
In general they are integers, and "integer" is not a Python type, so I
don't see a problem with the term. The problem I saw was that there was
no explanation for the returned value.

How would I explain that 3 / 2 is 1 without entering the type realm?
What if I say that if one don't use the point the interpreter will also
not use it? Would i be laying? Isn't it better to just let it go? I
think the typical non programmer newbie just don't care two much about
reasons as long as there is a clear rule. No point in the question then
no point in the answer.
Using the term "decimal" is
probably a bad idea, given Python decimals. But I'm not sure you need
to come up with a suitable term until you actually get round to
explaining types (at which point the problem disappears).

As I think float is scaring I changed it in the program comments where
it appeared for decimal. I don't worry about precision as much as I
worry about fluidity. I don't want anyone stoping to consult a
dictionary or a glossary.

Now the integer versus whole. As a non native english speaker I don't
know what sounds less mathematical and more natural. I changed integer
to whole following the previous suggestion but I really don't know.

Regards, Clodoaldo
 
D

Duncan Smith

Clodoaldo said:
How would I explain that 3 / 2 is 1 without entering the type realm?

Well you said something like "it returns an integer" without explaining
why the returned integer was 1 rather than, say, 10. So you probably
need to explain what integer division is, e.g.
http://mathworld.wolfram.com/IntegerDivision.html.
What if I say that if one don't use the point the interpreter will also
not use it? Would i be laying? Isn't it better to just let it go?

I reckon letting it go would lead to confusion. If I didn't know
already, I'd want to know why it returned 1. You can explain that
without referring to types, but just saying e.g. that ordinary division
is performed if the numerator or denominator is followed by a decimal point.

But as you use conversions to float in order to avoid integer division
in your code examples, it might be best to explain what's going on, even
if you do have to explain the relevant types.

I
think the typical non programmer newbie just don't care two much about
reasons as long as there is a clear rule. No point in the question then
no point in the answer.

I can't imagine anyone (who doesn't already know) looking at the example
and not wondering why it returned 1 rather than something else.
As I think float is scaring I changed it in the program comments where
it appeared for decimal. I don't worry about precision as much as I
worry about fluidity. I don't want anyone stoping to consult a
dictionary or a glossary.

Now the integer versus whole. As a non native english speaker I don't
know what sounds less mathematical and more natural. I changed integer
to whole following the previous suggestion but I really don't know.

Integer is more mathematical, and more precise. I just looked up some
definitions for "whole number", and found it can apparently mean
positive integer, non-negative integer, or integer. Maybe you can use
integer and just put "whole number" in brackets after it, the first time
you use it; as a vague definition? But describing the relevant types
and integer division might make your later examples clearer.

Duncan
 

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