Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > [perl-python] Python documentation moronicities (continued)

Reply
Thread Tools

[perl-python] Python documentation moronicities (continued)

 
 
Xah Lee
Guest
Posts: n/a
 
      04-12-2005
http://python.org/doc/2.4.1/lib/module-re.html
http://python.org/doc/2.4.1/lib/node114.html

---------
QUOTE
The module defines several functions, constants, and an exception. Some
of the functions are simplified versions of the full featured methods
for compiled regular expressions. Most non-trivial applications always
use the compiled form
UNQUOTE


What does a programer who wants to use regex gets out from this piece
of mother****ing irrevalent drivel?

----------
QUOTE
compile(
pattern[, flags])

Compile a regular expression pattern into a regular expression object,
which can be used for matching using its match() and search() methods,
described below.

The expression's behaviour can be modified by specifying a flags
value. Values can be any of the following variables, combined using
bitwise OR (the | operator).
UNQUOTE


What exactly is it ****ing saying?

I wanted to use regex to find & replace on text. I've read in a file.
Trying to reading this ****ing doc is a pain in the ass. What are these
"flags"? Do i do

re.compile(r'mypat','M') or
re.compile(r'mypat',M)
or perhaps
re.compile(r'mypat',re.M)

The M isn't a ****ing variable. Why does the doc incompetently use that
term?
And what the **** is it unclearly meant by "OR" operator with the
mother ****ing bitwise jargon?

All a person reading regex really wanted is to see how to use a string
pattern and replace it with another. The ****ing doc cannot be possibly
****ing worsely written.

**** the mother ****ing coders in the IT industry.

So, is
re.compile(r'mypat','M')
re.compile(r'mypat','MULTILINE')
equivalent?

and, by that ****ing bitwise **** is it meant to say like
re.compile(r'mypat','M'|'U')
?

why cannot this piece of **** writing give a single example of usage?
and mother****ing confusedly organized, with ****ing variable terms the
writer don't ****ing understand, and meanwhile always trying to sound
big asshole and don't stop at masturbation by mention a regex book and
not hesitate to mention another language Perl. ****ing morons.

for a exposition of IT's ****ing stupid docs and their ****head coders,
see:
http://xahlee.org/Periodic_dosage_di...ami_cukta.html

a cleaned up account of this post will be appended to the above
exposition.

--------

One final piece of advice here to sober up the ****heads who are
currently offended and defiant: you want to ask yourself this question:
Can a seasoned programer, who is expert at least 2 languages, who is
also a expert at Perl and knew regex well, and who has also read the
official Python tutorial and has written at least 10 simple python
programs over a span of a month, can such a person, who have not yet
used regex in Python but now wants to use regex in Python and have just
read the doc, must he, resort to many trial and error to see exactly
what the doc is talking about?

But, can this doc be (re-)written effectively and easily so that any
programers needn't do trial'n'error post-reading?

The answer to the questions are resounding yeses, you ****ing asses.

paypal me a hundred dollars and i'll rewrite the whole re doc in a few
hours.

**** you the standard IT morons. Excuse me for i didn't have time to
write a more coherent and detailed analysis of the stupidities of the
re doc.

Xah

http://xahlee.org/PageTwo_dir/more.html

 
Reply With Quote
 
 
 
 
Michael Hoffman
Guest
Posts: n/a
 
      04-12-2005
I've had enough.

*PLONK*
--
Michael Hoffman
 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      04-12-2005
Xah Lee wrote:

> of motherf***ing irrevalent drivel?


I am greatly amused.
A troll impersonating Xah Lee has made xah look like a total moron.
LOL
 
Reply With Quote
 
rbt
Guest
Posts: n/a
 
      04-12-2005
Xah Lee wrote:

> What does a programer who wants to use regex gets out from this piece
> of motherf**king irrevalent drivel?


Any resume that ever crosses my desk that includes 'Xah Lee' anywhere in
the name will be automatically trashed.
 
Reply With Quote
 
Richard Gration
Guest
Posts: n/a
 
      04-12-2005
On Tue, 12 Apr 2005 04:02:20 -0700, Joe Smith wrote:

> Xah Lee wrote:
>
>> of motherf***ing irrevalent drivel?

>
> I am greatly amused.
> A troll impersonating Xah Lee has made xah look like a total moron. LOL


"The ****ing doc cannot be possibly ****ing worsely written."

This is very Xahish though, even if it's not him.

It's right up there with "AND, the writting as usuall is fantastic
incompetent."
 
Reply With Quote
 
Peter Hansen
Guest
Posts: n/a
 
      04-12-2005
Joe Smith wrote:
> Xah Lee wrote:
>> of motherf***ing irrevalent drivel?

>
> I am greatly amused.
> A troll impersonating Xah Lee has made xah look like a total moron.
> LOL


Sorry, Joe, but why do you think this wasn't Xah?
Every detail of the post is consistent with his
recent postings.

And a secondary, but purely rhetorical, question:
how could the post have made him look like a moron
when he already looked like one?
 
Reply With Quote
 
axel@white-eagle.invalid.uk
Guest
Posts: n/a
 
      04-12-2005
In comp.lang.perl.misc Xah Lee <> wrote:
> The answer to the questions are resounding yeses, you ****ing asses.


> paypal me a hundred dollars and i'll rewrite the whole re doc in a few
> hours.


> **** you the standard IT morons. Excuse me for i didn't have time to
> write a more coherent and detailed analysis of the stupidities of the
> re doc.


Don't worry! Very soon, some nice men in white coats will show you
a comfortable room with soft walls in which you can write such
documentation to your hearts content.

Axel

 
Reply With Quote
 
John W. Kennedy
Guest
Posts: n/a
 
      04-13-2005
Xah Lee wrote:
> http://python.org/doc/2.4.1/lib/module-re.html
> http://python.org/doc/2.4.1/lib/node114.html
>
> ---------
> QUOTE
> The module defines several functions, constants, and an exception. Some
> of the functions are simplified versions of the full featured methods
> for compiled regular expressions. Most non-trivial applications always
> use the compiled form
> UNQUOTE
>
>
> What does a programer who wants to use regex gets out from this piece
> of mother****ing irrevalent drivel?


Until now, I have regarded you as a mildly amusing moron.

But now I find you're simply illiterate.

Buh-bye.

--
John W. Kennedy
A proud member of the reality-based community.
 
Reply With Quote
 
Xah Lee
Guest
Posts: n/a
 
      05-05-2005
I have now also started to rewrite the re-syntax page. At first i
thought that page needs not to be rewritten, since its about regex and
not really involved with Python. But after another look, that page is
as incompetent as every other page of Python documentation.

The rewritten page is here:
http://xahlee.org/perl-python/python...re-syntax.html

It's not complete, but is a start. The organization is largely taken
care of, except the last few paragraphs. The bottom half on capturing
and extension syntax i haven't started working on. In particular, they
need examples. The “repetitions” section also needs to be examed.

here are few notes on this whole rewriting ordeal.

-------------------

In the doc, examples are often given in Python command line interface
format, e.g.

>>> def f(n):

.... return n+1
....
>>> f(1)

2

instead of:

def f(n):
return n+1
print f(1) # returns 2

the clean format should be used because it does not require familiarity
with Python command line, it is more readable, and the code can be
copied and run readily.

A significant portion of Python doc's readers, if not majority, didn't
come to Python as beginning programers, and or one way or another never
used or cared about the Python command line interface.

Suppose a non-Python programer is casually shown a page of Python doc.
She will get much more from the clean example than the version
cluttered with Python Command line interface irrelevancies.

Suppose now we have a experienced professional Python programer. Upon
reading the Python doc, she will also find examples in plain code much
more readable and familiar, than the version plastered with Python
Command line interface irrelevancies.

The only place where the Python command line look-and-feel is
appropriate is in the Python tutorial, and arguably only in the
beginning sections.

-----
Extra point: If the Python command line interface is actually a robust
application, like so-called IDE e.g. Mathematica front-end, then things
are very different. In reality, the Python command line interface is a
****ing toy whose max use is as a simplest calculator and double as a
chanting novelty for standard coding morons. In practice it isn't even
suitable as a trial'n'error pad for real-world programing.

Extra point: do not use the ****ing stupid meaningless jargon
“interpreter”. 90% of its use in the doc should be deleted.They
should be replaced with "software", "program", "command line
interface", or "language" or others.

(I dare say that 50% of all uses of the word interpreter in computer
language contexts are inane. Fathering large amounts of
misunderstanding and confusion.)

-----
history of Python are littered all over the doc. e.g.
“Incompatibility note: in the original Python 1.5 release, maxsplit
was ignored. This has been fixed in later releases.”

99% of programers really don't need to give a flying **** about the
history of a language. Inevitably software including languages change
over time, however conservative one tries to be. So, move all these
changes into a "New and Incompatible changes" page at some appendix of
the lang spec. This way, people who are maintaining older code, can
find their info and in one coherent place. While, the general
programers are not forced to wade thru the details of ****ups or
whatnot of the past in every few paragraphs. (few exceptions can be
made, when the change is a major ****up that all practicing Python
coders really must be informed regardless whether they maintain old
code.)

------

do not take a attitude like you have to stick to some artificial format
or order or "correctness" in the doc. Remember, the doc's prime goal is
to communicate to programers how a language functions, not how it is
implemented or how technically or computer scientifically speaking.

In writing a language documentation, there is a question of how to
organize it. This is a issue of design, and it takes thinking.

When a doc writer is faced with such a challenge, the easiest route is
a no-brainer by following the way the language is implemented. For
example, the doc will start with “data types” supported by the
language. This no-brainer stupidity is unfortunately how most language
docs are organized by, and the Python doc is one of the worst.

One can see this phenomenon in the official doc of Python's RE module.
For example, it begin with Regex Syntax, then it follows with “Module
contents”, then Regex Objects, then Match Objects. And in each page,
the functions or methods are arranged in a alphabetical order. This is
typical of the no-brainers organization following how the module is
implemented or certain “computer scientific logic”. It has remote
connection to how the module is used to perform a task.

In general, language docs should be organize by the tasks it is
supposed to accomplish, then by each module or function's
functionalities.

For example, the RE module doc, organize it by the purposes of the
module. To begin, we explain in the outset that this module is for the
purpose of search or replacing a string by a pattern. Then, we organize
with purpose and functionalities as guide.

Since Python provides a set of functions and a Object-Oriented set, we
create a page for each set, with a clear indication on how they relates
to the string pattern search/replace task. Since Python returns the
result as a special Object, we again create a section MatchObject and
clearly tells the reader what that page is about in relation to the
task. And, we also put the regex syntax on its own page, but again made
it clear what this page means in relation to the task. And in each
page, we again organize them by the guide of tasks and functionalities.
(for example, not alphabetical or some machinery logic) In this way,
the whole RE module doc is oriented to programing, not how this module
happens to be classified according to some Python idiosyncrasies or
categorization by some forced “computer science” outlook.

The complete rewritten doc is here:
http://xahlee.org/perl-python/python...module-re.html

-----

There were more issues and notes... but this will be it for today.

Xah

http://xahlee.org/

 
Reply With Quote
 
alex23
Guest
Posts: n/a
 
      05-06-2005

Xah Lee wrote:
> 99% of programers really don't need to give a flying **** about the
> history of a language.


Ironically, I'm pretty confident that the same percentage of readers on
this group feel _exactly the same way_ about your 'improvements'.

-alex23

 
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
converting XSD documentation to HTML documentation kev.sully@gmail.com XML 1 09-16-2006 12:09 PM
[perl-python] Python documentation moronicities (continued) Xah Lee Python 75 05-13-2005 04:28 PM
Python documentation: How about structured documentation? Looking for comments/suggestions Kenneth McDonald Python 2 05-06-2004 04:11 AM
Principles of documentation (was: Python Documentation Blows!) Cameron Laird Python 1 04-03-2004 06:54 PM
LyX for Python Documentation Stuart D. Gathman Python 0 07-15-2003 05:07 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57