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 | » ]
Paddy McCarthy

Posts: 12
Nickname: paddy3118
Registered: Dec, 2005

Re: Shit or chocolate? Posted: Feb 21, 2006 11:11 AM
Reply to this message Reply
Advertisement
Hurrah your put off Python! I'd prefer not to have to read subjects like that on c.l.p.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Python IDEs Posted: Feb 22, 2006 2:38 PM
Reply to this message Reply
Seems like there's some confusion, so let me clarify. I certainly don't mean to say IDEs are bad or worthless. Only that I haven't been using them. I can definitely see the value of IDEs for Java; what I wanted to express was that many of those issues are less compelling in Python.

However, the whole reason I put this post up was to find out the state of IDEs in Python. And from the responses, it sounds like WingIDE is probably the first one to look at.

piglet

Posts: 63
Nickname: piglet
Registered: Dec, 2005

Re: Python IDEs Posted: Feb 23, 2006 6:28 AM
Reply to this message Reply
"The point is that Java is more verbose and it really is necessary to have an IDE." (Bruce Eckel)

"Very likely you're a smarter man than I, but every bit of my experience as a developer goes against this sort of argument." (Matthew Phillips)

I think that was a clumsy and unconvincing attempt to make Python shine at Java's expense. The deeper issue with comments like that is that those of us working on large-scale, real-life projects (in whatever language) can't help feeling a certain surrealism.

Jim Jewett

Posts: 11
Nickname: jimj
Registered: Apr, 2005

Re: Shit or chocolate? Posted: Feb 23, 2006 6:30 AM
Reply to this message Reply
> Clean abstractions are best reflected in clean,
> terse code but terseness of the code is not a
> goal in itself.

This is (almost) one of the disagreements between yourself and python. Terseness, no (python isn't perl), but readability -- absolutely. Python prefers longer code when it is more readable.

The catch is that boilerplate -- almost anything an IDE can add for you -- usually makes code less readable, if only because it is less likely to fit on a line, or a screen, or because you have to spend some mental effort skipping the boilerplate.

Java in practice has often stopped looking like source code, and started looking like an intermediate product that the tools generate. This isn't a problem when you are writing it, but it is a problem when you are trying to maintain it, particularly if you aren't using the same environment as the person who wrote it.

For example, you agree that getters and setters are typically boilerplate that shouldn't be written by hand. I agree wholeheartedly, and would also add that they therefore shouldn't even appear in the code. When you see a getter or setter, it *should* stick out to indicate that something is unusual. In java it doesn't, but the IDE can help you overcome that. In python, the very existence of a getter or setter sticks out naturally. (Constructors are a weak point here, because of the self.name=name idiom for handling initializer arguments.)

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Python IDEs Posted: Feb 23, 2006 1:54 PM
Reply to this message Reply
> I am a newbie to Python, but what about "Boa",
> http://boa-constructor.sourceforge.net/ ??


Seems like BOA is now DOA. Looks like the last update on the web site was mid-2004.

I tried it a out a few times, but it was too buggy (still pre-1.0 software, of course) and not very practical or easy to use, so I never used it for anything serious.

Michael P. Soulier

Posts: 5
Nickname: heisen
Registered: Sep, 2004

Re: Python IDEs Posted: Feb 23, 2006 8:01 PM
Reply to this message Reply
> When I need to remember something out of a standard
> library, I google it. It's all extremely well-documented
> and not complex, so I don't see what the trouble is.

Indeed, and my cpu has better things to do than run a bloated IDE that does things like trying to compile my code for me before I'm actually done writing it.

A good IDE can be a boon, but I find that IDEs tend to want to lock me in to using them in the future. So far I tend to write all of my code using Vim, whether on Linux or Windows. Sometimes Emacs on both, and python-mode is decent.

I also find it interesting that while I'm used to good editors like Vim, I'm perfectly productive in an IDE. Meanwhile programmers that I know who insist on IDEs are useless when presented with an editor. I'd say that puts me ahead of the game.

Randall Smith

Posts: 1
Nickname: berryman
Registered: Jan, 2005

Re: Python IDEs Posted: Feb 23, 2006 10:01 PM
Reply to this message Reply
I had to call you on these. You obviously don't have any experience with the powerful VIM and Emacs editors.

VIM: "go to declaration" is gd

"We can type the first couple of letters of the variable, hit ctrl-space and there it is!" VIM: ctrl-n

"I would imagine these kind of descriptive method and variable names are avoided" Simply not true, at least for me.

As recommended in "The Pragmatic Programmer", I invest time in my text editor (VIM) and use it for writing Python, HTML, LaTeX, or what have you.

I'm not saying there are no advantages to IDEs, I just want people to know that a good text editor is very powerful and worth learning in depth.

Randall

piglet

Posts: 63
Nickname: piglet
Registered: Dec, 2005

Re: Shit or chocolate? Posted: Feb 24, 2006 10:18 AM
Reply to this message Reply
The catch is that boilerplate -- almost anything an IDE can add for you -- usually makes code less readable, if only because it is less likely to fit on a line, or a screen, or because you have to spend some mental effort skipping the boilerplate.

I agree about the boilerplate, but definitely not with the statement that IDEs are there to produce boilerplate. Getters and setters are still the only meaningful example put forward in this discussion. There's a similar discussion here: http://www.dehora.net/journal/2005/01/java_getset_not_that_harmful_version_control_for_refactoring_harmful.html.

I think the setter/getter controversy goes a little deeper. It's really about OO philosophy. I agree that we are seeing (in Java) way too much of them. In the first instance, they are about access control. The concept of encapsulation is defeated if people automatically create access methods for all their member variables. Sadly, some Java programmers have been led to believe that "everything is a bean". Only in the definite case when you need a pure data object is the bean concept applicable (and then for heaven's sake you allow the IDE to create them), and even then, I find myself frequently designing classes as immutable. In all other cases, 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. I don't know how you solve that in Python but in my view, encapsulation is an indispensable concept in OO. To reduce this issue to a complaint about "code bloat" misses the point.

Andreas Mross

Posts: 12
Nickname: amross
Registered: Apr, 2004

Re: Python IDEs Posted: Feb 27, 2006 8:14 PM
Reply to this message Reply
> I had to call you on these. You obviously don't have any experience with the powerful VIM and Emacs editors.

Guilty as charged! :-)

Although having said that I also wonder how many of the people knocking IDEs have any experience with a powerful IDE like IDEA or Eclipse. The comments about "generating boilerplate" make me think of very early versions of jBuilder... perhaps that is the image of IDEs in many people's minds?

I must say I wasn't aware vi could do auto completion or "go to declaration". Does that work across files? Across and into jar files?

> I'm not saying there are no advantages to IDEs, I just want people to know that a good text editor is very powerful and worth learning in depth.

True. The same must be said about a good IDE. A good IDE is worth learning in depth and those who dismiss the whole concept are doing themselves a disservice.

Greg Wolff

Posts: 1
Nickname: pgwolff
Registered: Feb, 2006

Re: Python IDEs Posted: Feb 28, 2006 11:39 AM
Reply to this message Reply
I use the Komodo IDE. The regular expression visual development and debugging tool is a compelling feature for my work. We are doing a lot of text processing with Python and regular expressions. Komodo saves us time on regular expressions constantly.

Ramzi Ben Yahia

Posts: 23
Nickname: miccheck
Registered: Jul, 2002

Re: Python IDEs Posted: Mar 1, 2006 2:48 AM
Reply to this message Reply
http://www.simberon.com/smalltalkdemo.avi

The above is a screencast showing some capabilities of a typical Smalltalk environment. As python, ruby and many object-oriented languages (even java) are inspired from smalltalk, it could be a path(not the only one) to follow for IDE writers.

Although, code completion and refactoring is not as powerful as in java environments* (static vs dynamic), some other features are available to increase productivity: a very powerful debugger and unlimited inspection(almost everything can be inspected, included all the IDE objects).

The environment itself is "programmable", and adding features to it is mush more easier than, say, writing a plugin for eclipse or intellij. This is really helpful if you want to automate tasks (which is the main goal of an ide).

in the screencast, the author is developping a desktop application(solitaire game), but you have the same level of interaction even with web applications.

The same features in this screencast can also be found in lisp through Emacs and SLIME

*: Complex java application today are not composed only of pure java code. You need XML much of the time, and sometimes, to achieve "powerful" things, you have to go through bytecode engineering (hibernate, rife ...). Refactoring XML or even java code that uses reflection raise the same issues than refactoring code in a dynamically typed language.

CB

Posts: 5
Nickname: broken
Registered: Aug, 2004

Re: Python IDEs Posted: Mar 1, 2006 8:09 AM
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

Code completion is less important but the three above are essential for debugging/maintanence. Perhaps there aren't as many big Python systems out there so more Python developers are working on new code rather than having to figure out old code?

Code completion is also more than just saving you typing. It actually allows you to have a more experimental style of programming. If I need to find a library method to do some task I don't have to go to the docs or google. I can guess at a package, pick a likely class, and browse through the methods to find the variant I'm looking for all without leaving the line of code I was typing.

Syntax checking in your IDE gives you something that is in some ways more useful than a REPL (though a true REPL for java would be nice, any eclipse/beanshell plugins out there?). 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. As I write a method in eclipse any syntax errors are immediately highlighted

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)

Peter Masiar

Posts: 2
Nickname: pmasiar1
Registered: Feb, 2006

Re: Python IDEs Posted: Mar 2, 2006 9:11 AM
Reply to this message Reply
Very good free (opensource) and multiplatform IDE is SPE - Stani's Python Editor. It has sidebar where you can have file browser (as some previous commentor asked for), code outline, TODO items, or other special marks in code - cleverly as valid comment, ## TODO, ## FIXME etc. I like it a lot.

piglet

Posts: 63
Nickname: piglet
Registered: Dec, 2005

The value of IDEs Posted: Mar 2, 2006 9:26 AM
Reply to this message Reply
I completely agree.

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)
I am also using that often. When I do fixes or refactorings of the sort, Eclipse takes the burden away of remembering all the places where code needs to be changed. And it is gives me satisfaction to watch the red markers disappear!

A note is in place here concerning Charles Petzold's article "Does Visual Studio Rot the Mind" (http://www.charlespetzold.com/etc/DoesVisualStudioRotTheMind.html). I think much of what Petzold says is valid, especially about ugly code generation, but it really applies to VB-style Windows programming:

What’s nice about creating and manipulating controls in code is that you’re creating and manipulating them in code. Suppose you want a column of ten equally-spaced buttons of the same size displaying Color names. In a program, you can actually store those ten Color values in one place. It’s called an array. There’s also an excellent way to create and position these ten buttons. It’s called a for loop. This is programming. But Visual Studio doesn’t want you to use arrays or loops to create and position these buttons. It wants you to use the designer, and it wants to generate the code for you and hide it away where you can’t see it. Almost twenty years after the first Dialog Editor, Visual Studio is now the culprit that generates ugly code and warns you not to mess with it.

Petzold also says that IntelliSense imposes a bottom-up programming style. What's wrong with starting with the top-level method and generating stubs for the lower-level methods as you go, each with a neat TODO that reminds you where to continue coding? The IDE could support that very well.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Python IDEs Posted: Mar 3, 2006 4:00 PM
Reply to this message Reply
> Very good free (opensource) and multiplatform IDE is SPE -
> Stani's Python Editor. It has sidebar where you can have
> file browser (as some previous commentor asked for), code
> outline, TODO items, or other special marks in code -
> cleverly as valid comment, ## TODO, ## FIXME etc. I like
> it a lot.

I just installed it and it does indeed look quite powerful.

Flat View: This topic has 68 replies on 5 pages [ « | 1  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