Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Ville Vainio
 Sunnan == Sunnan  [EMAIL PROTECTED] writes:

Sunnan It's just that I'm having a hard time matching that quote
Sunnan to what I though python was about. I thought boring code
Sunnan was considered a virtue in python. (Explicit is better
Sunnan than implicit, sparse is better than dense.)

Boring code is code that numbs your senses with constant flow of
boilerplate crap, memory management and redundant type declarations
and general blah blah that you skip when you are trying to figure out
what a piece of code does. It's a code that you wish you could train a
monkey to write for you while you go for lunch. Think C++ or Java.

-- 
Ville Vainio   http://tinyurl.com/2prnb
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Sunnan
Ville Vainio wrote:
Boring code is code that numbs your senses with constant flow of
boilerplate crap, memory management and redundant type declarations
and general blah blah that you skip when you are trying to figure out
what a piece of code does.
The python code I've read so far has looked like that. Not type 
declarations, but lng class declarations.

Also, Guido recently urged people to explicitly write recursions rather 
than to use reduce - which I thought was completely in line with what 
I've seen as python's goals: readability/understandability as more 
important than terseness/non-boringness.

 It's a code that you wish you could train a
monkey to write for you while you go for lunch. Think C++ or Java.
Oh, yes. C++ and Java can be super boring. C++ can also be pretty hard 
to understand - it's not all boilerplate.

I'm not saying Python is always boring (maybe I've just been in an 
easily bored mood when I've read Python stuff), and I'm not saying that 
boring is always bad.

Yesterday, I read some marketing prop describing a proprietary IDE 
(don't remember what language) as exciting, and I went Ugh, no 
thanks! Give me calm computing. And then I thought - wait: I just 
ranted about boringness on comp.lang.python. Can't boring and calm 
sometimes mean the same thing?
--
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Ville Vainio
 Sunnan == Sunnan  [EMAIL PROTECTED] writes:

Sunnan Ville Vainio wrote:

Sunnan Also, Guido recently urged people to explicitly write
Sunnan recursions rather than to use reduce - which I thought was
Sunnan completely in line with what I've seen as python's goals:
Sunnan readability/understandability as more important than
Sunnan terseness/non-boringness.

The problem w/ reduce is that it's not intuitive. You'll have to stop
to think what the code w/ reduce does - effectively converting it to a
normal loop (not recursion!) in your head. It's a net loss when you
compare it to just reading an explicit loop as written in code.

Sunnan Yesterday, I read some marketing prop describing a
Sunnan proprietary IDE (don't remember what language) as
Sunnan exciting, and I went Ugh, no thanks! Give me calm
Sunnan computing. And then I thought - wait: I just ranted about
Sunnan boringness on comp.lang.python. Can't boring and calm
Sunnan sometimes mean the same thing?

Not for me at least. 'Boring' implies a certain sense of frustration,
not getting anywhere and generally feeling like you are wasting your
time. Human attention is a limited resource, and being bored leads to
loss of attention.

-- 
Ville Vainio   http://tinyurl.com/2prnb
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Michele Simionato
Sunnan:

 The python code I've read so far has looked like that. Not  type
declarations, but lng class declarations.

What do you mean? Lots of repetitive
self.variable=variable in the __init__ method? Use of classes when
you would use closures? Or maybe you
are comparing with CLOS classes, which are pretty
slim, since the (multi)methods are defined outside
them?

  Michele Simionato

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread bruno modulix
Sunnan wrote:
Aahz wrote:
(snip)
print foo is, foo

Is the space added automatically? (Like awk does, if you add a comma.)
Yes. But you can also format it how you like:
  print foo is %s and that's a good news, my friends % foo
--
bruno desthuilliers
python -c print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for 
p in '[EMAIL PROTECTED]'.split('@')])
--
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-06 Thread Greg Ewing
Sunnan == Sunnan  [EMAIL PROTECTED] writes:

Sunnan It's just that I'm having a hard time matching that quote
Sunnan to what I though python was about. I thought boring code
Sunnan was considered a virtue in python.
There's a difference between unsurprising and boring.
The coffee I drank this afternoon, for instance, did
not surprise me, but I still enjoyed it.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,   
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
--
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-03 Thread Sunnan
Aahz wrote:
Note very, VERY, *VERY* carefully that the quote says nothing about
boring code.  The quote explicitly refers to reams of trivial code
as boring -- and that's quite true.  Consider this distinction:
Thank you for this important clarification.
if foo == 'red':
print 'foo is red'
elif foo == 'blue':
print 'foo is blue'
versus
print foo is, foo
Is the space added automatically? (Like awk does, if you add a comma.)
I'm sure you can think of many other examples -- real examples -- if you
put your mind to work; Guido's point is about the essential necessity of
refactoring and rewriting code for conciseness and clarity.
Which is a good point to make in almost any language, for code that is 
to be maintained.

Sunnan
--
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-02 Thread Sunnan
Tim Peters wrote:
[Aahz]
The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams of trivial code that bores the reader to death.  --GvR

[Sunnan]
Can anyone please point me to the text that quote was taken from? I
tried to use a search engine but I only found quotations, not the source.

That's because it was originally in email to a company-internal
mailing list.  If you're willing to move to Fredericksburg, VA and
work for Zope Corp, perhaps they'll let you in to the PythonLabs list
archives.  Fair warning:  I work for Zope Corp, and I'm not sure I can
get into those archives.  So don't switch jobs _just_ for that.
It's just that I'm having a hard time matching that quote to what I 
though python was about. I thought boring code was considered a virtue 
in python. (Explicit is better than implicit, sparse is better than 
dense.)

Because what is boring? The opposite of dense, tense, intense. Utterly 
predictable; it's like the combination of all my prejudices. Even before 
I knew, I thought Bet Python separates statements from expressions.

Sunnan
PS.
(People easily offended can substitute boring for readable in the 
above text.)
--
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-02 Thread Aahz
In article [EMAIL PROTECTED],
Sunnan  [EMAIL PROTECTED] wrote:
 [Aahz]
 
The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams of trivial code that bores the reader to death.  --GvR

It's just that I'm having a hard time matching that quote to what I 
though python was about. I thought boring code was considered a virtue 
in python. (Explicit is better than implicit, sparse is better than 
dense.)

Because what is boring? The opposite of dense, tense, intense. Utterly 
predictable; it's like the combination of all my prejudices. Even before 
I knew, I thought Bet Python separates statements from expressions.

Note very, VERY, *VERY* carefully that the quote says nothing about
boring code.  The quote explicitly refers to reams of trivial code
as boring -- and that's quite true.  Consider this distinction:

if foo == 'red':
print 'foo is red'
elif foo == 'blue':
print 'foo is blue'

versus

print foo is, foo

I'm sure you can think of many other examples -- real examples -- if you
put your mind to work; Guido's point is about the essential necessity of
refactoring and rewriting code for conciseness and clarity.
-- 
Aahz ([EMAIL PROTECTED])   * http://www.pythoncraft.com/

The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death.  --GvR
-- 
http://mail.python.org/mailman/listinfo/python-list


boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-01 Thread Sunnan
Aahz wrote:
The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death.  --GvR
Can anyone please point me to the text that quote was taken from? I 
tried to use a search engine but I only found quotations, not the source.
Sunnan
--
http://mail.python.org/mailman/listinfo/python-list


Re: boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw

2005-04-01 Thread Tim Peters
[Aahz]
 The joy of coding Python should be in seeing short, concise, readable
 classes that express a lot of action in a small amount of clear code --
 not in reams of trivial code that bores the reader to death.  --GvR

[Sunnan]
 Can anyone please point me to the text that quote was taken from? I
 tried to use a search engine but I only found quotations, not the source.

That's because it was originally in email to a company-internal
mailing list.  If you're willing to move to Fredericksburg, VA and
work for Zope Corp, perhaps they'll let you in to the PythonLabs list
archives.  Fair warning:  I work for Zope Corp, and I'm not sure I can
get into those archives.  So don't switch jobs _just_ for that.
-- 
http://mail.python.org/mailman/listinfo/python-list