Use the Source Luke

E

Emile van Sebille

On 1/31/2011 12:35 PM Raymond Hettinger said...
That would explain why fewer people look at the C source code.

However, even the parts of the standard library written in pure Python
don't seem to be getting read anymore, so I'm still inclined to
attribute the issue to 1) inconvenient placement of source code,
2) a largish code base, and 3) possibly a cultural shift.

ISTM that around the time the list forked off py-dev fewer people
remained that were singing 'use the source'. . .

Emile
 
S

Steven D'Aprano

However, even the parts of the standard library written in pure Python
don't seem to be getting read anymore, so I'm still inclined to
attribute the issue to 1) inconvenient placement of source code, 2) a
largish code base, and 3) possibly a cultural shift.

I'd be inclined to say that #3 is by far the most important. When I
started programming, the internet wasn't even a distant object on radar.
(That is to say, it existed, but hardly anyone outside of a few gurus at
universities had even heard of it.) If you wanted to learn a language,
you bought a book and read it, if one existed and you could afford it,
and you read the sample code that came with the software. Often the book
you bought told you to read the sample code. You couldn't email a mailing
list to ask for help, or post to a forum, or google the answer. If you
were lucky, you could go to a Users Group once a month or so. And so "old
timers" learned to read the source, because that's almost all there was.

Today's newbies take the internet, web forums, mailing lists, usenet and
google for granted. This is a *big* cultural shift.

As for #1, in truth I don't believe it is actually a problem. Okay, it
might be a bit inconvenient to find the Python source code the first few
times you go looking (I can never remember whether to look in
/usr/lib/python or /usr/local/lib/python), but once you've found it, it
isn't difficult to create a shortcut for it. And as for #2, yes, there
may be a lot of code in the standard library, but it's all cut up into
small, easily swallowed chunks called "modules" :)

In my experience, the biggest obstacles for people to read the Python
code in the standard library are:

(1) thinking to do so in the first place; and

(2) the chicken-and-egg problem that as a newbie they often don't
understand what they're reading.


Your idea of including links to source in the documentation will
hopefully help with the first.
 
R

rusi

The following, meant for this thread, went to another my mistake :)
--------------------------

However, even the parts of the standard library written in pure Python
don't seem to be getting read anymore, so I'm still inclined to
attribute the issue to 1) inconvenient placement of source code,
2) a largish code base, and 3) possibly a cultural shift.


There is another thread running where this was said (by a python
developer?)
Actually I don't even understand how can IDLE source code quality have
anything to do with python success or future adoption, as you implied
in your statements.
High priority bugs get fixed first. IDLE source code is clearly not a
high priority issue, hence it doesn't get fixed: end of story.

Now if we can put aside for a moment the fact that the person to whom
this was said specializes in the art of raising others' blood
pressures and making them say what they may not otherwise have said,
it should be clear that this priority is at cross purposes with
Raymond's.

In short (at the risk of belonging to the equivalence class of others
whose names start with R) I would suggest a 4th point: Code cruft

Please note: I am thankful to all python devs for giving me python.
Its just that when functionality becomes as large as it is for python
and the target is fast moving, keeping code spic and span will
generally be perceived to be a priority that has crossed the point of
diminishing returns. Consequence: noobs will have a higher barrier to
entry than earlier
 
R

rantingrick

In short (at the risk of belonging to the equivalence class of others
whose names start with R) I would suggest a 4th point: Code cruft

Oh rusi, just come out of the closet already we accept you! :)
 
S

Stephen Hansen

Oh rusi, just come out of the closet already we accept you! :)

First tonight, you find sexism funny; now you find bigotry funny.

Disgusting.

--

Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (Darwin)

iQEcBAEBAgAGBQJNR6xwAAoJEKcbwptVWx/lLV8H/05VAMsv96yYDuNl6WEgQ2Is
4HX/S//yeyO/htwYi1oG1HQhnBdVsfcQGoMD1A6CKhjTsqp8Dwn1dbtV/R64EJJ2
oXKEypC51eoAT9VutyKG6WemzVeALMSGSOUDYE2qNEJKJsyl1RvXHc4rcegYlp6a
HXEbetGt9cw/qioKfC8Mq09A4C/6lbW393eFY7Oc9UsoTbDaVFCzlqcJBqWfoDUS
9XmSkuM/FSJJ0AZvmgTnq0Q5zhjEikM+twMRrY9e2jH+jVcQpP5wxfy/WSDtQgJQ
kJgcGAIu+/uzb+a6h/mJWMIex2terPG/19A6KUmfYf1si2SfaFjYRzOG0S6cTCQ=
=bxIc
-----END PGP SIGNATURE-----
 
O

OKB (not okblacke)

Tim said:
However I think the biggest changes that have probably happened
with python itself are:

(1) More users for whom this is their first language.
(2) CS courses / training not teaching C (or pointer-based
languages).

(2) is especially important IMO - under half of the python
developers I have regularly worked with would feel comfortable
reading C - so for the other half reading C source code probably
isn't going to help them understand exactly what's going on
(although in the long run it might help them a lot)

I'd just like to note that (2) applies to me in spades. I'm not
sure how many other people are in my position, but I use Python because
I like how it works, and I do not want to use C because I find it
insufferable. I quite frequently look at the source of Python modules,
although more often third-party modules than the standard lib, but if I
have to look at the C source of something I basically stop and find
another solution (possibly abandoning Python altogether for that usage).

I think, in general, the less anyone needs to know C even exists,
the better for Python; likewise, the more that people have to mention
the existence of C in a Python context, the worse for Python. This may
be a somewhat extreme viewpoint, but that's my position.

--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
 
R

rusi

        I'd just like to note that (2) applies to me in spades.  I'm not
sure how many other people are in my position, but I use Python because
I like how it works, and I do not want to use C because I find it
insufferable.  I quite frequently look at the source of Python modules,
although more often third-party modules than the standard lib, but if I
have to look at the C source of something I basically stop and find
another solution (possibly abandoning Python altogether for that usage).

        I think, in general, the less anyone needs to know C even exists,
the better for Python; likewise, the more that people have to mention
the existence of C in a Python context, the worse for Python.  This may
be a somewhat extreme viewpoint, but that's my position.

In 1990 I wrote a paper elaborating this. http://portal.acm.org/citation.cfm?id=126471
It is dated (before python, java, haskell and the internet as we know
it today)
It is also dated in the sense that I dont totally agree with the
strong views therein (I was half my age then :)

Still if you want it its here
https://docs.google.com/document/d/1P-BQtpyzjjjOKxzhKjIGI-GLMXW5bOZ6xYBJhApwqLc/edit?hl=en

[PS Does not read properly in google docs though it reads ok in
acroread and evince ]
 
O

OKB (not okblacke)

rusi said:
On Feb 2, 12:32 am, "OKB (not okblacke)"

In 1990 I wrote a paper elaborating this.
http://portal.acm.org/citation.cfm?id=126471 It is dated (before
python, java, haskell and the internet as we know it today)
It is also dated in the sense that I dont totally agree with the
strong views therein (I was half my age then :)

Very interesting, thanks. I think Python has its own warts
comparable to some of those you mention, but not all. What bothers me
most is when "practicality beats purity" is invoked, with practicality
defined as "doing it this way is faster in C".

--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
 
S

Stefan Behnel

OKB (not okblacke), 04.02.2011 20:11:
I think Python has its own warts
comparable to some of those you mention, but not all. What bothers me
most is when "practicality beats purity" is invoked, with practicality
defined as "doing it this way is faster in C".

Most of that should be gone in Python 3.

There's also the practicality in the sense of "someone has to write the
code". Both are certainly common in every open source developer community,
including python-dev, if you replace "C" by "the right language in the
given context". But I must say that I rarely read either of the two being
used as common meanings for "practicality" on python-dev. That term is very
user focussed in the Python community.

Stefan
 
D

Daniel Fetchinson

For the Python world though, there does seem
to have been a change. A decade ago in this newsgroup, there were
frequent references to standard library source. I don't see that
much anymore.

Popularity has a price. A decade ago only hackers were exposed to
python who are happy to chat about the source code but these days
average computer users (my grandma) frequently come across python and
ask questions from a user perspective.

So I'd think your observation is correct that the ratio of source
related posts to non-source related posts on this list went down but
the reason is not because the total number of source related questions
decreased but because the total number of non-source related questions
increased.

Cheers,
Daniel
 

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,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top