Python factoids... after 3 three years.

R

Randy Young

Python positives.

1. Python's "Bracket Paradox":

Somehow manages to be the best "first language" and best "last
language" in the world. I'm basing this statement on how successful
Python is in Secondary education, etc (esp. in Europe). and the last
language statement on Bruce Eckel and Alex etc. (some of the top of
the top programmers on the world) that publicly went Python.

2. It's the best tool to support an endeavor were the participants
aren't pure software geeks: Huge in BioPython, NumericPython, jobs
that are science related, but not pure code, code, code, all the time.

3 By far and I mean by a ton, the best language to use, put down, and
then pick UP AGAIN. Shortest learning curve to get back up to speed on
the toolset, and the code you wrote to do the initial task.

Randy
 
F

Fred Pacquier

(e-mail address removed) (Randy Young) said :
Python positives.

3 By far and I mean by a ton, the best language to use, put down, and
then pick UP AGAIN. Shortest learning curve to get back up to speed on
the toolset, and the code you wrote to do the initial task.

Ay-men ! ;-)
 
P

Peter Hansen

Randy said:
Python positives.
...
3 By far and I mean by a ton, the best language to use, put down, and
then pick UP AGAIN.

I, uh, don't understand this... _why_ would someone drop Python?

:)

-Peter
 
L

Larry goodman

Python is wonderful but its missing one thing. A really good IDE that
includes a usable forms designer. God I wish Borland would make a
python IDE.
 
A

Alex Martelli

Larry said:
Python is wonderful but its missing one thing. A really good IDE that
includes a usable forms designer. God I wish Borland would make a
python IDE.

I think BlackAdder is a (commercial) good IDE that includes
a usable screen-painter. 1.0 just got out of beta and is right
now suffering a few adjustments/instabilities, admittedly...


Alex
 
J

Jules Dubois

On Tue, 07 Oct 2003 11:36:00 -0400, in article
I, uh, don't understand this... _why_ would someone drop Python?

Because there's another language better suited to the problem domain. I
haven't touched it in many years, and don't particularly care to, but if my
problem involved heavy-duty unification on text, SNOBOL (or maybe Icon) is
ideal for the task.

Point taken.
 
L

Larry goodman

I think BlackAdder is a (commercial) good IDE that includes
a usable screen-painter. 1.0 just got out of beta and is right
now suffering a few adjustments/instabilities, admittedly...
yeh i bought the personal version. Bug ridden and it doesnt even have
code completion. Its still a good deal though because it does give
you a QT/PyQt license.
 
N

Nick Vargish

Larry goodman said:
Python is wonderful but its missing one thing. A really good IDE that
includes a usable forms designer. God I wish Borland would make a
python IDE.

Have you looked at Komodo from ActiveState? I haven't used the GUI
builder, which seems to be an important componenet for you, but the
Pro version does include one. Of the features that I have used, I've
been impressed with Komodo -- though at heart I'm more an Emacs person
than an IDE person.

Nick
 
H

Harry George

Stephen Horne said:
You've just got me curious about this. I certainly have no complaints
about Python in this regard, but in general I think code readability
depends on the programmer more than anything.

Being a packrat, I still have pretty much all the code I've ever
written (excluding that written in defence companies) since I retired
my old Commodore 64. Actually, I even have some old C64 source code
that I managed to recover from the tapes into an emulator! This seemed
a bit extreme, though.

In the end, I decided to go for some 68000 assembler code I wrote for
an old college project in 1992 (one component in a distributed
'environment control system' using what the college called 'flight
boards'). I can assure you I haven't read this code for a long time -
it's only a couple of years later that I retired my Atari ST and
stopped using 68000 assembler, and I haven't used any assembler at all
since about 1996.

So that's about 27K of assembler code, 11 years old, and I haven't use
any form of assembler for about 7 years (though I've looked at .NET IL
assembler a couple of times recently ;-) ).

I remember being so proud of it at the time - now it seems such a
trivial piece of code. Certainly I can read it fine. The only problem
is that some stuff that tweaks hardware registers uses bitmasks
without explaining the register layout. Mostly, the code is clear
enough that I can figure that out, but these days I'd put that extra
comment in just to save the next reader the job of working it out or
looking it up in the manual (if they have the manual, that is - I
certainly don't).

Also looked at some 8086 assembler from 1993 - another college
project, this time a simple serial-port LAN. Most of the apps code
(IIRC we had file transfer and remote printing) was in modula 2, but I
wrote the TSR packet queueing, sending and recieving - about 1000
lines.

I was surprised by the difference in style - sometimes commenting
every line, and rarely with more than a few lines between comments. I
certainly never found 8086 assembler as intuitive as 68000, but even
so the commenting seems a bit over the top. With the
typical-of-assembler formatting into columns, the comments don't get
in the way however. Once again, it is perfectly readable - at least to
me.

Basically, I think that fits my usual experience. I don't remember the
last time I had a problem reading my own code, whatever language it
was written in and however long since I last looked at it.

Reading other peoples code, of course, is a very different thing - but
once again it has more to do with the programmer(s) than the language
IMO. Python certainly makes it easy to write easy-to-read code, where
some languages make it much harder, but some programmers just love to
write cryptic code. Some C programmers even seem to treat the winners
of the obfuscated C contest as some kind of style guide :-(

I agree it is more the programmer than the language. Specifically, I
think it correlates to the programmer's facility with
rewriting-for-clarity in any medium (e.g., writing prose).

Still, having saved a great deal of code over many years and several
languages (BASIC, C, C++, COBOL, FORTRAN, Lisp, Modula-2, Modula-3,
Pascal, Perl, Prolog, Python), I find that language does matter. For
me, Modula-3 is the clearest for datatypes and bit-twiddling
algorithms, and python is the clearest for general-purpose and
"computer science" algorithms. Despite my best efforts, my own perl
code is hard to pick up years later. It is the syntax itself that
throws me off -- I can't remember the squiggles mean.

As for readability of others' code in teaming or XP settings: If the
other tema members are good at readability, then we will clash on
conventions and maybe agree to disagree in places, but will also learn
from each others idioms during code reviews. So for a full team, we
will rapidly grow toward pretty clean code.

But when a team member is clueless about readability, you have to do
some mentoring. I work one-on-one (basically XP without the time
pressure), and we gradually refactor, improve naming conventions, and
add comments and white space. Each editing transform is understood
and accepted. Eventually we get it clean enough that we can see the
"forest for the trees", and maybe select better algorithms. Along
about then, the mentee admits the code is getting better.

After getting to clean code, we discuss the process we've just used.
I point out that this can and should be done as the program grows, not
just done as a last minute cleanup. One such exercise does not make
massive improvements in the mentee's style, but several, plus peer
code reviews can get results.

Note: I've sometimes found that people who write unreadable code say
they don't want to change anything because it might break (as if they
had just been lucky to get it to work at all). But after cleanup,
they admit that they actually understand the code and why it works.
 
S

Stephen Horne

I, uh, don't understand this... _why_ would someone drop Python?

Several possible reasons. Actually, not all of the possible reasons
leave you wanting to kill your boss. Just most of them ;-)
 
S

Stephen Horne

3 By far and I mean by a ton, the best language to use, put down, and
then pick UP AGAIN. Shortest learning curve to get back up to speed on
the toolset, and the code you wrote to do the initial task.

You've just got me curious about this. I certainly have no complaints
about Python in this regard, but in general I think code readability
depends on the programmer more than anything.

Being a packrat, I still have pretty much all the code I've ever
written (excluding that written in defence companies) since I retired
my old Commodore 64. Actually, I even have some old C64 source code
that I managed to recover from the tapes into an emulator! This seemed
a bit extreme, though.

In the end, I decided to go for some 68000 assembler code I wrote for
an old college project in 1992 (one component in a distributed
'environment control system' using what the college called 'flight
boards'). I can assure you I haven't read this code for a long time -
it's only a couple of years later that I retired my Atari ST and
stopped using 68000 assembler, and I haven't used any assembler at all
since about 1996.

So that's about 27K of assembler code, 11 years old, and I haven't use
any form of assembler for about 7 years (though I've looked at .NET IL
assembler a couple of times recently ;-) ).

I remember being so proud of it at the time - now it seems such a
trivial piece of code. Certainly I can read it fine. The only problem
is that some stuff that tweaks hardware registers uses bitmasks
without explaining the register layout. Mostly, the code is clear
enough that I can figure that out, but these days I'd put that extra
comment in just to save the next reader the job of working it out or
looking it up in the manual (if they have the manual, that is - I
certainly don't).

Also looked at some 8086 assembler from 1993 - another college
project, this time a simple serial-port LAN. Most of the apps code
(IIRC we had file transfer and remote printing) was in modula 2, but I
wrote the TSR packet queueing, sending and recieving - about 1000
lines.

I was surprised by the difference in style - sometimes commenting
every line, and rarely with more than a few lines between comments. I
certainly never found 8086 assembler as intuitive as 68000, but even
so the commenting seems a bit over the top. With the
typical-of-assembler formatting into columns, the comments don't get
in the way however. Once again, it is perfectly readable - at least to
me.

Basically, I think that fits my usual experience. I don't remember the
last time I had a problem reading my own code, whatever language it
was written in and however long since I last looked at it.

Reading other peoples code, of course, is a very different thing - but
once again it has more to do with the programmer(s) than the language
IMO. Python certainly makes it easy to write easy-to-read code, where
some languages make it much harder, but some programmers just love to
write cryptic code. Some C programmers even seem to treat the winners
of the obfuscated C contest as some kind of style guide :-(
 
G

Geoff Howland

Have you looked at Komodo from ActiveState? I haven't used the GUI
builder, which seems to be an important componenet for you, but the
Pro version does include one. Of the features that I have used, I've
been impressed with Komodo -- though at heart I'm more an Emacs person
than an IDE person.

I really like Komodo. I initially bought their Visual Python plugin
for VS7 and liked it, but due to some problems I had to switch to
Komodo for a while. I never switched back because I ended up liking
working in Komodo better.

It also works on Linux, though there are a few shortcuts missing in
the debugging but otherwise it is complete. (Hint hint ActiveState,
put in CTRL+F5 to run immediately, and F10 to start. Why not have
them all?)

I've never used their Tk builder thing, since I think wxPython is the
way to go. (Againt, Hint hint ActiveState)


-Geoff Howland
http://ludumdare.com/
 

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
474,166
Messages
2,570,907
Members
47,448
Latest member
DeanaQ4445

Latest Threads

Top