[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Ruby vs Java vs c++

n/a

11/18/2006 11:40:00 PM

hi, newbie so please be tolerant.... ;)

i need to start to learn a programming language to be able to develop
custom aps to be applied to a variety of purposes but mainly 1) financial
data modeling--including graphics and data handling via database queries,
etc.; and 2) more general business-type aps.

my feeling is that i hate BLOATED sluggish programs (like some Java
program running on older JVM's and perhaps not written in an optimal
way....u get the idea.)

if i need to make a choice between fancy and efficient,
speed, etc., then it's an easy choice 4 me of efficient.
which is why i have just started w/ c++.

however, speaking to one my programmer friends who is a top level Java
programmer (the stuff he writes is very efficient and fancy as
well--great balance), he is telling me that 1) c++ is being phased out
(except 4 real low level stuff like drivers, etc.) in favor of languages
such as Java or Ruby. he recommends i switch from learning c++ to learning
Java or Ruby. i wd hope to be able to choose the best path and not have to
switch tack in the middle as my IT capablity is not a full time activity,
but more of a support 4 my main one--finance.

of course, learning curve is to be taken into consideration as well....

'd love some comments that might help me consider my options and pick a
path (c++, java or ruby) w/ a higher level of confidence..... i know that
people here will be biased towards Ruby, but that is fine: i want to hear
about it....
111 Answers

Paul Lutus

11/19/2006

0

n/a wrote:

> hi, newbie so please be tolerant.... ;)

You can count on it.

> i need to start to learn a programming language to be able to develop
> custom aps to be applied to a variety of purposes but mainly 1) financial
> data modeling--including graphics and data handling via database queries,
> etc.; and 2) more general business-type aps.
>
> my feeling is that i hate BLOATED sluggish programs (like some Java
> program running on older JVM's and perhaps not written in an optimal
> way....u get the idea.)

I have rather a lot of experience with Java, and it's not easy to avoid the
bloated aspect, if the program has a GUI. The problem is the GUI, not the
code. It is made worse when the GUI code is written in java, nearly always
true.

Ruby, by contrast, uses native-code GUI libraries, so it tends to be faster
as a GUI based language. It is certainly easier to modify and debug than
Java is, because of its transparent syntax.

> if i need to make a choice between fancy and efficient,
> speed, etc., then it's an easy choice 4 me of efficient.
> which is why i have just started w/ c++.

C++ is only efficient when it is running. It is not efficient when you have
a deadline to finish a project and deliver working code.

The basic idea is this -- if the program is only written once and is to be
used by millions of people, then definitely use C++. If the same program is
to be written in a million variations over a period of years and only used
by a handful or people, then definitely Java or Ruby.

The middle cases require more experience to decide. In such cases, I
sometimes prototype in Ruby, because development is so fast, and then
translate the result from Ruby into C++ once I have a working program, so
the delivered program will be fast.

> however, speaking to one my programmer friends who is a top level Java
> programmer (the stuff he writes is very efficient and fancy as
> well--great balance), he is telling me that 1) c++ is being phased out
> (except 4 real low level stuff like drivers, etc.) in favor of languages
> such as Java or Ruby.

This viewpoint would be very difficult to defend. C++ isn't remotely being
phased out. C++ has its niche, as does Java and Ruby, etc. etc..

> he recommends i switch from learning c++ to learning
> Java or Ruby.

You will most likely learn more about programming in a shorter time by
taking his advice, but remember that the reasoning behind his advice isn't
sound. Both Java and Ruby will show you object-oriented concepts, a "good
thing", and later on, you might want to learn C++ for those applications
that require more speed and/or closer coupling to the machine. C++ is less
object-oriented than either Java or Ruby, which means (IMHO) that the
latter two languages are a better choice for learning programming
principles.

> i wd hope to be able to choose the best path and not have to
> switch tack in the middle as my IT capablity is not a full time activity,
> but more of a support 4 my main one--finance.

Oh, I thought you were going to become a well-rounded programmer. Oh, well,
in that case, either Ruby or Java will suit your goals much better than C++
would. You will be able to create and maintain 95% of the applications
typical in financial institutions using either Ruby or java, or both.

>
> of course, learning curve is to be taken into consideration as well....

Your learning curve will be much faster with Ruby or Java than with C++.
Guaranteed. I personally think Ruby and Java are much better tutorial
languages than C++ is.

> 'd love some comments that might help me consider my options and pick a
> path (c++, java or ruby) w/ a higher level of confidence..... i know that
> people here will be biased towards Ruby, but that is fine: i want to hear
> about it....

I don't think you will see much in the way of bias for or against any
particular language, at least from the regular posters here, because most
have come from a background of many other languages.

It's not like we're all Macintosh owners, or Scientologists, or Mensa
members, if you get my drift. :)

--
Paul Lutus
http://www.ara...

M. Edward (Ed) Borasky

11/19/2006 12:15:00 AM

0

n/a wrote:
> hi, newbie so please be tolerant.... ;)
>
> i need to start to learn a programming language to be able to develop
> custom aps to be applied to a variety of purposes but mainly 1) financial
> data modeling--including graphics and data handling via database queries,
> etc.; and 2) more general business-type aps.
>
> my feeling is that i hate BLOATED sluggish programs (like some Java
> program running on older JVM's and perhaps not written in an optimal
> way....u get the idea.)
>
> if i need to make a choice between fancy and efficient,
> speed, etc., then it's an easy choice 4 me of efficient.
> which is why i have just started w/ c++.
>
> however, speaking to one my programmer friends who is a top level Java
> programmer (the stuff he writes is very efficient and fancy as
> well--great balance), he is telling me that 1) c++ is being phased out
> (except 4 real low level stuff like drivers, etc.) in favor of languages
> such as Java or Ruby. he recommends i switch from learning c++ to learning
> Java or Ruby. i wd hope to be able to choose the best path and not have to
> switch tack in the middle as my IT capablity is not a full time activity,
> but more of a support 4 my main one--finance.
>
> of course, learning curve is to be taken into consideration as well....
>
> 'd love some comments that might help me consider my options and pick a
> path (c++, java or ruby) w/ a higher level of confidence..... i know that
> people here will be biased towards Ruby, but that is fine: i want to hear
> about it....
>
I think you'll find that Ruby is the easiest to learn, followed by Java
and C++ being the hardest to learn. However, the heavy math, graphics,
database queries and other computational finance applications will be
easier for you if you use a language not in your list -- R. R has a lot
of computational finance libraries already. Are you on Linux, Windows or
something else?

As far as general business applications are concerned, I think you'll
find Ruby is a lot easier to work with than Java or C++. I find C++ code
totally unreadable, but I can usually read Java code. And having to
manage memory and pointers yourself is tedious, error prone and pretty
much rules out C++ for anything but gurus.

Speed -- for number crunching, regardless of which language you use, the
underlying math and array operations should be done in either C, C++ or
FORTRAN in libraries. Native Java number crunching is a lot faster than
native Ruby number crunching, but I don't know anyone who does number
crunching these days in native scripting languages.
>
>


--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


M. Edward (Ed) Borasky

11/19/2006 12:18:00 AM

0

Paul Lutus wrote:
> It's not like we're all Macintosh owners, or Scientologists, or Mensa
> members, if you get my drift. :)
>
There was a time not too long ago (RubyConf 2006) when I thought pretty
much *every* Rubyist was a Macintosh owner. At least all the famous ones
seem to be. :)

--
M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blo...

If God had meant for carrots to be eaten cooked, He would have given rabbits fire.


n/a

11/19/2006 12:18:00 AM

0

On Sat, 18 Nov 2006 16:00:07 -0800, Paul Lutus wrote:

> In such cases, I sometimes prototype in Ruby, because development is so
> fast, and then translate the result from Ruby into C++ once I have a
> working program, so the delivered program will be fast.

tx a lot 4 the feedback, Paul. i will take e/g into consideration.

let me ask u how the the translation from ruby to c++ is done....

(that wd make the case even more to go ahead and start w/ ruby and
translate to c++ in some cases where it wd be needed; & stick w/ ruby the
rest of the time....)

Paul Lutus

11/19/2006 12:27:00 AM

0

n/a wrote:

> On Sat, 18 Nov 2006 16:00:07 -0800, Paul Lutus wrote:
>
>> In such cases, I sometimes prototype in Ruby, because development is so
>> fast, and then translate the result from Ruby into C++ once I have a
>> working program, so the delivered program will be fast.
>
> tx a lot 4 the feedback, Paul. i will take e/g into consideration.
>
> let me ask u how the the translation from ruby to c++ is done....

By a human. e.g. me. It's not automated. It might be sometime in the future,
but remember that hand-written C++ is always faster, when done by someone
with some depth of knowledge.

>
> (that wd make the case even more to go ahead and start w/ ruby and
> translate to c++ in some cases where it wd be needed; & stick w/ ruby the
> rest of the time....)

You shouldn't expect an automated Ruby to C++, or for that matter a Java to
C++, automatic translator, in the foreseeable future.

--
Paul Lutus
http://www.ara...

Matt Lawrence

11/19/2006 12:29:00 AM

0

Paul Lutus

11/19/2006 12:29:00 AM

0

M. Edward (Ed) Borasky wrote:

> Paul Lutus wrote:
>> It's not like we're all Macintosh owners, or Scientologists, or Mensa
>> members, if you get my drift. :)
>>
> There was a time not too long ago (RubyConf 2006) when I thought pretty
> much *every* Rubyist was a Macintosh owner. At least all the famous ones
> seem to be. :)

Hmm. :)

Well, anyone can be a Macintosh owner, but it takes a special mental
configuration to be a Macintosh ... looking for the right word here ...
advocate? :)

--
Paul Lutus
http://www.ara...

Hal E. Fulton

11/19/2006 12:50:00 AM

0

M. Edward (Ed) Borasky wrote:
> Paul Lutus wrote:
>
>> It's not like we're all Macintosh owners, or Scientologists, or Mensa
>> members, if you get my drift. :)
>>
>
> There was a time not too long ago (RubyConf 2006) when I thought pretty
> much *every* Rubyist was a Macintosh owner. At least all the famous ones
> seem to be. :)

Well, Dave Thomas is, and many others... Austin Z is (only recently).

I don't think Daniel Berger is, or myself, or Matz.

Although I admit I've thought about it...


Hal

n/a

11/19/2006 1:11:00 AM

0

On Sun, 19 Nov 2006 09:14:50 +0900, M. Edward (Ed) Borasky wrote:

> I think you'll find that Ruby is the easiest to learn, followed by Java
> and C++ being the hardest to learn. However, the heavy math, graphics,
> database queries and other computational finance applications will be
> easier for you if you use a language not in your list -- R. R has a lot
> of computational finance libraries already. Are you on Linux, Windows or
> something else?
>
> As far as general business applications are concerned, I think you'll
> find Ruby is a lot easier to work with than Java or C++. I find C++ code
> totally unreadable, but I can usually read Java code. And having to
> manage memory and pointers yourself is tedious, error prone and pretty
> much rules out C++ for anything but gurus.
>
> Speed -- for number crunching, regardless of which language you use, the
> underlying math and array operations should be done in either C, C++ or
> FORTRAN in libraries. Native Java number crunching is a lot faster than
> native Ruby number crunching, but I don't know anyone who does number
> crunching these days in native scripting languages.
>

ok, so i cd conceivably develop in ruby and integrate c++ 4 the number
crunching parts. wd that make sense...?

(and tx 4 the pointer to "R" as well)

n/a

11/19/2006 1:30:00 AM

0

On Sat, 18 Nov 2006 16:26:58 -0800, Paul Lutus wrote:

> n/a wrote:
>
>> On Sat, 18 Nov 2006 16:00:07 -0800, Paul Lutus wrote:
>>
>>> In such cases, I sometimes prototype in Ruby, because development is so
>>> fast, and then translate the result from Ruby into C++ once I have a
>>> working program, so the delivered program will be fast.
>>
>> tx a lot 4 the feedback, Paul. i will take e/g into consideration.
>>
>> let me ask u how the the translation from ruby to c++ is done....
>
> By a human. e.g. me. It's not automated. It might be sometime in the future,
> but remember that hand-written C++ is always faster, when done by someone
> with some depth of knowledge.
>
>>
>> (that wd make the case even more to go ahead and start w/ ruby and
>> translate to c++ in some cases where it wd be needed; & stick w/ ruby the
>> rest of the time....)
>
> You shouldn't expect an automated Ruby to C++, or for that matter a Java to
> C++, automatic translator, in the foreseeable future.
>

ok, tx 4 clearing that up. it means that u must have knowledge of both
languages, obviously....and the point re. starting w/ a more intuitive
language such as ruby is of interest