Python documentation too difficult for beginners

T

Terry Reedy

The real question is what do you want to gain by your posts here. You
should already know that most groups are, by their very nature, slow to
make changes to the status quo. The problem tends to be exasperated in
open source projects where any changes mean that people have to donate
their time to make anything happen. You will in general find two things to
be true:

1. Since they are dontating their time, you will find that people tend to
scratch their own iches first.

2. People who do take the time to contribute to open source projects are
people of action. They don't tend to be appreciative of those who
constantly generate feature requests but have no inclination to do
any of the work themselves. They do appreciate other people of
action who are interested in making the project better.

Therefore, if you truly want changes in the documentation, I suggest that,
rather then whining to the group, you make some of the changes yourself.

I agree up to here, with a different interpretation of the last clause.
Work within the existing system. There are currently 250 open doc issues
on the tracker at bugs.python.org.

After registering, go to the search page
http://bugs.python.org/issue?@template=search&status=1
select Components: Documentation and hit Return (or [Search])

Find an issue that is waiting for someone to suggest a new or
replacement sentence or paragraph, and make one. No .diff patch
required, just put it in the message. Or look at existing suggestions
and comment.
 
A

AD.

Anything that promotes a lack of thinking sends up red flags in my head.
We want to recruit smart people who think, not idiots.

"Don't make me think" is the UI equivalent of "There should be one and
preferably only one obvious way to do it". Not about advocating no
thinking, but about reducing the amount of unimportant decisions you
require your users to make. But I don't think the book specifically
addresses Dutch users though.

Back on topic - I do like the Python docs overall. Especially compared
to the PHP docs. I like the overall look and format of the new Sphinx
generated ones too.

My only criticism is that the content can sometimes be a little too
terse/concise. It's fine for experienced developers, but in some
places a little more explanation and/or examples would help out the
less experienced. I can usually figure out how to do something
eventually, but the docs for some modules take more deciphering than
others.
 
J

James Mills

Are you mad? Javadoc is one of the worst examples of source code
documentation I can possibly imagine. I would go as far to say that the
Python guys should do exactly the opposite of Javadoc.

For what it's worth, I concur.

cheers
James
 
K

Kee Nethery

I agree up to here, with a different interpretation of the last clause.
Work within the existing system. There are currently 250 open doc issues on the tracker at bugs.python.org.

wow, a backlog of 250. Either 250 is the weekly submittal amount and they get dealt with within a week, OR the backlog is months old and the bug system is not an effective way to get changes or enhancements to the documentation. Either way, 250 open doc issues gives me the feeling that the existing documentation system is not working for the people trying to use it.
After registering, go to the search page
http://bugs.python.org/issue?@template=search&status=1
select Components: Documentation and hit Return (or [Search])

Find an issue that is waiting for someone to suggest a new or replacement sentence or paragraph, and make one. No .diff patch required, just put it in the message. Or look at existing suggestions and comment.

Given that newbies are the ones who run into these issues and have a great desire to spare others the pain they have suffered trying to learn Python, and newbies typically do not know about the bug tracking system as the way to request enhancements to the docs (that's not how wikipedia and other sites do changes to information), perhaps it would be useful to put a link to a page that explains how to improve the docs, on each doc page?

I have to agree with others. My preferred Python documentation is either the books I have, or a search on Google. A google search typically has several postings from people on non-official sites with the exact same confusion I have, and what they have tried and what ultimately worked. The suggestion was made that people create their own documentation if they don't like the official documentation, and that does seem to be a good source for python documentation.

Kee Nethery
 
L

Lawrence D'Oliveiro

Are you mad? Javadoc is one of the worst examples of source code
documentation I can possibly imagine.

It appeals to corporate herds of code-cutter drones, though. It follows
tedious rules that can be officially adopted as corporation policy, and
cited as a conformance feature by third-party products that these
corporations seem happy to spend money on. So the comments can be extracted
from the code, sorted, collated, stamped, filed, indexed, and collated
again, all as part of the make-work activity that seems to pass for actual
productivity in so many big corporations.
 
J

John Bond

My 2c:

I use the ActiveState distro, and it's winhelp doco. It's generally ok
and some things, like Dive Into Python, I've found excellent.

But I do quite regularly find myself cursing at the vagueness of the
index, and some of the content seems to require that you know it before
you read it (I wish I could remember an example).

Like everything, it could be improved.

Cheers, JB
 
T

Teemu Likonen

I thoroughly agree. The default info viewers are quite possibly the
most counterintuitive programs I have ever encountered. I never did
bother to learn how to use them. I instead installed the more
intuitive pinfo program.

It seems that we only agree on the part that I explicitly wrote about:
people are less familiar with info browsers than "less" pager. I didn't
mean to imply any reasons why this might be the case. I think "info"
browser is intuitive and easy to use. The basic commands:

Enter Follow a link (down to node)
u up node level
h help (general how-to)
? help (commands)
s search

Arrow keys, page up, page down keys work as usual.

What's counter-intuitive in it?
Right, pinfo offers this as well; but, then you have to figure out
where in the nodes that the search has taken you and how to navigate
from that node to find additional information that you may need.

I usually return to the top node with "t" command or go one or more
levels up in the tree with "u" command. The first line in the window
tells where I am.
 
D

Dennis Lee Bieber

Hi,

I've been coding in PHP and Java for years, and their documentation is
concise, well structured and easy to scan.
Whereas I have a whole shelf of Java documentation and it still
takes me an hour to write "Hello World"... Java's one class per file
results in a plethora of bloody names one has to remember just to find
out where to start looking for a standard library operation.

I have attempted to learn Java at least once a year for some five
years, and can never get going because I can't figure out what I'm
looking for in documentation.


Of course, I run ActiveState's Python on Windows, and all the Python
documentation is available as Windows help file format... Real easy to
pop up, browse a unified index, search by words, etc.
 
T

Tim Harig

It seems that we only agree on the part that I explicitly wrote about:
people are less familiar with info browsers than "less" pager. I didn't
mean to imply any reasons why this might be the case. I think "info"

The reason is really simple. Less' interface derives from more. Less and
more have a long history on the *nix platform and many programs have
emulated their interface.

When the GNU folk decided to clone *nix they decided that they knew better
and simply decided to create their own interfaces. I guess they figured
that everybody loves to have to learn multiple varying interfaces to use
different programs.
browser is intuitive and easy to use. The basic commands: [SNIP]
Arrow keys, page up, page down keys work as usual.

Actually, the left arrow key does not work at all intuitively. One would
expect that it should go back to the previous page as it would in lynx,
etc. It does not.

By tradition 'n' and 'p' are broken for scrolling in a page. 'b' is often
used in place of p but that seems to take one back to the top of the page.

The s key for a search is another example that has already been discussed.
What's counter-intuitive in it?

Maybe its intutitive to an emacs user; but, I find pinfo's default key
bindings much easier.
I usually return to the top node with "t" command or go one or more
levels up in the tree with "u" command. The first line in the window
tells where I am.

That assumes that you understand the node structure used or that you don't
mind returning to the top and having to re-walk the node structure every
time that you want to find new piece of information.

I already discussed that just finding the info pages can be difficult
because you have to know that they are stored under the package name and
that multiple pages can be used for man page structure.
 
R

rantingrick

AD i agree with you! The official python tutorial and the official
docs are pretty much a twisted mass of confusion to the initiated
programmer. Even today when i try yo search the docs i find the result
quite frankly useless. And the search reminds me of the old XP "puppy
dog" search. The doc ARE fairly well written HOWEVER the search
engine needs an update.

For me, i just Google it, and forget it!
 
L

Lawrence D'Oliveiro

Dennis Lee said:
Whereas I have a whole shelf of Java documentation and it still
takes me an hour to write "Hello World"... Java's one class per file
results in a plethora of bloody names one has to remember just to find
out where to start looking for a standard library operation.

You know Alan Kay’s dictum that “simple things should be simple, and complex
things should be possible�

Well, Java isn’t designed to make simple things simple. :)
 
J

jk

In message


Framesets? Is that really your idea of well-laid-out documentation? Using a
feature which has been derided (and dropped in HTML5) because of its effect
on usability and accessibility?

No, the framesets suck, and I agree that Javadoc isn't perfect.
Actually, I do think the PHP docs are the best I've found as a
reference. Javadocs just need a few tweaks and they'd be better (an
index at the top so you don't have to scroll down, no framesets, a
search engine). Still think they're better than the python docs though.
 
H

Hrvoje Niksic

Teemu Likonen said:
Enter Follow a link (down to node)
u up node level
h help (general how-to)
? help (commands)
s search

And don't forget:

l last viewed page (aka "back")

That one seems to be the info reader's best-kept secret.
 
D

Daniel da Silva

Guys, this really has nothing to do with python.

And don't forget:

     l       last viewed page (aka "back")

That one seems to be the info reader's best-kept secret.
 
H

Hallvard B Furuseth

Steven said:
A fair point -- the built-in open comes up as hit #30, whereas searching
for open in the PHP page brings up fopen as hit #1. But the PHP search
also brings up many, many hits -- ten pages worth.

But in any case, the Python search functionality could be smarter. If I
had a complaint about the docs, that would be it. Fortunately, I have
google :)

Actually that was one of the hair-tearing attitudes I heard a web search
guru complain about. The smartest part of the search engine is the
people running it, so why not apply their brains directly? Read the log
like you did, look for poor results (like "open"), put in exceptions by
hand. This might be a fraction of the work it takes to program that
kind of smarts into the engine. Or you might discover a group of
exceptions to put in - like all Python keywords. That makes it at least
partially programmed, which may be preferable.
 
R

rustom

Guys, this really has nothing to do with python.

?? python docs have nothing to do with python??
python docs by default on linux are read with info and many seem to
find info unpleasant to use.

Myself an old emacs user and cant say info helps me as much as google.
However comparing info and man is also a bit strange. The printed
python docs come to several thousand pages. Do we want them to be 1
manpage? a hundred? a thousand?
 
C

Cameron Simpson

| I've been coding in PHP and Java for years, and their documentation is
| concise, well structured and easy to scan.

While I agree about Java, at least the core Java docs, and javadoc
output in general (_great_ cross referencing!) I have mixed feelings
about the PHP docs. Though I suspect that stems from a dislike of the
PHP library API in general more than the docs, perhaps.

| Others have mentioned this apparently for years (see:
| http://stackoverflow.com/questions/4046166/easy-to-navigate-online-python-reference-manual/4070851
| and http://www.russellbeattie.com/blog/python-library-docs-still-suck
| and http://xahlee.org/perl-python/xlali_skami_cukta.html).
|
| Compare for instance the differences in ease of use, and speed of use,
| of these:
|
| http://docs.python.org/library/functions.html#open
| http://uk.php.net/manual/en/function.fopen.php
|
| The former is difficult to find (try searching for 'open' in the
| search box and see what you get).

I confess I almost never use the search box - as you say the result
relevance can be dodgy.

However, I do find the docs easy to use and pleasant to read on the
whole. My use is as follows:

For speed and convenience I have the docs locally stored.

I open the front page and then usually both the modules and index in
adjacent brwoser tabs.

I go to the index if I'm not sure of the module.

The strength of the index is that it tends to contain stuff that people
thought should be indexed (versus searches, which often have no
contextual understanding of the text, so their relevance is weaker).
The weakness of the index is that it can be hard to pick the relevant
entry. Open-link-in-new-tab is my friend here:-(

| It is simply a collection of
| paragraphs without strong enough contrast to differentiate the
| different parts - parameters, parameter values, return types,
| exceptions and related functions. It is slow to read and doesn't allow
| easy visual scanning.

That is true (the scanning). But by contrast, it does read like prose
and lends itself to a visit that gets you a complete feel for the
function.

[...]
| Has anyone else struggled while trying to learn the language? The
| whole documentation system seems geared towards people who already
| know what they're looking for and is close to useless for beginners.
| I'm not the only one who finds google an easier way to find
| documentation about python.

I certainly don't find the core docs hard to use (with some exceptions;
I still don't really understand the urllib stuff for the cases where
configuration is needed - weird proxy setups etc).

I've only been using Python for a few years and have generally found
that language easy to learn and the docs easy to read. I rarely reach
for The Google unless I'm seeking examples; the docs could do with a few
more of these IMHO.

I understand the attraction of the structured layout javadoc yields but
find it leads to "drier" documentation. It also works well for Java
because it is strongly typed - a great deal of the structure in the docs
can come directly from the code because argument counts, names and types
are always explicit (or deducable).

These are just initial responses. Now to wade the whole thread:)
--
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/

On the contrary of what you may think, your hacker is fully aware
of your company's dress code. He is fully aware of the fact that it
doesn't help him to do his job.
- Gregory Hosler <[email protected]>
 
C

Cameron Simpson

| This (http://epydoc.sourceforge.net/stdlib/) is what I'm talking
| about.
|
| Why aren't the official docs like this, and why has it taken me 2 days
| of searching? All this needs is a search engine behind it and it'd be
| perfect.

It looks a lot like javadoc. But its weakness is stuff like this:

http://epydoc.sourceforge.net/stdlib/Canvas.Polygon-class.html

Automatic docness, no useful information.

And of course the ugliness; I find the python docs much nicer to look
at. But I do wish the cross referencing was a bit better, often.
--
Cameron Simpson <[email protected]> DoD#743
http://www.cskk.ezoshosting.com/cs/

In an insane society, the sane man must appear insane.
- Keith A. Schauer <[email protected]>
 
M

Martin Gregorie

(http://epydoc.sourceforge.net/stdlib/) is what I'm talking | about.
|
| Why aren't the official docs like this, and why has it taken me 2 days
| of searching? All this needs is a search engine behind it and it'd be
| perfect.

It looks a lot like javadoc. But its weakness is stuff like this:

http://epydoc.sourceforge.net/stdlib/Canvas.Polygon-class.html

Automatic docness, no useful information.
You get the same problem in Java and it has exactly the same root: a lazy
programmer who can't be arsed to document his code.
 

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
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top