end of print = lower productivity ?

L

Lie

Hi Pythonistas,

I read diaz's comments with interest, but - in my current configuration, I'm unable to use pdb.

I'm developing on cygwin and use wxPython.
Consequently, I cannot use native cygwin Python, but my Python is actually the Windows XP Python (i.e.,  /cygdrive/c/Python25/python.exe).
This means that pdb (and, for that matter any Python shell (like IDLE)) gets stuck upon invocation.

I was wandering: is anybody able to use native Python on cygwin, or alternately, to use Windows Python under cygwin in IDLE/pdb ?

Thanks,
Ron.

-----Original Message-----
From: Diez B. Roggisch [mailto:[email protected]]
Sent: Tuesday, November 25, 2008 17:54
To: (e-mail address removed)
Subject: Re: end of print = lower productivity ?

I want my productivity back.
In Python 2.x, I could easily write things like -- print "f" / print
"add" / print "done" -- to a lot of different places in my code, which
...
debugging tool it was.

I used to use print a lot. Once I found

import pdb; pdb.set_trace()

I massively lost interest in it. And gained *much* more debugging power/productivity.

Also, using logging instead of print allows you to keep the output producing statements in your code, while turning them on only if things get fishy..

Diez

A joke indeed.

pdb and logging is too much for beginners, which most likely does not
yet understand the workings of the debugger and logger (and pdb's many
quirks). Don't forget that we're all beginners once. Python's learning
curve shouldn't raise with time, it should get lower so more people
can join in the board.
 
T

Tim Chase

It's not so much "ridiculous" as a failure of your editor to
seriously, I don't think anyone in Windows uses vim

Are you just guessing, or do you have any sort of facts to
back this up? It's my editor of choice when I'm stuck in
Windows, and as a long-time member of the vim mailing list,
there's a pretty even split between platforms. Vim (and
similarly Emacs) has the additional benefits that I have the
same environment no matter what platform I'm on, and it's
usable over a ssh connection.
Since when is python becoming exclusive community for
Linux/Unix-like/Cygwin users that Windows users who have
nothing but Notepad is put aside.

Never has been, nor will be. Python only requires a text
editor. If typing a few extra parens for "print"ing is the
worst of your efficiency concerns in Notepad, you need to go
out and see what productivity-enhancing features other
text-editors offer. On Win32, you *can* write Python code
using Notepad, Wordpad, edit.exe or edlin.exe all from a
virgin install. However, you can use *any* text-editor you
want, whether vim, emacs, Eclipse, WingIDE, Komodo, or any
of a multitude of others. If you develop on/for multiple
platforms, it helps to choose a cross-platform editor. I
wouldn't consider *any* of the stock Win32 editors even
remotely capable of long-term functionality (regardless of
py2.6 vs py3k), so downloading another editor is almost a
given -- whether that's vim, emacs, Eclipse, or whatever.
I, for instance, hates when my text editors tries to be
smarter than me. [snip]
Net gain: 5 characters in old-Python and 6 characters in
new-Python ;-)

Is that supposed to be a joke?

Keystroke golf is no more a joke than your obstinate
insistence against "smart editors" (i.e. "editors you can
configure to behave the way you want and make your life
easier").

Unless mandated by your job, use what makes you most
productive -- whether that's the programming language, the
version of the programming language, the operating system,
office furniture, music selection, or your text-editor/IDE.

So when the language gives you newfound powers (ability to
redefine "print") at the cost of something a good editor
will readily expropriate, if you have problems, it's a
failure of your editor, not the language.

-tkc
[the Python 2.x programming, Linux running, comfy-chair-sitting,
neoclassical-guitar-listening vim user]
 
A

alex23

Python's learning
curve shouldn't raise with time, it should get lower so more people
can join in the board.

I understand the altruistic urge present in such a desire. At the risk
of being considered an elitist, as a professional programmer using
Python in several large projects I think that nothing will brand
Python a toy-language more than favouring ease-of-uninitiated-use
requirements over those of long term developers. Bear them in mind,
yes; provide lower-level documentation explaining the underlying model/
reason behind aspects of the language, yes; make it the new LOGO, no.
 
C

Carl Banks

Python's learning
curve shouldn't raise with time, it should get lower so more people
can join in the board.


print function should give a newbie less to learn than a print
statement, since statements have their own syntax (and the print
statement had lots of peculiarities), whereas all function calls
follow the same syntax.


Carl Banks
 
L

Lie Ryan

Are you just guessing, or do you have any sort of facts to
back this up? It's my editor of choice when I'm stuck in
Windows, and as a long-time member of the vim mailing list,
there's a pretty even split between platforms. Vim (and
similarly Emacs) has the additional benefits that I have the
same environment no matter what platform I'm on, and it's
usable over a ssh connection.

I know vim is available in windows, but I know nobody but those that
comes from unix-like world that use vim instead of Notepad, Notepad2,
Notepad++, NoteTab, Programmer's Notepad, and multitude other Windows
text editors/Notepad replacement.

For a proof, let's see what Google has to say about this: "Windows text
editor". Vim is on page 3, near the turning point where nobody is
talking about text-editor anymore and more about text-editor reviews.
Even worse is Emacs, on page 6, after many other popular text-editors
have been mentioned several times.
Never has been, nor will be. Python only requires a text
editor. If typing a few extra parens for "print"ing is the
worst of your efficiency concerns in Notepad, you need to go
out and see what productivity-enhancing features other
text-editors offer. On Win32, you *can* write Python code
using Notepad, Wordpad, edit.exe or edlin.exe all from a
virgin install. However, you can use *any* text-editor you
want, whether vim, emacs, Eclipse, WingIDE, Komodo, or any
of a multitude of others. If you develop on/for multiple
platforms, it helps to choose a cross-platform editor. I
wouldn't consider *any* of the stock Win32 editors even
remotely capable of long-term functionality (regardless of
py2.6 vs py3k), so downloading another editor is almost a
given -- whether that's vim, emacs, Eclipse, or whatever.

I live amongst many Windows users and I was a Windows user (note the
past tense). In the Windows world, when the operating system ships with
a half-decent program, the way most people would go is to live with it
(which is why everyone uses IE6 instead of installing a multitude of
better alternative browsers). IDLE is installed with default Windows
python installation because practically nobody cares to search for
better text editors (IDLE is not perfect, but it is much better than
Notepad).
I, for instance, hates when my text editors tries to be
smarter than me. [snip]
Net gain: 5 characters in old-Python and 6 characters in
new-Python ;-)

Is that supposed to be a joke?

Keystroke golf is no more a joke than your obstinate
insistence against "smart editors" (i.e. "editors you can
configure to behave the way you want and make your life
easier").

I have nothing against smart editors, as long as it doesn't outsmart me.
I like syntax editing, since it gives visual cues to things. But I hate
autocompletion, since it takes control out of me. I much prefer it
highlights the unclosed pair[1], and let me fix it myself. I like
(though never missed) the so-called IntelliSense or omnicompletion since
it only gives suggestions, instead of outsmarting me to complete what
I'm typing without my permission. I like Firefox's default
autocompletion which gives list of urls in a dropdown box, instead of
replacing what I'm writing for the same reason.

[1] but not popping error message like Visual Basic 6

Unix philosophy: Worse is better. Small is beautiful. KISS -- Keep It
Simple and Stupid.

Python's Zen: Simple is better than complex. Complex is better than
complicated.

And "less is more". ;)
Unless mandated by your job, use what makes you most
productive -- whether that's the programming language, the
version of the programming language, the operating system,
office furniture, music selection, or your text-editor/IDE.

So when the language gives you newfound powers (ability to
redefine "print") at the cost of something a good editor
will readily expropriate, if you have problems, it's a
failure of your editor, not the language.

I don't hate print-as-function, but when someone hates smart-ass editors
as much as me coupled with their hate of print-function's use of more
shift-key, they'll hate print-as-function with a reason and no possible
fix. I am explaining their viewpoints.
 
T

Tim Roberts

Lie Ryan said:
I know vim is available in windows, but I know nobody but those that
comes from unix-like world that use vim instead of Notepad, Notepad2,
Notepad++, NoteTab, Programmer's Notepad, and multitude other Windows
text editors/Notepad replacement.

You are falling into the very common trap of believing that everyone must
be exactly like yourself. You are wrong. I don't claim that vim is the
most popular Windows editor (I have to believe that Visual Studio is), but
the vim community in Windows is strong, active, and well-populated.

I suspect this is especially true in the Python world. Many Python
devotees spend time in multiple operating systems, where vim and emacs
proficiency is essential.
 
L

Lawrence D'Oliveiro

In message
Now the print statement disappeared, and I have to write print("f")
instead. These parentheses not only take time to write, they also make
me think twice about using print for debugging purposes.

Trouble is, print defaulted to printing to stdout, and I usually wanted
debug messages to go to stderr. So print saved me nothing, which is why I
never got into the habit of using it.
 
T

Tim Chase

For a proof, let's see what Google has to say about this:
"Windows text editor". Vim is on page 3, near the turning
point where nobody is talking about text-editor anymore and
more about text-editor reviews. Even worse is Emacs, on page
6, after many other popular text-editors have been mentioned
several times.

That's a pretty malformed "proof":

http://www.google.com/search?q=people you should listen to regarding choice of text-editor

You don't appear anywhere in the top *10* pages...QED ;-)

However, if you want to play that game, vim.org appears on page #1 of

http://www.google.com/search?q=best+text+editor

Use what editor works for you -- but if evolution in the
language's features makes difficulties for you but not for users
of other editors, it's your editor that's the problem, not the
language.

Viva-la-print-function'ly yers,

-tkc
 
J

J. Cliff Dyer

pdb and logging is too much for beginners, which most likely does not
yet understand the workings of the debugger and logger (and pdb's many
quirks). Don't forget that we're all beginners once. Python's learning
curve shouldn't raise with time, it should get lower so more people
can join in the board.
INFO:root:abc


Ooh. Tough one.

The only thing that's missing is to have this clearly documented in
tutorials. (Maybe level 2, once you've learned the basics).

And if that's too hard for you, you can still use print("HERE!"). But
why sweat the "productivity loss" of the two parens when robust logging
is really that easy, and can be turned on or off at one place?
 
F

Fernando H. Sanches

At first I also disliked print's new syntax, but later I realised it
could be useful.

However, I agree that the parentheses are annoying. Not because of the
parens theirselves, but because of the Shift key.

Why programmers stilll can't have special keyboards with parens keys
that doesn't need pressing "shift"? Isn't time C programmers have a
"&" key and perl programmers a $ one? And why the heck we need shift
for "(" and not for "[" or "{", since the first one is much more used
(even outside programming)?

Really, we don't need to change our syntax, we need to change our
keyboards. We are so blinded by tradition that we are losing
productivity.
 
S

Steven D'Aprano

That's a pretty malformed "proof"

You're right, it is not "proof", but it is damn good evidence that vim
has got a small mindshare among the general Windows-only text editor
using population.

However, if you want to play that game, vim.org appears on page #1 of

http://www.google.com/search?q=best+text+editor

Is that prefixed by "not even close to"? *grin*

Use what editor works for you -- but if evolution in the language's
features makes difficulties for you but not for users of other editors,
it's your editor that's the problem, not the language.

Well, maybe. I think it is quite legitimate to say that APL is the
problem, not the lack of good editors (not to mention keyboards!) for all
the weird special characters it uses.

But in context, I agree with you.
 
L

Lie Ryan

That's a pretty malformed "proof":

http://www.google.com/search?q=people you should listen to regarding choice of text-editor

You don't appear anywhere in the top *10* pages...QED ;-)

That's a pretty malformed dis-proof.
However, if you want to play that game, vim.org appears on page #1 of

http://www.google.com/search?q=best+text+editor

Not a valid proof. When people queried for "best text editor", they'll
be looking for reviews instead of official site of text editor. So the
placement of vim.org in the first page for "best text editor" is out of
context (although I do agree that vim is one of the best editor, if not
the best, in terms of power and speed).
Use what editor works for you -- but if evolution in the
language's features makes difficulties for you but not for users
of other editors, it's your editor that's the problem, not the
language.

Personally, I don't think having two parens is adding much difficulties,
but I symphatize those who think it is.

Actually I wanna say:
It's vi(m)'s fault for being too powerful making its avid users doesn't
care about users of other editors. Not many text editors are nearly as
powerful as vi(m) (or emacs), although most (all?) are much easier to
use for day-to-day editing.

but I don't want to start a war here.
 

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,777
Messages
2,569,604
Members
45,216
Latest member
topweb3twitterchannels

Latest Threads

Top