Why Ruby does not nead an ide

A

atbusbook

1: ruby is an efisiont clean languige that is digsined to minamize
boilerplate code
2: lets say you have an array of strings and you want to find all
strigs that maches a patern and print them space seperated
<code>
i = %w{foo bar baz qux quux quuux quuuux}
puts i.find_all{|x| x =~ /qu+x/}.join(' ')
</code>
3: java on the other hand has a lot of boiler plate like setters and
getters. i chose java because of the good ide suport. I am a emacs guy
and what i like about it is this lets say you want to deleat a block

C-space C-S end
C-w

I am much more efective with ruby and emacs than with eclipce and java
becaus the languige is almost sudocode like this echo utilaty or the
mach utilaty above

<code>
puts ARGV.join(' ')
</code>
 
W

William Crawford

unknown said:
1: ruby is an efisiont clean languige that is digsined to minamize
boilerplate code

That's what's wonderful about Ruby, but that doesn't mean it doesn't
need an IDE. IDE is not about 'boilerplate code'. It's about easy of
coding, viewing, and debugging code.
2: lets say you have an array of strings and you want to find all
strigs that maches a patern and print them space seperated
<code>
i = %w{foo bar baz qux quux quuux quuuux}
puts i.find_all{|x| x =~ /qu+x/}.join(' ')
</code>

Again, this has nothing to do with an IDE.
3: java on the other hand has a lot of boiler plate like setters and
getters. i chose java because of the good ide suport. I am a emacs guy
and what i like about it is this lets say you want to deleat a block

C-space C-S end
C-w

I am much more efective with ruby and emacs than with eclipce and java
becaus the languige is almost sudocode like this echo utilaty or the
mach utilaty above

<code>
puts ARGV.join(' ')
</code>

And again... Just because it's easier to write Ruby code does not mean
we don't need an IDE.

I can write any language I know on a whiteboard. That doesn't mean I
don't need an IDE to be most productive.

On a side note, Quanta's voting system has an item for Ruby code
completion that was just confirmed. Anyone interested might want to add
their weight to it. A link for those who care:
http://bugs.kde.org/show_bug.cgi?id=129279
 
A

Ashley Moran

That's what's wonderful about Ruby, but that doesn't mean it doesn't
need an IDE. IDE is not about 'boilerplate code'. It's about easy of
coding, viewing, and debugging code.


I think it's fair to say that Ruby removes the *need* for an IDE but
that doesn't mean it can't benefit from one. A bit like living in
walking distance of work and the shops means you don't need a car,
but there are times when it still comes in handy.

When RadRails has a visual debugger, then I will be tempted to start
using it (but probably still set TextMate as the default editor).
I'll still do all my admin scripts using an editor and shell though.

Ashley
 
H

Huw Collingbourne

OK, let me say up front that (for, perhaps, obvious reasons) I have very
strong views on IDEs. ;-)

If you want to find a tersely expressed language, you need look no further
than Smalltalk. Then look at the Smalltalk IDE. This is built from the
ground up to support the language - editing, browsing, debugging,
evaulating, inspecting, navigating the code. The Smalltalk language is an
intrinsic part of its IDE.

Now look at the way that Smalltalk code is structured. Typically it has lots
of classes with many 'levels' of descent. Each class has many methods that
rely upon ancestor classes. The code in any one method is often just 1 or 2
lines long. A really long method may be 10 lines or so long.

Now look at Ruby code. In my experience, most Ruby coders write big classes
with very few ancestors. Moreover, Ruby methods are typically (by comparsion
with Smalltalk) huge. In my view, this style of coding is relatively verbose
and takes little advantage of the real benefits of OOP.

So why do people code Ruby (typically) in a more verbose manner than
Smalltalk? In my view, this has nothing do do with the language itself and
everything to do with the environment. Lacking a really good IDE, Ruby makes
it hard to navigate the class hierarchy, to find the methods of ancestors
and derive new methods from them. So people do a lot of unnecessary
recoding. If Ruby had a Smalltalk-like IDE, I am sure that people would
rapidly start coding in a much terser style taking greater advantage of the
ancestor/descendent relationship of classes.

best wishes
Huw Collingbourne

http://www.sapphiresteel.com
Ruby Programming In Visual Studio 2005
 
C

Chad Perrin

OK, let me say up front that (for, perhaps, obvious reasons) I have very
strong views on IDEs. ;-)

You don't say . . . !

If you want to find a tersely expressed language, you need look no further
than Smalltalk. Then look at the Smalltalk IDE. This is built from the
ground up to support the language - editing, browsing, debugging,
evaulating, inspecting, navigating the code. The Smalltalk language is an
intrinsic part of its IDE.

Now look at the way that Smalltalk code is structured. Typically it has lots
of classes with many 'levels' of descent. Each class has many methods that
rely upon ancestor classes. The code in any one method is often just 1 or 2
lines long. A really long method may be 10 lines or so long.

This is, as you hint below, pretty damned difficult to navigate and work
with outside of an IDE. Unfortunately, it also tends to require that
everyone use the same IDE for everything to work out nicely. This is
fine when working in a closed shop that standardizes on specific
toolsets as well as specific languages, but is less than perfectly
optimal for highly distributed open source software development projects
and the like.

Now look at Ruby code. In my experience, most Ruby coders write big classes
with very few ancestors. Moreover, Ruby methods are typically (by comparsion
with Smalltalk) huge. In my view, this style of coding is relatively verbose
and takes little advantage of the real benefits of OOP.

So why do people code Ruby (typically) in a more verbose manner than
Smalltalk? In my view, this has nothing do do with the language itself and
everything to do with the environment. Lacking a really good IDE, Ruby makes
it hard to navigate the class hierarchy, to find the methods of ancestors
and derive new methods from them. So people do a lot of unnecessary
recoding. If Ruby had a Smalltalk-like IDE, I am sure that people would
rapidly start coding in a much terser style taking greater advantage of the
ancestor/descendent relationship of classes.

Frankly, it's more the "framework" aspect of environments like Squeak
that provides this than the IDE aspect (though both characteristics do
play a part). I don't mean that a framework in the Rails idiom is
necessarily appropriate to general-purpose programming or necessary for
allowing such fine-grained decoupling and code segregation. I mean that
a set of pre-existing code generation defaults that is well designed and
relatively comprehensive within the realm of the sort of work you're
doing is what's needed to provide that sort of convenience.
 
M

Murdoc

1: ruby is an efisiont clean languige that is digsined to minamize
boilerplate code
2: lets say you have an array of strings and you want to find all
strigs that maches a patern and print them space seperated
<code>
i = %w{foo bar baz qux quux quuux quuuux}
puts i.find_all{|x| x =~ /qu+x/}.join(' ')
</code>
3: java on the other hand has a lot of boiler plate like setters and
getters. i chose java because of the good ide suport. I am a emacs guy
and what i like about it is this lets say you want to deleat a block

C-space C-S end
C-w

I am much more efective with ruby and emacs than with eclipce and java
becaus the languige is almost sudocode like this echo utilaty or the
mach utilaty above

<code>
puts ARGV.join(' ')
</code>

Nothing really to say, just thought I'd make the subject a bit more appropriate.

--
 
M

M. Edward (Ed) Borasky

The same is true for Forth -- tersely expressed, an IDE built in from
the ground up to support the language. Forth and Smalltalk have a few
other things in common:

1. They were both subjects of a Byte magazine single issue devoted to
the language in the "golden age" of personal computing.

2. They both still survive today in their niches, but aren't generally
used as "general purpose" languages.

3. I suspect, though I don't know for sure, that a non-GUI Smalltalk
core would be as compact and efficient as Forth's core is. I'm not sure
about the converse, though -- I've got a full-blown Forth, Inc.
SwiftForth package that totals well under 100 megabytes including the
GUI IDE and two decent-sized PDF manuals. And I'm pretty sure most
Smalltalk virtual machines don't include an assembler. :)
This coding style -- small chunk coding, building a large program up
from small chunks of core operations -- can be done in almost any
language. It's the way most Forth programmers code, and probably most
Lisp and Scheme programmers too. There's no reason you can't do this in
any language, with or without an IDE.
This is, as you hint below, pretty damned difficult to navigate and work
with outside of an IDE. Unfortunately, it also tends to require that
everyone use the same IDE for everything to work out nicely. This is
fine when working in a closed shop that standardizes on specific
toolsets as well as specific languages, but is less than perfectly
optimal for highly distributed open source software development projects
and the like.
Where I think an IDE is absolutely crucial is two places:

1. Dealing with large quantities of other peoples' code, and

2. For building a *multi-language* project.

I'm working on a project right now that uses five languages: GiNaC, C++,
Ruby, Python and SWIG. I need an IDE to help me with five different
syntax/semantics arrangements. I'm not even sure there *is* such a
beast, but I suspect KDevelop is close.
I don't know percentages, but I tend to code the small-chunk way in most
languages. I think the coding style you talk about here is one that
comes from the "scripting" paradigm that Perl and to some extent Ruby
came from.

A typical "request" made of a scripting programmer is to convert a few
million lines of arbitrary text into a CSV file and stuff that file into
a database. And a typical project deadline is last Wednesday. Objects?
Factor? Subroutines? An IDE? For ten lines of Perl code? Besides, when
you get *that* script done, I've got five more that need to be done two
months ago. :)

Frankly, it's more the "framework" aspect of environments like Squeak
that provides this than the IDE aspect (though both characteristics do
play a part). I don't mean that a framework in the Rails idiom is
necessarily appropriate to general-purpose programming or necessary for
allowing such fine-grained decoupling and code segregation. I mean that
a set of pre-existing code generation defaults that is well designed and
relatively comprehensive within the realm of the sort of work you're
doing is what's needed to provide that sort of convenience.
I tried to learn the Squeak IDE and got terribly frustrated quickly. It
was so radically different from all the paradigms I was familiar with --
the mouse bindings alone were confusing beyond belief. Sure, I could
drag windows around on the desktop and click buttons and tabs, but that
was about it. I'm sure a Squeak programmer would have similar problems
with SwiftForth. :)

But to tie all of this back to Ruby and IDEs, it isn't so much that
*Ruby* does or does not need an IDE as that some *projects* need an IDE.
And I see absolutely nothing wrong with *requiring* all the programmers
on that project to use the *same* IDE!

So, my ideal IDE would support *all* languages -- even Scheme, Lisp,
Smalltalk, Forth and APL. It would allow direct viewing and manipulation
of the abstract syntax graph of the programs in a project, allowing the
programmer to focus on what the program *does* and how that corresponds
with what it is required to do. And it would allow one to build and
debug programs in parallel, concurrent, non-deterministic and mobile
paradigms as easily as in the standard serial paradigm.

And of course it would be free as in freedom and free as in beer and end
poverty and global warming too. :)
 
J

julesjacobs

2: lets say you have an array of strings and you want to find all
strigs that maches a patern and print them space seperated
<code>
i = %w{foo bar baz qux quux quuux quuuux}
puts i.find_all{|x| x =~ /qu+x/}.join(' ')
</code> grep?

<code>
puts ARGV.join(' ')
</code>

Emacs *is* an IDE. It just doesn't have "advanced" features like code
completion based on the type of the objects.
 
S

Squeamizh

1: ruby is an efisiont clean languige that is digsined to minamize
boilerplate code
2: lets say you have an array of strings and you want to find all
strigs that maches a patern and print them space seperated
<code>
i = %w{foo bar baz qux quux quuux quuuux}
puts i.find_all{|x| x =~ /qu+x/}.join(' ')
</code>
3: java on the other hand has a lot of boiler plate like setters and
getters. i chose java because of the good ide suport. I am a emacs guy
and what i like about it is this lets say you want to deleat a block

One would wonder why he enumerated random unrelated points...
 
D

David Vallner

M. Edward (Ed) Borasky said:
Where I think an IDE is absolutely crucial is two places:

1. Dealing with large quantities of other peoples' code

Amen. All the arguments about code being equally easy to manipulate if
you follow good conventions and clean design without an IDE are
completely void in the "fix a pile of hacks a student coder learning the
language was allowed to let loose into a production system" scenario.

These scenarios are also unfortunately very common, and usually done on
time schedules of maintenance releases, where a full rewrite of a
component that works is out of the question.

Most people argumenting in this topic that tool support isn't really
necessary omit the worst-case scenario - having reliable and precise
code navigation and refactoring in these is invaluable as you don't have
to tiptoe around someone else's mess and reread your changes three times.

David Vallner
 
D

David Vallner

Murdoc said:
Nothing really to say, just thought I'd make the subject a bit more appropriate.

<troll>
Speaking of which, is there any way to block anything he sends and
quotes in replies? I swear I feel my ability to write proper English
leak out my ears from that.
</troll>

David Vallner
 
M

M. Edward (Ed) Borasky

Christian said:
No problem for Emacs
Yeah ... for some reason, I'm the kind of hard-core geek that's supposed
to *love* Emacs and I've never learned how to use it. Part of that is
because I moved from VAX/VMS/EDT to Celerity/BSD 4.3/csh/vi, and at the
time, Emacs had a (probably justified) reputation as a memory hog. When
you share an 8 MB machine with a half dozen other folks, that matters.
:) But dang it all, vim is evolving into Emacs anyhow, so maybe I should
bite the bullet. :)
 
D

David Vallner

Squeamizh said:
One would wonder why he enumerated random unrelated points...

Pathological incoherence. Just check his other threads.

The fact he never actually tries to defend his "points" or does anything
beyond delivering a random, horribly spelled, and usually very vapid
rant would also indicate he's either just a very unskilled troll, or a
gruesome attention-seeker.

Then again, I now know what to put on the wishlist for email clients I
use: mail filters acting on whole threads.

+++ END OF TROLL FOOD +++

David Vallner
 
C

Chad Perrin

Yeah ... for some reason, I'm the kind of hard-core geek that's supposed
to *love* Emacs and I've never learned how to use it. Part of that is
because I moved from VAX/VMS/EDT to Celerity/BSD 4.3/csh/vi, and at the
time, Emacs had a (probably justified) reputation as a memory hog. When
you share an 8 MB machine with a half dozen other folks, that matters.
:) But dang it all, vim is evolving into Emacs anyhow, so maybe I should
bite the bullet. :)

Hardly. EMACS is more than ten times the installed size of Vim. I've
also seen situations where a file was too big to open in EMACS, but Vim
managed it just fine. Also, of course, there's the simple fact that
EMACS == Esc+Meta+Alt+Ctrl+Shift
 
M

M. Edward (Ed) Borasky

David said:
Amen. All the arguments about code being equally easy to manipulate if
you follow good conventions and clean design without an IDE are
completely void in the "fix a pile of hacks a student coder learning the
language was allowed to let loose into a production system" scenario.

These scenarios are also unfortunately very common, and usually done on
time schedules of maintenance releases, where a full rewrite of a
component that works is out of the question.
Ah, but in my younger days I *could* completely rewrite a few thousand
lines of someone else's spaghetti code faster than I could figure out
what the original was doing. Then again, there were only two programming
languages -- FORTRAN and assembler.:)
 
C

Chad Perrin

Emacs *is* an IDE. It just doesn't have "advanced" features like code
completion based on the type of the objects.

It's even more than an IDE. It's an operating system.
 
T

Tim Bray

I don't know, as a recent arrival from Java I sure miss my IDE.

- Having a background parser running all the time means I never save
a file with a syntax error.
- It's totally silly that I have to type method names for things like
File and IO and so on, the system should guess them for me
- Refactoring! I find that I want to change the names of classes and
fields and methods quite often, and having the IDE do it is a big
time-saver.
- In NetBeans there's this window on the side (I'm sure Eclipse has
the same thing) called the "Navigator", which is just a list of all
the methods and fields in the file you're editing, you click on any
of them to go there; huge time-saver.
- One-click to run the tests for whatever the cursor's on
- One-click to find all usages of whatever the cursor's on
- One-click to open the docs for whatever the cursor's on
- scope-sensitive select. Expand scope to current block, next
enclosing scope, next, next, etc

Yeah, you can do something in Ruby in a third the lines of code that
Java would take. But you might be able to write the Java about as
fast, with a good IDE.

[Oh, btw, I know that dynamic typing makes some of these things a lot
harder than for statically-typed languages like Java. Doesn't mean
they wouldn't be helpful.]

-Tim
 
M

M. Edward (Ed) Borasky

Chad said:
It's even more than an IDE. It's an operating system.
Ah ... but Forth is an assembler, language, interpreter, compiler, IDE
*and* an OS! Well ... it used to be an OS, anyhow. :) Sadly, there *is*
a set of Emacs bindings for Forth :(.
 
M

M. Edward (Ed) Borasky

Charles said:
AMEN. I'm glad I'm not the only one tired of hearing Emacs users belittle
IDE users, as though they're running any closer to bare metal. For a
language like Ruby, for which code completion, refactoring, and similar
features are much harder (or impossible) to implement, there's very little
difference in weight between a nice IDE and Emacs. Last time I checked,
Emacs was pretty damn big.
I don't know about Emacs, but xemacs-sumo was bigger than OpenOffice.org
the last time I looked. :)
 
M

M. Edward (Ed) Borasky

Charles said:
And guarantee they both produced all the same results, no doubt. You
must be
a magician to successfully rewrite code without knowing what it does.
I cheated ... I knew what the user wanted it to do. :)
 

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,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top