The Artima Developer Community
Sponsored Link

Weblogs Forum
Python IDEs

68 replies on 5 pages. Most recent reply: Mar 9, 2006 12:32 PM by Bruce Eckel

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 68 replies on 5 pages [ « | 1 ... 2 3 4 5 ]
Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Python IDEs Posted: Mar 4, 2006 12:32 PM
Reply to this message Reply
Advertisement
I just came across this review of 6 python IDEs:
http://spyced.blogspot.com/2005/09/review-of-6-python-ides.html

Oddly, it doesn't review SPE, which so far I've found pretty good (I started using it for a project I'm working on, and haven't had any reason to stop so far). SPE has reasonably good command completion, and automatically checks code with Python and Tabnanny, so you see some errors without running the program. It even automatically creates UML diagrams, although I haven't used that much so far. But SPE certainly seems worth a look.

Jim Jewett

Posts: 11
Nickname: jimj
Registered: Apr, 2005

IDES for boilerplate like java Posted: Mar 8, 2006 11:37 AM
Reply to this message Reply
> Getters and setters are still the only
> meaningful example put forward in this
> discussion.

Bruce Eckel's original post mentioned iterting
over a file. getters and setters are the obvious
example, but the real problem is that everything
is long and spread out.

Jim Jewett

Posts: 11
Nickname: jimj
Registered: Apr, 2005

get/set for data hiding Posted: Mar 8, 2006 11:48 AM
Reply to this message Reply
> I agree about the boilerplate, but definitely
> not with the statement that IDEs are there to
> produce boilerplate.

But in practice, they do. If the boilerplate is
needed, that is a language problem, but often it
isn't -- it was just easier to run the IDE on
autopilot and shift cost to later maintainers.

> it is a matter of good
> practice to expose data only if necessary. In that
> respect, I see the getter/setter idiom as useful because
> it forces the programmer to make a conscious decision.

You aren't forced to make a decision if there is
a default, such as the IDE provides.

In python, the default is that attributes are exposed.
If you do think about it, and want them private,
or exposed to subclasses but not clients, then there
are naming conventions with some language support.

If you later decide that an attribute really ought
to be a property method so you can hook get requests,
you can make that change later, and it is invisible
to clients (unless they do explicit introspection).

Jim Jewett

Posts: 11
Nickname: jimj
Registered: Apr, 2005

Re: Python IDEs Posted: Mar 8, 2006 12:06 PM
Reply to this message Reply
> Personally I would hate to work on any
> significant system without the following:
> 1. Go to declaration (for variables, methods, classes
> across files and into libraries)
> 2. Find references/uses (again for variables, classes,
> methods and across all files)
> 3. Type hierarchy

You're still thinking batch mode compile; python
works much better with an interactive session.
In my personal experience, I use python more
interactively than I used Common Lisp.

So these are indeed useful (though different from
a static language), but they're part of the run time
rather than an editor. If you can run python, then
you have access to the runtime; you won't be
stranded if you go to a new box.

> Perhaps there aren't as many big Python systems

True, but that is partly because python code is
often equivalent to a much longer java or C program --
so they would be large if they weren't in python.

That said, the largest python projects (Zope, Twisted)
are not easy to grok immediately. In fairness, neither
are most large C projects, but the sense of being lost
is unfamiliar in python.

> Code completion is also more than just saving you typing.
...
> Syntax checking in your IDE gives you something that is in
> some ways more useful than a REPL

And again, these come with python out of the box.

> ... If I define a procedure in Scheme (and I would
> guess languages with REPLs) I have to finish the
> definition before it gives me any feedback.

Python doesn't wait that long.

> Quick fixes in Eclipse can also change your programming
> style as they encourage a top down style. You write your
> top level method then the methods you haven't implemented
> yet are highlighted so you can go through them one by one
> and implement them (using quick fix to create the outline)

Again, if you want clean compiles from a static language,
you have to fill in at least stubs -- but python is
not static, and doesn't require that. Top-down works
fine. And if you forgot what was next on the todo list,
then just run it, and the Exception will remind.

Vincent O'Sullivan

Posts: 724
Nickname: vincent
Registered: Nov, 2002

Re: Python IDEs Posted: Mar 9, 2006 2:39 AM
Reply to this message Reply
> And if you forgot what was next on the todo list,
> then just run it, and the Exception will remind.

Running a program to see if it falls over, and then debugging it, is the province of the amateur.

Ramzi Ben Yahia

Posts: 23
Nickname: miccheck
Registered: Jul, 2002

Re: Python IDEs Posted: Mar 9, 2006 4:47 AM
Reply to this message Reply
> Running a program to see if it falls over, and then
> debugging it, is the province of the amateur.
he should have said "run the unit tests"

piglet

Posts: 63
Nickname: piglet
Registered: Dec, 2005

Re: get/set for data hiding Posted: Mar 9, 2006 8:43 AM
Reply to this message Reply
"Bruce Eckel's original post mentioned iterting
over a file. getters and setters are the obvious
example, but the real problem is that everything
is long and spread out."


It is true that the Java io API is less than intuitive, with all those decorator classes. If Python's API is cleaner, so much for the better. Don't try to make us believe that file operations make Java programs "long and spread out". As Bruce has pointed out himself in the original post, it is easy to write your own little helper method that will allow you to read a file in no more code than it takes in Python, and this is what competent programmers routinely do. So this is an API rather than a language issue.

But in practice, they do. [produce boiler plate]
At least it's not what I do, in practice, with my IDE.

You aren't forced to make a decision if there is
a default, such as the IDE provides.

The Java default is no access. If I want to expose a private field, I have to ask Eclipse for getters and (if appropriate) setters. The Python way (everything is exposed by default and you have to make a deliberate decision to restrict access) is in my view definitely the wrong way round. In your experience, how often do Pythonists actually implement read-only attributes?

piglet

Posts: 63
Nickname: piglet
Registered: Dec, 2005

Re: Python IDEs Posted: Mar 9, 2006 9:39 AM
Reply to this message Reply
True, but that is partly because python code is often equivalent to a much longer java or C program -- so they would be large if they weren't in python.

"Large system" is measured in abstraction complexity (number of classes is an approximation in OO), not in lines of code.

Again, if you want clean compiles from a static language,
you have to fill in at least stubs -- but python is
not static, and doesn't require that. Top-down works
fine. And if you forgot what was next on the todo list,
then just run it, and the Exception will remind.


If your system is small enough for a single programmer to oversee, maybe. But you can't seriously recommend that approach if you are talking large systems. You can't expect that exception to appear at once to remind you what you've forgotten - it might happen much later, possibly too late. If you do refactoring in a large system, trial and error is simply not an option. I absolutely agree with Vincent.

Ramzi has made an interesting remark: he should have said "run the unit tests". Unit tests are fine, but if you have to write unit tests instead of writing method stubs just in order to check what in a static language is checked automatically by the compiler, then you can hardly claim to have made the task easier and gained productivity.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: get/set for data hiding Posted: Mar 9, 2006 12:32 PM
Reply to this message Reply
> As Bruce has pointed out himself in the
> original post, it is easy to write your own little helper
> method that will allow you to read a file in no more code
> than it takes in Python, and this is what competent
> programmers routinely do.

I wouldn't say it was easy; I think the TextFile class came from design experience, and I've never seen such a thing before. It's a class that ought to have been added to the Java standard library in version 1.1. Java has embraced far too many obscure idioms, and the standard reply to complaints is that "this is the Java way of doing things."

Flat View: This topic has 68 replies on 5 pages [ « | 2  3  4  5 ]
Topic: Which Part of  "No XML" Don't You Understand? Previous Topic   Next Topic Topic: The Backside of an Interface

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use