Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Feedback wanted on programming introduction (Python in Windows)

Reply
Thread Tools

Feedback wanted on programming introduction (Python in Windows)

 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      10-28-2009
[Cross-posted comp.programming and comp.lang.python]

Hi.

I may finally have found the perfect language for a practically oriented
introductory book on programming, namely Python.

C++ was way too complex for the novice, JScript and C# suffered from too
fast-changing specifications and runtime environment, Java, well, nothing
particularly wrong but it's sort of too large and unwieldy and inefficient.

I don't know whether this will ever become an actual book. I hope so!

But since I don't know much Python -- I'm *learning* Python as I write -- I know
that there's a significant chance of communicating misconceptions, non-idiomatic
ways to do things, bad conventions, etc., in addition to of course plain errors
of fact and understanding in general, to which I'm not yet immune...

So I would would be very happy for feedback.

But note: although I'm a complete Python newbie I'm not a novice programmer; my
usual programming language is C++. So if you are a novice and think there's
something wrong, then please do report it because it may help me explain things
better, but since it's likely my explanation that is misleading, don't waste
time on building up a case! This also goes for something that is simply
difficult to understand. Then reporting that may help me explain it better. On
the other hand, if you do have some experience, then chances are that what you
think is an error, actually *is* an error!

Unfortunately Google docs doesn't display the nice table of contents in each
document, but here's the public view of ch 1 (complete) and ch 2 (about one
third completed, I've not yet settled on a title so it's just chapter "asd"):

http://preview.tinyurl.com/progintro

Cheers,

- Alf

PS: Please use the groups, this thread, for feedback; not e-mail. -DS
 
Reply With Quote
 
 
 
 
Chris Rebert
Guest
Posts: n/a
 
      10-28-2009
On Tue, Oct 27, 2009 at 11:52 PM, Alf P. Steinbach <(E-Mail Removed)> wrote:
> [Cross-posted comp.programming and comp.lang.python]
>
> Hi.
>
> I may finally have found the perfect language for a practically oriented
> introductory book on programming, namely Python.
>
> C++ was way too complex for the novice, JScript and C# suffered from too
> fast-changing specifications and runtime environment, Java, well, nothing
> particularly wrong but it's sort of too large and unwieldy and inefficient.
>
> I don't know whether this will ever become an actual book. I hope so!
>
> But since I don't know much Python -- I'm *learning* Python as I write -- I
> know that there's a significant chance of communicating misconceptions,
> non-idiomatic ways to do things, bad conventions, etc., in addition to of
> course plain errors of fact and understanding in general, to which I'm not
> yet immune...
>
> So I would would be very happy for feedback.

<snip>
>
> * *http://preview.tinyurl.com/progintro
>
> Cheers,
>
> - Alf
>
> PS: Please use the groups, this thread, for feedback; not e-mail. -DS


- The slogan is "batteries included", not "all batteries included".
- As a user of the platform, I can tell you it's "Mac OS X" (with a
space, not a slash).
- ActivePython is a distribution, not an implementation. It's just the
standard CPython from python.org with some bundled extras.
- I might consider making the first example multiline. Most cringe at
the use of semicolons in a Python program, although I can understand
it might be easier for the newbie to type correctly.
- You might mention how unit testing is used in interpreted languages
to detect many sorts of errors detected by the compiler in compiled
languages

Cheers,
Chris
--
http://blog.rebertia.com
 
Reply With Quote
 
 
 
 
Steven D'Aprano
Guest
Posts: n/a
 
      10-28-2009
On Wed, 28 Oct 2009 07:52:17 +0100, Alf P. Steinbach wrote:

> Unfortunately Google docs doesn't display the nice table of contents in
> each document, but here's the public view of ch 1 (complete) and ch 2
> (about one third completed, I've not yet settled on a title so it's just
> chapter "asd"):
>
> http://preview.tinyurl.com/progintro


Unfortunately Google wants me to change my browser, accept a privacy
breach (cookies), and open a moderately large security hole in my browser
(Javascript). Any one of these on its own, and I wouldn't mind; two of
them, and I'd give it some thought; but all three, well, no thank you.


I don't suppose you have these chapters available on a public website in
an open document format like .odt or similar? Or even better, plain text
with markup?



--
Steven
 
Reply With Quote
 
Alf P. Steinbach
Guest
Posts: n/a
 
      10-28-2009
* Chris Rebert:
> On Tue, Oct 27, 2009 at 11:52 PM, Alf P. Steinbach <(E-Mail Removed)> wrote:
>> [Cross-posted comp.programming and comp.lang.python]
>>
>> Hi.
>>
>> I may finally have found the perfect language for a practically oriented
>> introductory book on programming, namely Python.
>>
>> C++ was way too complex for the novice, JScript and C# suffered from too
>> fast-changing specifications and runtime environment, Java, well, nothing
>> particularly wrong but it's sort of too large and unwieldy and inefficient.
>>
>> I don't know whether this will ever become an actual book. I hope so!
>>
>> But since I don't know much Python -- I'm *learning* Python as I write -- I
>> know that there's a significant chance of communicating misconceptions,
>> non-idiomatic ways to do things, bad conventions, etc., in addition to of
>> course plain errors of fact and understanding in general, to which I'm not
>> yet immune...
>>
>> So I would would be very happy for feedback.

> <snip>
>> http://preview.tinyurl.com/progintro
>>
>> Cheers,
>>
>> - Alf
>>
>> PS: Please use the groups, this thread, for feedback; not e-mail. -DS

>
> - The slogan is "batteries included", not "all batteries included".
> - As a user of the platform, I can tell you it's "Mac OS X" (with a
> space, not a slash).


Thanks!

I'll fix that right away.


> - ActivePython is a distribution, not an implementation. It's just the
> standard CPython from python.org with some bundled extras.


Thanks, but it's also a language implementation, the way I use that word .
This is the same as the MinGW g++ C++ compiler is a language implementation, in
spite of being just a packaging of the CygWin compiler. Its origin doesn't
matter. But perhaps there is some better term than implementation, something not
involving discussing distributions and derivative works and so on? I.e. a term
that can be introduced in one line of text and is even more clear?


> - I might consider making the first example multiline. Most cringe at
> the use of semicolons in a Python program, although I can understand
> it might be easier for the newbie to type correctly.


Hm. I didn't know that about "most cringe at" semicolons in Python. But I still
think the example is better on one line: short, concise, not introducing extra
tool usage (which is what the reader absolutely *has* to relate to).


> - You might mention how unit testing is used in interpreted languages
> to detect many sorts of errors detected by the compiler in compiled
> languages


Yes, later. Unit-testing is done also for statically type checked languages. The
big difference lies in how much testing and at what time; this involves in
particular test-driven development (TDD). And it's touchy. Proponents of this
and that methodology will invariably argue that their methodology is best...



Cheers, & thanks,

- Alf

PS: I added back in [comp.programming], since I think it's simplest to have all
the discussion, both Python-specific and general, in one single thread.
 
Reply With Quote
 
Jon Clements
Guest
Posts: n/a
 
      10-28-2009
On 28 Oct, 07:31, Steven D'Aprano
<(E-Mail Removed)> wrote:
> On Wed, 28 Oct 2009 07:52:17 +0100, Alf P. Steinbach wrote:
> > Unfortunately Google docs doesn't display the nice table of contents in
> > each document, but here's the public view of ch 1 (complete) and ch 2
> > (about one third completed, I've not yet settled on a title so it's just
> > chapter "asd"):

>
> > * * *http://preview.tinyurl.com/progintro

>
> Unfortunately Google wants me to change my browser, accept a privacy
> breach (cookies), and open a moderately large security hole in my browser
> (Javascript). Any one of these on its own, and I wouldn't mind; two of
> them, and I'd give it some thought; but all three, well, no thank you.
>
> I don't suppose you have these chapters available on a public website in
> an open document format like .odt or similar? Or even better, plain text
> with markup?
>
> --
> Steven


Umm, seem to have woken up in a good mood this morning (for a change);
just in case the OP can't...

http://datasyzygy.com/alf/01 - getting started.pdf
http://datasyzygy.com/alf/02 - asd.pdf

Jon.
 
Reply With Quote
 
Jon Clements
Guest
Posts: n/a
 
      10-28-2009
On 28 Oct, 07:44, Jon Clements <(E-Mail Removed)> wrote:
> On 28 Oct, 07:31, Steven D'Aprano
>
>
>
> <(E-Mail Removed)> wrote:
> > On Wed, 28 Oct 2009 07:52:17 +0100, Alf P. Steinbach wrote:
> > > Unfortunately Google docs doesn't display the nice table of contents in
> > > each document, but here's the public view of ch 1 (complete) and ch 2
> > > (about one third completed, I've not yet settled on a title so it's just
> > > chapter "asd"):

>
> > > * * *http://preview.tinyurl.com/progintro

>
> > Unfortunately Google wants me to change my browser, accept a privacy
> > breach (cookies), and open a moderately large security hole in my browser
> > (Javascript). Any one of these on its own, and I wouldn't mind; two of
> > them, and I'd give it some thought; but all three, well, no thank you.

>
> > I don't suppose you have these chapters available on a public website in
> > an open document format like .odt or similar? Or even better, plain text
> > with markup?

>
> > --
> > Steven

>
> Umm, seem to have woken up in a good mood this morning (for a change);
> just in case the OP can't...
>
> http://datasyzygy.com/alf/01- getting started.pdfhttp://datasyzygy.com/alf/02- asd.pdf
>
> Jon.


Maybe not quite 'woken up'...

http://datasyzygy.com/alf/01%20-%20g...%20started.pdf
http://datasyzygy.com/alf/02%20-%20asd.pdf

 
Reply With Quote
 
tm
Guest
Posts: n/a
 
      10-28-2009
On 28 Okt., 07:52, "Alf P. Steinbach" <(E-Mail Removed)> wrote:
> [Cross-posted comp.programming and comp.lang.python]


Looking at your topic '(Python in Windows)', without taking a
glimpse at your actual introduction, I have the following to say:
I think it is not a good idea to teach programming with a focus
on a specific operating system. Programming should IMHO be taught
without reference to an operating system. Otherwise you just teach
how to write unportable programs.

> Hi.
>
> I may finally have found the perfect language for a practically oriented
> introductory book on programming, namely Python.


What is considered 'perfect' depends on the point of view. Languages
have assets and drawbacks and I don't even use the term 'perfect'
for my own language. There is always room to improve. Some of
the features I consider important are discussed here:

http://seed7.sourceforge.net/faq.htm

> C++ was way too complex for the novice, JScript and C# suffered from too
> fast-changing specifications and runtime environment, Java, well, nothing
> particularly wrong but it's sort of too large and unwieldy and inefficient.


While many people consider Java inefficient they do so in comparison
to C/C++. I doubt that Java is inefficient compared to most
interpreted languages.

> I don't know whether this will ever become an actual book. I hope so!
>
> But since I don't know much Python -- I'm *learning* Python as I write


Normally I prefer books written by people who already know the
stuff they are writing about. I would consider that it is not a good
selling argument when a book was written to *learn* a language.

Greetings Thomas Mertes

Seed7 Homepage: http://seed7.sourceforge.net
Seed7 - The extensible programming language: User defined statements
and operators, abstract data types, templates without special
syntax, OO with interfaces and multiple dispatch, statically typed,
interpreted or compiled, portable, runs under linux/unix/windows.
 
Reply With Quote
 
Alf P. Steinbach
Guest
Posts: n/a
 
      10-28-2009
* tm:
> On 28 Okt., 07:52, "Alf P. Steinbach" <(E-Mail Removed)> wrote:
>> [Cross-posted comp.programming and comp.lang.python]

>
> Looking at your topic '(Python in Windows)', without taking a
> glimpse at your actual introduction, I have the following to say:
> I think it is not a good idea to teach programming with a focus
> on a specific operating system. Programming should IMHO be taught
> without reference to an operating system. Otherwise you just teach
> how to write unportable programs.


I think you're trolling a little.

Without reference to an OS you can't address any of the issues that a beginner
has to grapple with, including most importantly tool usage, without which it's
not even possible to get started, but also, very importantly, a file system.

Learning programming without tools and without using files (or only using the
common denominator for file systems in OSes X, Y and Z) is sort of vacuous...

In addition there's the motivational factor.

Doing only academic examples, utilizing only a language's more or less portable
functionality, is very de-motivational, while the opposite is motivational.



>> Hi.
>>
>> I may finally have found the perfect language for a practically oriented
>> introductory book on programming, namely Python.

>
> What is considered 'perfect' depends on the point of view. Languages
> have assets and drawbacks and I don't even use the term 'perfect'
> for my own language. There is always room to improve. Some of
> the features I consider important are discussed here:
>
> http://seed7.sourceforge.net/faq.htm
>
>> C++ was way too complex for the novice, JScript and C# suffered from too
>> fast-changing specifications and runtime environment, Java, well, nothing
>> particularly wrong but it's sort of too large and unwieldy and inefficient.

>
> While many people consider Java inefficient they do so in comparison
> to C/C++. I doubt that Java is inefficient compared to most
> interpreted languages.
>
>> I don't know whether this will ever become an actual book. I hope so!
>>
>> But since I don't know much Python -- I'm *learning* Python as I write

>
> Normally I prefer books written by people who already know the
> stuff they are writing about. I would consider that it is not a good
> selling argument when a book was written to *learn* a language.


Yes, it would be silly to write a book or whatever about Python. This text is
primarily about programming, at the novice level, not about the Python language.
The programming language is only a vehicle.

However, as a vehicle the language needs to be suited for transport of the
novice.

And it seems that Python is very well suited for that.


> Seed7 Homepage: http://seed7.sourceforge.net


I'm not familiar with Seed, sorry.


Cheers, & thanks for your thoughts,

- Alf
 
Reply With Quote
 
eb303
Guest
Posts: n/a
 
      10-28-2009
On Oct 28, 7:52 am, "Alf P. Steinbach" <(E-Mail Removed)> wrote:
[snip]
> But since I don't know much Python -- I'm *learning* Python as I write -- I know
> that there's a significant chance of communicating misconceptions, non-idiomatic
> ways to do things, bad conventions, etc., in addition to of course plain errors
> of fact and understanding in general, to which I'm not yet immune...
>
> So I would would be very happy for feedback.


OK, I'll start the flame war then: I can see the purpose of section
1.5, but from the end of the 3rd paragraph, you seem to go into
religious matters rather than actual facts, which seems to me a bit
out of place in a book only supposed to teach programming. Basically
saying that any "serious" program has to be written in a statically
typed language and that such a language kind of automatically makes
the development faster and the quality higher is just not true from my
experience, and from the experience of many people on this group, I
guess. IMNSHO, the 4th paragraph of section 1.5 in its current form is
highly subjective and should be completely rewritten, if not simply
removed.

Sorry if that sounds rough: I've seen this written too many times
(usually without any argumentation, BTW) and it has a tendency to make
me a little upset.
 
Reply With Quote
 
Jon Clements
Guest
Posts: n/a
 
      10-28-2009
On 28 Oct, 08:58, "Alf P. Steinbach" <(E-Mail Removed)> wrote:
[snip]
> Without reference to an OS you can't address any of the issues that a beginner
> has to grapple with, including most importantly tool usage, without which it's
> not even possible to get started, but also, very importantly, a file system.
>
> Learning programming without tools and without using files (or only using the
> common denominator for file systems in OSes X, Y and Z) is sort of vacuous...
>
> In addition there's the motivational factor.


I certainly agree that focusing on Windows, you may be able to suggest
certain tools. IDE's, RAD environments, etc... However, I'm sure you
would consider that if you were writing a C++ guide, you would promote
portability and the STL. Of course, both languages offer platform-
specific libraries. Maybe a 'down side' with Python is that the
"batteries included" also include some functions marked in the
documentation as "Available on Windows only" etc... And specifically
suggesting an ActiveState install which includes COM interop etc...
(although I hope this would appear much later, if at all).

Cheers,

Jon.

PS. Can I suggest PSpad as an editor for the Windows environment, I
much prefer it to Notepad++ and it may well be worth mentioning.



 
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
Feedback from feedback on MCP questions Matt Adamson Microsoft Certification 0 04-27-2009 11:13 AM
Ruby Introduction material wanted Vassilis Rizopoulos Ruby 1 07-10-2007 06:37 PM
Introduction to Programming Using Java k.vidura@gmail.com Java 11 03-17-2006 04:05 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 1 07-16-2004 01:12 PM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 0 07-16-2004 10:00 AM



Advertisments