473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to write a tutorial

i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html

Here are some quick critique:

quick example:
If the input string is too long, they don't truncate it, but return it
unchanged; this will mess up your column lay-out but that's usually
better than the alternative, which would be lying about a value. (If
you really want truncation you can always add a slice operation, as in
"x.ljust( n)[:n]".

better:
If the input string is too long, they don't truncate it, but return it
unchanged;
-----------------
delete: Reverse quotes (``) are equivalent to repr(), but their use is
discouraged.
-----------------
similarly, many places mentioning uncritical info such as warning or
reference to other languages should be deleted.

the tutorial should be simple, concise, to the point, stand along.
Perhaps 1/5th length of the tutorial should be deleted for better.
Follow the above principles.

at places often a whole paragraph on some so called computer science
jargons should be deleted. They are there more to showcase inane
technicality than do help the reader. (related, many passages with
jargons should be rewritten sans inane jargon. e.g. mutable object.)

one easy way to understand these principles is to compare perl's
documentation or unix man pages to Python's. The formers are often
irrelevant, rambling on, not stand-along (it is written such that it
unnecessarily requires the reader to be knowledgable of lots of other
things). Python docs are much better, but like many computer language
manuals, also suffers from verbiage of tech jargons. (these jargons or
passages about them are usually there to please the authors
themselves).

A exemplary writing in this direction is the Mathematica manual by
Stephen Wolfram. Any intelligent layman sans computer science degree
can read it straightforward ly, and learn unhindered a language that is
tantamount to features of lisp languages. Such documentation is not
difficult to write at all. (contrary to the lot of "computer
scientists" or IT pundits morons.) All it take is some simple
principles outlined above.
Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #1
33 1891
Xah Lee wrote:
i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html
Finally! It was about time...
Here are some quick critique:


Given that you seem to be totally inert to critique yourself - e.g. your
continued posting of useless language comparison, and the plethorea of
posts requesting to stop that and limit yourself to your mailing list - I
doubt you'll get much attention for that.

--
Regards,

Diez B. Roggisch
Jul 18 '05 #2
You should not be giving such advice! (and the crosspost ... WTF?).

I've been trying to follow along with your perl/python yahoo group, but
your posts are terrible.

Perhaps you should provide the output of the code you post. Then i'd
actually know what i'm trying to achieve. As it is i have to cut/paste
your code into an interpreter just to figure out what it does.

What does this have to do with Lisp? (i'm in c.l.l).

drewc

Xah Lee wrote:
i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html

Here are some quick critique:

quick example:
If the input string is too long, they don't truncate it, but return it
unchanged; this will mess up your column lay-out but that's usually
better than the alternative, which would be lying about a value. (If
you really want truncation you can always add a slice operation, as in
"x.ljust( n)[:n]".

better:
If the input string is too long, they don't truncate it, but return it
unchanged;
-----------------
delete: Reverse quotes (``) are equivalent to repr(), but their use is
discouraged.
-----------------
similarly, many places mentioning uncritical info such as warning or
reference to other languages should be deleted.

the tutorial should be simple, concise, to the point, stand along.
Perhaps 1/5th length of the tutorial should be deleted for better.
Follow the above principles.

at places often a whole paragraph on some so called computer science
jargons should be deleted. They are there more to showcase inane
technicality than do help the reader. (related, many passages with
jargons should be rewritten sans inane jargon. e.g. mutable object.)

one easy way to understand these principles is to compare perl's
documentation or unix man pages to Python's. The formers are often
irrelevant, rambling on, not stand-along (it is written such that it
unnecessarily requires the reader to be knowledgable of lots of other
things). Python docs are much better, but like many computer language
manuals, also suffers from verbiage of tech jargons. (these jargons or
passages about them are usually there to please the authors
themselves).

A exemplary writing in this direction is the Mathematica manual by
Stephen Wolfram. Any intelligent layman sans computer science degree
can read it straightforward ly, and learn unhindered a language that is
tantamount to features of lisp languages. Such documentation is not
difficult to write at all. (contrary to the lot of "computer
scientists" or IT pundits morons.) All it take is some simple
principles outlined above.
Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #3
>>>>> "Xah" == Xah Lee <xa*@xahlee.org > writes:

Xah> at places often a whole paragraph on some so called computer
Xah> science jargons should be deleted. They are there more to
Xah> showcase inane technicality than do help the
Xah> reader. (related, many passages with jargons should be
Xah> rewritten sans inane jargon. e.g. mutable object.)

The concept of mutable objects is extremely important in python, and
understanding is the key to answering two recurring newbie questions

* Why can't lists or dictionaries be keys to dictionaries?

* Why does using a list as a default value for a keyword argument in
a function definition often lead to unexpected results?

So it is definitely appropriate material in a tutorial.

As for jargon, it is hard to argue that "object" is inane jargon in
python. In fact, the base class for new-styled classes is indeed
"object", and if you want to write one of these classes yourself, you
need to do 'class MyClass(object) '. So object is not inane jargon in
an object oriented programming language. You still with me?

OK, now on to mutable. mutable means changeable, albeit it's a little
more of an obscure word than changeable, but it does roll off the
tongue a bit more easily. Perhaps 'changeable object' would be more
accessible to some readers, but it doesn't flow as well. So the
python tutorial should perhaps define mutable when it introduces it.
Which it does somewhat implicitly; the first time mutable is mentioned in the
docs, in the context of strings

Unlike strings, which are immutable, it is possible to change
individual elements of a list:
And now for my last musing on a new topic "How to write a critique":
It is much more constructive to suggest new text for documentation
than to brand it inane.

JDH
Jul 18 '05 #4
drewc <dr***@rift.com > wrote:
What does this have to do with Lisp? (i'm in c.l.l).


he is a troll, but one who confess this fact:

http://www.xahlee.org/Netiquette_dir/troll.html

--
Frank Buß, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Jul 18 '05 #5
Xah Lee wrote:

i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html

Here are some quick critique:


This has absolutely nothing to do with c.l.c, nor most of the
cross-posted groups. F'ups set. Why did you do such a foul
cross-posting in the first place.

--
"If you want to post a followup via groups.google.c om, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Jul 18 '05 #6
Xah Lee wrote:
i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html


What does this have to do with Perl, Lisp, Scheme, or C?

-- MJF
Jul 18 '05 #7
On Fri, 21 Jan 2005 03:08:50 -0800, Xah Lee wrote:
i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html

Here are some quick critique:


You don't have the respect points for anyone to give a damn. Step one
would be demonstrating that you understand the language enough to have a
valid opinion, which we're all still waiting on.
Jul 18 '05 #8
On Fri, 21 Jan 2005 03:08:50 -0800, Xah Lee wrote:
i've started to read python tutorial recently.
http://python.org/doc/2.3.4/tut/tut.html
(snip rest of misleading filler)
http://xahlee.org/PageTwo_dir/more.html


The first line is solipsistic (..like..'so what?'). But I think its all
misleading. The real purpose of his cross-post is to get people to visit
his website, ooh-and-ahh at his unique and daring Bush-bashing at the top,
and finally admire (along with Xah himself) the pictures he takes of
himself.

Vanity, vanity, all is vanity...

The only remaining question is 'why does he restrict his cross-posting to
this particular collection of groups?' I don't have an answer to that one.

[incidentally, I'm still cracking up over k.t. and the soldier...]
--Jeff
Jul 18 '05 #9
Daniel Bickett wrote:
Most texts in computing are written by authors to defend and showcase
their existence against their peers.

When you aren't busy `showcasing' your ignorance, this is *all* i see
in everything you write.


<snip>

Um, maybe that was his point...
Jul 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

33
3470
by: Nick Evans | last post by:
Hello there, I have been on and off learning to code (with python being the second language I have worked on after a bit of BASIC). What I really want to know is, if you are going to actually write a program or a project of some sort, how do you actually start. Picture this, you know what you want the program to do (its features), you have a possably rough idea of how the program will work. You have opened an empty text file and saved...
1
2915
by: Rhino | last post by:
Can anyone point me to a good free XSLT Tutorial online? I looked for some a few months ago and didn't find anything very good. I'm hoping some of the experts here can point me to a good XSLT tutorial..... -- Rhino --- rhino1 AT sympatico DOT ca "There are two ways of constructing a software design. One way is to make it
18
1935
by: Xah Lee | last post by:
i've started to read python tutorial recently. http://python.org/doc/2.3.4/tut/tut.html Here are some quick critique: quick example: If the input string is too long, they don't truncate it, but return it unchanged; this will mess up your column lay-out but that's usually better than the alternative, which would be lying about a value. (If you really want truncation you can always add a slice operation, as in
11
2916
by: Magnus Lycka | last post by:
While the official Python Tutorial has served its purpose well, keeping it up to date is hardly anyones top priority, and there are others who passionately create really good Python tutorials on the web. I think 'A Byte of Python' by Swaroop C H is a good beginners tutorial, and 'Dive Into Python' by Mark Pilgrim is a good tutorial for more experienced programmers.
17
1655
by: cass27 | last post by:
I am just doing a course on Javascript and have begun to try out different ideas. The effect I wanted was fro the user to click on a graphic. Aprompt box would apprear asking their name and that imfo would be transferred to the top of that page. However the users name will only appear on a seperate page. The code i am using (in brief) is as follows: function getname() {
1
1835
by: Zhang Weiwu | last post by:
Hello. I know a lot of different ways to write css that work for IE but ignored by Fx, but is there a way to let IE process XSLT but leaving Fx completely ignore the XSLT? The classic filter doesn't seem to work: <!--><?xml-stylesheet type="text/xsl" href="my.xsl"?><!--> The above seems to be ignored by both IE and Firefox P.S. In the beginning I thought finding something that works for IE but not
25
5920
by: mereba | last post by:
Hello My country Ghana is changing its currency. I want to write a small programme in C++ that can covert from the old currency into the new one. I would like this programme to run behind a simple calculator- looking interface. I'm quite new to C++, and I would need some help. Please any suggestion is welcome :) The following is what I have been able to do so far:
11
1480
by: cj | last post by:
I have used web services before WSDL files and such but never written one. I need some basic starting info. 1. Can I write a web service in a windows app? or are all web services asp web apps? In other words what type of program do I create? 2. Anyone point me to a tutorial that is very basic like write one that takes two numbers and returns the sum? 3. Getting a bit deeper now, but I need to know if to use VB 2003 or
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3900
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.