473,395 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Programming Tutorial for absolute beginners

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

http://programming-crash-course.com

Regards, Clodoaldo Pinto

Apr 7 '06 #1
26 2353
Clodoaldo Pinto wrote:
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.

Apr 7 '06 #2
bill pursell wrote:
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
<code>python</code> would be good there.
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.
Apr 7 '06 #3
bill pursell wrote:
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

Apr 7 '06 #4
John Salerno wrote:

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

Apr 7 '06 #5
For tutorial in Windows, I think it is better to use the more
user-friendly interpreter from
http://activestate.com/store/languag...d=ActivePython.
Advise the user to just click on the "Next" button without submitting
the optional contact information.

My $0.02

Apr 8 '06 #6
Clodoaldo Pinto wrote:
John Salerno wrote:
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.


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"
Apr 8 '06 #7
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.

Apr 8 '06 #8
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).
Apr 8 '06 #9
Clodoaldo Pinto a écrit :
bill pursell wrote:

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


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 !-)
Apr 8 '06 #10
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

On 7 Apr 2006 12:45:48 -0700, Clodoaldo Pinto <cl*************@gmail.com> wrote:
I'm starting a programming tutorial for absolute beginners using Python
and I would like your opinions.

http://programming-crash-course.com

Regards, Clodoaldo Pinto

--
http://mail.python.org/mailman/listinfo/python-list

Apr 8 '06 #11
Bruno Desthuilliers wrote:
Clodoaldo Pinto a écrit :
bill pursell wrote:

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


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

Apr 8 '06 #12
James wrote:
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.

Apr 8 '06 #13
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.

On 8 Apr 2006 09:02:22 -0700, Clodoaldo Pinto <cl*************@gmail.com> wrote:
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.

--
http://mail.python.org/mailman/listinfo/python-list

Apr 8 '06 #14
Clodoaldo Pinto wrote:
"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.
Apr 8 '06 #15
James wrote:
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
Apr 8 '06 #16
John Salerno wrote:
Clodoaldo Pinto wrote:
"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.


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

Regars, Clodoaldo

Apr 8 '06 #17
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

On 8 Apr 2006 11:53:34 -0700, Clodoaldo Pinto <cl*************@gmail.com> wrote:
John Salerno wrote:
Clodoaldo Pinto wrote:
"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.


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

Regars, Clodoaldo

--
http://mail.python.org/mailman/listinfo/python-list

Apr 8 '06 #18
Duncan Smith wrote:
James wrote:
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.


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

Apr 8 '06 #19
Clodoaldo Pinto wrote:
Duncan Smith wrote:
James wrote:
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.

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


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
Apr 9 '06 #20

Clodoaldo Pinto wrote:
James wrote:
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.


Here is a idea. I am not sure if it is a good idea, but you can compare
it with the other suggestions for resolving this dilemma.

We know that Python is in the process of changing the division
operator. The main reason for the change is that the current approach
is not intuitive to a newcomer (whether experienced or not).

Why not think to the future, and do it like this. Instruct the reader
to enter 'from __future__ import division'. You do not have to explain
the details, just say that this is the way division will work in the
future, and this statement will eventually not be required.

Then your example will show that 3/2 = 1.5, which is what they would
expect.

Then you can mention that, if they just want the integer portion, they
can use int(3/2). I think that most people with the slightest
understanding of basic arithmetic will relate to this without a
problem.

My 2c

Frank Millman

Apr 9 '06 #21
Duncan Smith wrote:

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 changed the comments in the first program that uses float() to:

# The raw_input() function asks the user for a text
# As a text can't be multiplied or divided the
# float() function tranforms the text into a decimal number


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


Now it says "integer (whole number)" followed by a link to a forum post
where this issue can be discussed.
http://programming-crash-course.com/...float_division

Regards, Clodoaldo

Apr 9 '06 #22
Frank Millman wrote:

We know that Python is in the process of changing the division
operator. The main reason for the change is that the current approach
is not intuitive to a newcomer (whether experienced or not).

Why not think to the future, and do it like this. Instruct the reader
to enter 'from __future__ import division'. You do not have to explain
the details, just say that this is the way division will work in the
future, and this statement will eventually not be required.

Then your example will show that 3/2 = 1.5, which is what they would
expect.

Then you can mention that, if they just want the integer portion, they
can use int(3/2). I think that most people with the slightest
understanding of basic arithmetic will relate to this without a
problem.

I included your suggestion in the forum topic that is linked from the
division paragraph:
http://programming-crash-course.com/...float_division

Apr 9 '06 #23
Clodoaldo Pinto wrote:
Duncan Smith wrote:
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 changed the comments in the first program that uses float() to:

# The raw_input() function asks the user for a text
# As a text can't be multiplied or divided the
# float() function tranforms the text into a decimal number


Hmmm, maybe a picky point for a newbie, but since there actually is a
decimal module now, you might want to change the description of float().
Apr 9 '06 #24
In <11**********************@i40g2000cwc.googlegroups .com>, Frank Millman
wrote:
Why not think to the future, and do it like this. Instruct the reader
to enter 'from __future__ import division'. You do not have to explain
the details, just say that this is the way division will work in the
future, and this statement will eventually not be required.

Then your example will show that 3/2 = 1.5, which is what they would
expect.

Then you can mention that, if they just want the integer portion, they
can use int(3/2). I think that most people with the slightest
understanding of basic arithmetic will relate to this without a
problem.


Or instead of converting the `float` back to an `int`, they can use
integer division: ``3 // 2``

Ciao,
Marc 'BlackJack' Rintsch
Apr 10 '06 #25

Marc 'BlackJack' Rintsch wrote:
In <11**********************@i40g2000cwc.googlegroups .com>, Frank Millman
wrote:
Then you can mention that, if they just want the integer portion, they
can use int(3/2). I think that most people with the slightest
understanding of basic arithmetic will relate to this without a
problem.


Or instead of converting the `float` back to an `int`, they can use
integer division: ``3 // 2``


I had thought of that. The reason I did not suggest it is that, as I
understand it, this tutorial is not about how to learn Python, it is
about teaching programming to the absolute beginner.

I imagine (hope I am not making invalid assumptions here) that Python
was chosen as a base because it is easy and intuitive to learn, and in
most cases it is. It just happens that division is one area where it is
a bit awkward.

The // syntax is specific to Python. I don't think you are helping the
absolute beginner by forcing them to understand what is going on here.
On the other hand, int(x) is a basic mathematical concept (extract the
portion to the left of the decimal point) that is shared by several
languages and is fairly easy to understand.

My 2c (I am up to 4c now)

Frank

Apr 11 '06 #26
Frank Millman wrote:
Marc 'BlackJack' Rintsch wrote:
In <11**********************@i40g2000cwc.googlegroups .com>, Frank Millman
wrote:
Then you can mention that, if they just want the integer portion, they
can use int(3/2). I think that most people with the slightest
understanding of basic arithmetic will relate to this without a
problem.
Or instead of converting the `float` back to an `int`, they can use
integer division: ``3 // 2``


I had thought of that. The reason I did not suggest it is that, as I
understand it, this tutorial is not about how to learn Python, it is
about teaching programming to the absolute beginner.


Right !!

I imagine (hope I am not making invalid assumptions here) that Python
was chosen as a base because it is easy and intuitive to learn, and in
most cases it is. It just happens that division is one area where it is
a bit awkward.


Right again !!

Although the Python way is almost always easy to learn I won't be
pythonic (as in specific to Python) where it won't help.

Regards, Clodoaldo

Apr 11 '06 #27

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Tozer | last post by:
On http://www.phpdeveloper.org/section/tutorial/43 there is what seems like a good tutorial for a beginner but there is no mention of whether it should all be within one .html file, one .php file,...
52
by: Tony Marston | last post by:
Several months ago I started a thread with the title "What is/is not considered to be good OO programming" which started a long and interesting discussion. I have condensed the arguments into a...
38
by: BORT | last post by:
Please forgive me if this is TOO newbie-ish. I am toying with the idea of teaching my ten year old a little about programming. I started my search with something like "best FREE programming...
4
by: Midhun K Menon | last post by:
Is there anyone who could direct me to an absolute beginners course in Windows Programming using C++? Links would be more welcome than Book names, because much of the foreign books aren't locally...
7
by: Luc The Perverse | last post by:
Hello! I am looking for a beginners tutorial on how to program for windows in C. I guess this is windows API? I have never written outside of VC++ for windows, and can't find any examples. I...
6
by: William Foster | last post by:
Does anyone know of a good online tutorial for C# focused on beginners. I have been to many great sites like csharpfriends, csharp-corner etc looking for good tutorials and have had no luck. Any...
7
by: | last post by:
1) Downloading sample code and playing with it? 2) Reading books and trying to follow them? Any other ideas? I have always wanted to learn programming, just don't know hot to go about it. ...
12
by: Harry | last post by:
Hi, I am a system administrator who wants to move to Web App. development. I have read quite a lot articles regarding .net framework and visual studio.net and feel comfortable to start learning...
29
by: Martin Schmied | last post by:
Dear folks I'm looking for good sites/material for this topic: Introduction to programming, using Javascript. So, not introduction to programming *in" Javascript. Well, I guess this would be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.