[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Why Ruby does not nead an ide

atbusbook

8/26/2006 9:20:00 AM

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>

60 Answers

William Crawford

8/26/2006 9:41:00 AM

0

unknown wrote:
> 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...

--
Posted via http://www.ruby-....

Ashley Moran

8/26/2006 10:16:00 AM

0


On Aug 26, 2006, at 10:40 am, William Crawford wrote:

>> 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.


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

Huw Collingbourne

8/26/2006 10:36:00 AM

0


"William Crawford" <wccrawford@gmail.com> wrote in message
news:78392af611b0461304d3a6f278cb140e@ruby-forum.com...
> unknown wrote:
>> 1: ruby is an efisiont clean languige that is digsined to minamize
>> boilerplate code
>


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.sapphir...
Ruby Programming In Visual Studio 2005


Chad Perrin

8/26/2006 11:17:00 AM

0

On Sat, Aug 26, 2006 at 07:40:20PM +0900, Huw Collingbourne wrote:
>
> 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.

--
CCD CopyWrite Chad Perrin [ http://ccd.ap... ]
print substr("Just another Perl hacker", 0, -2);

Murdoc

8/26/2006 11:26:00 AM

0

atbusbook@aol.com wrote:

> 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. Edward (Ed) Borasky

8/26/2006 4:05:00 PM

0

Chad Perrin wrote:
> On Sat, Aug 26, 2006 at 07:40:20PM +0900, Huw Collingbourne wrote:
>> 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.
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. :)

>>
>> 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 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.

>> 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.
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. :)


>> 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.
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. :)
>


Jules

8/26/2006 5:43:00 PM

0

> 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.

Squeamizh

8/26/2006 8:19:00 PM

0


atbusbook@aol.com wrote:
> 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...

Christian Neukirchen

8/27/2006 2:59:00 AM

0

"M. Edward (Ed) Borasky" <znmeb@cesmail.net> writes:

> 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. :)

A Smalltalk core likely would be bigger, since it has to do more.
(Just think of garbage collection.) IIRC, there are stripped-down
Squeaks that "only" need 300k. (That's 30 nice Forths... ;-))

And every reasonably JITting Smalltalk of course includes an
assembler.

> 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.

No problem for Emacs.

> 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. :)

(I've just discovered today that the Self IDE supports basic Emacs
keybindings. Mmmhhh... :) Try it if your box can run it.)

--
Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...

David Vallner

8/27/2006 3:27:00 AM

0

M. Edward (Ed) Borasky wrote:
> 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