After being educated on the virtues of NBRubyIde, I was motivated to
actually checked out code completion of the much maligned free Aptana
radrails. This is the result
1. Type validates+ctrl-space
1.1 NBRubyIDE
Result :
validates_presence_of *attr_names
1.2 Aptana RadRails
Result :
validates_presence_of(attributes, :message => "message")
It would appear that all 3 IDEs displays a box for one to select the
validation method of choice.
However, it looks as if the resultant source codes are pasted
differently !
For example,
1) using nbRubyIde, once selected, this will appear in your source
codes
   validates_presence_of *attr_names
2) using Aptana RadRails , the following is pasted
   validates_presence_of(attributes, :message => "message")
Can you see the difference ?
What I am interested to know is the resultant code that will be pasted
automatically by RIS
Just to be clear: NetBeans also uses type inference for completion
options such that in many cases it gives accurate results. The
validates-example listed earlier on this thread is one such example
where it knows exactly what the inherited and mixed in methods are in
the current context, and can complete accurately.
However, it -also- relies on heuristics in cases where it's not sure,
such as a call to a method whose return type is unknown. I looked at
the video you linked to and the narrator states that 3rdRail relies
type inference and "Rails Conventions" - which sounds like heuristics
to me. And in a dynamic language like Ruby I don't think there's any
way to NOT use heuristics if you want to offer reasonable completion -
with methods and classes being modified dynamically computing the
correct set of methods etc. requires solving the Halting Problem.
Anyway, NetBeans doesn't do parameter completion right yet; I had
started that work but disabled it until I could finish it as I got
distracted with other tasks. This discussion has inspired me to go and
look at that code again
Anyway, NetBeans doesn't do parameter completion right yet; I had
started that work but disabled it until I could finish it as I got
distracted with other tasks. This discussion has inspired me to go and
look at that code again
cch: I started this discussion
It is great to know that you are so responsive.
For the time being, it looks as if RadRails have the best code
completion (for novices and newbies anyway)
BTW, I have been trying nbRubyIDE(standalone) on and off and one
concern of mine is starting speed and indexing of project.
I have perhaps 10 projects (each with perhaps 50 controllers or more)
in the nRubyIDE. It does take quite a bit of time to start up.
Is there anything that I can do on my end.
Just to be clear: NetBeans also uses type inference for completion
options such that in many cases it gives accurate results. The
validates-example listed earlier on this thread is one such example
where it knows exactly what the inherited and mixed in methods are in
the current context, and can complete accurately.
Hi Tor,
Thanks for the clarification, I have to admit my knowledge of the
inner workings of NB is second hand.
The result is out for code completion of a simple typing of
  validates+ctrl_space
1.1 NBRubyIDE
Result :
validates_presence_of *attr_names
1.2 Aptana RadRails
Result :
validates_presence_of(attributes, :message => "message")
1.3 Ruby in Steel
Result :
validates_presence_of
1.4 3rdRail
Result :
validates_presence_of
CONCLUSION :
So seemingly, Aptana RadRails has the most useful code completion for
this simple test.
To be fair, I have seen a Video cast of Shelby of CodeGear showing
impressive code completion on a migration file.
In addition, Tor of netbeans had already promised to look into
improving the completion code for my random example.
CONCLUSION :
So seemingly, Aptana RadRails has the most useful code completion for
this simple test.
To be fair, I have seen a Video cast of Shelby of CodeGear showing
impressive code completion on a migration file.
In addition, Tor of netbeans had already promised to look into
improving the completion code for my random example.
CCH,
Like I've said, code completion is much more complex than this, you
can't select one scenario to judge all IDEs. Each has it's strengths
and weaknesses. I can pick out an example that makes NetBeans look
great or one that makes 3rdRail The Ruler.
This is why I haven't been pasting specific examples here. No one
wants this to become a relegious war, arguing one discrete example
against the other.
Two things that would be more productive IMO:
1. If you find shortcomings in a tool report them to the folks that
make the tool so they can make it better.
2. If you really want to compare code completion, put together a
comprehensive matrix of places where completion should exist (types of
files, types of code fragments, different kind of syntax errors the
completion should recover from) and what choices should be provided
and do a complete comparison. This would show intersections for
different situations (methods defined on a parent class, methods
defined in the current class, dynamic methods provided by the
framework, dynamic methods provided by user code, for a simple
example) and what would be provided there (paramater arity, paramater
types, locally-defined paramater choices, paramater choices that are
made available by the framework, method calls that return the type
represented by the paramater...etc)
Then users can look at this and decide which tool best meets their
needs.
What I was trying to point out was that sweeping statements made by
overzealous fans/developers etc of IDEs can easily be debunked !
IMHO, one should by all means trumpet the great features (eg, Project
Commander in 3rd Rail) but not at the expense of condemning another
with four-letter words.
I believe, I have already made my point
The bottom line is that there must be healthy competition and IDE
developers who do not wish to accept constructive criticism and
improve will simply perish...
cch: When I type validates+ctrl+spacebar in 3rdRail
a dropdown list is shown and when I select validates_presence_of ,
validates_presence_of is inserted