Feedback wanted on programming introduction (Python in Windows)

Alf P. Steinbach alfps at
Thu Oct 29 17:53:05 CET 2009

* Martin P. Hellwig:
> Alf P. Steinbach wrote:
>> * tm:
>>> On 28 Okt., 07:52, "Alf P. Steinbach" <al... at> 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.
> I conclude from this that your assumption is that the reader might not 
> be competent enough to have basic portable knowledge of using a 
> computer. Which is fair enough, however I would suggest writing an 
> introduction to solve this fundamental absence of knowledge first before 
> introducing concepts like programming in python for which already are a 
> number of freely available/modifiable resources online.

You're right that I assume no knowledge of the command interpreter, and just the 
most cursory knowledge of folder structure etc. However I would not phrase that 
in terms of competence :-). Writing an introduction to solve that knowledge gap 
problem is generally a good idea and I've done that a number of times. But 
having done that I know very well what it entails when it includes What The 
Student Should Know instead of just recipes. In an environment with other folks 
that the student can seek help from it works well, but in a book it's rather 
off-putting: "hey, it's page 90!, when are we getting to do real programming?".

And I'm not taking that "page 90" from thin air.

There's rather a lot to know about the environment that a program executes in if 
one is going to create robust, dependable, generally usable programs, not just 
toy examples. Unfortunately even most professional programs do not handle the 
requirements of their environs very well, and I think that educators, even such 
as I, have a responsibility to now start teaching students to do things right. 
To take but one example that you may or may not be aware of, Microsoft's own 
Windows Explorer, the main GUI shell for Windows, which presumably was made by 
the best programmers available with the best knowledge of the program's 
environment, is unable to handle (such as delete) files or folders with paths 
greater than some 260 characters, is unable to handle filenames that differ only 
in case and are in the same directory, and is unable to e.g. delete a folder 
called "con"  --  although such files & folders can very easily be created.

In addition to such things impacting on the design and functionality of programs 
even just the tool usage is very complex and runs to a great many pages.

For example, for general tool usage in Windows the student needs to know about 
levels of environment variable specifications and file associations, which in 
turn requires knowledge of processes and the Windows registry database and 
various commands.

And there's stuff you don't find in most textbooks that, in an introduction for 
that knowledge gap, IMO needs to be there. For example, the student should 
ideally know that it's not a good idea to write "MZ" as the first two characters 
in a Windows text file, or to let a program do that. But instead of collecting 
all this stuff in a very long-winded introduction, my idea now is to just/mostly 
introduce it by way of programming examples, and then the student also gets the 
connection to how this functionality is from a programming perspective.

> I don't think it is a virtue to help adding to the pool of programmers 
> unaware of the command line, whatever platform that might be.

This comment baffles me.

> But ignoring the above (I assumed and assumption you made, so it is 
> likely I've got it totally wrong :-) ), I think that creating such a 
> document provides a unique opportunity to document things that the more 
> experienced developers take for granted but is a complete enigma for 
> beginners in programming and using computers in general.

This comment also baffles me. :-)

> Good luck with your effort!



- Alf

More information about the Python-list mailing list