Programming Newbie: Ruby or Java?

Christian L. wrote:

I’m not sure why you guys think Ruby is easier than Java from a “Learn It”
perspective. Maybe somebody can elaborate on this. I don’t really see it.

I’ve been trying to learn Java, having used Ruby since 1.4. Someone
says it feels like having your hands chopped off. This is brutal, but
there is an element of truth in it.

To elaborate, everything in Ruby is an object. This makes everything
simple and elegant - and there are no exceptions.

In Java, there are many things which are not objects - one of which
is Integer. I could see where this would trip up most Smalltalk or
Ruby programmers right up front - or anyone who expects things to all
act in the same way.

The other big problem with Java is its license. Ever wonder why no
open source distribution such as Debian or Fedora has Java? Its the
license…

On 11/28/05, Christian L. [email protected] wrote:

Chris

Lines of code can be a predictor of the number of things that the
language requires the programmer to deal with. The obvious gripe with
Java here is that it requires all programs to be classes, thus making
even a simple hello world program five lines long with all sorts of
crazy black box code. I think it could be a detriment to a new
programmer to have to put in so much voodoo code. It makes the system
seem strange and unapproachable. The questions I always had when I
was learning Java as a newbie programmer like “Why do I have to put
static in front of my functions?” bothered me, especially when I
couldn’t understand word one of the answers to them.

Ruby is nice in the context of just learning to program because you
can generally approach one concept at a time. I also find ruby to be
generally more readable, and that is very useful when all of the
concepts are still so new and foreign.

I think that a new programmer would feel as though they understood
more of their code when writing in ruby. If that leads one to play
around and try stuff out more, then that’s a huge win, because
experimenting and seeing what happens is (for me at least) the single
best way to really, truly learn something.

Hi,

On 11/28/05, Leslie V. [email protected] wrote:

OTOH I’m not sure Ruby is the way to go if you want to produce
a GUI type application very quickly since AFAIK there’s nothing
in Ruby that allows the ease of dragging some controls on a form
and setting their properties - like you could do with VB or Delphi.
VB is a terrible language, Delphi at least has some design to it,
I’m sure there’s RAD type development environments for Java
although I haven’t used them.

You can do this w/ ruby and libglade… but that only applies to the
*nix’es as far as i know.

Cam

[email protected] wrote:

about Lisp is that the syntax isn’t very humane, but you can
People get jittery about things like first-class functions because
That’s a common objection to Scheme, actually (never mind that
Scheme actually does have ‘do’, which is the same thing). At that
point many Scheme advocates start talking about recursion, and
people’s heads explode.

But then Ruby showed people it was okay.

Smalltalk?

On Nov 28, 2005, at 10:40 PM, Jeff W. wrote:

If lines of code were the winning factor, people would almost
always use
perl for all of its infamous one-liner line-noise solutions to
things…

May not be a “winning factor”, but certainly a factor.

++Pascal

–Steve

On 11/28/05, Jeff W. [email protected] wrote:

If lines of code were the winning factor, people would almost always use
perl for all of its infamous one-liner line-noise solutions to things…

Can’t you use Ruby in place of Perl for all those one-liner line-noise
solutions?

If lines of code were the winning factor, people would almost always use
perl for all of its infamous one-liner line-noise solutions to things…

j.

On 11/28/05, Peter B. [email protected] wrote:

less. ;p
even a simple hello world program five lines long with all sorts of
concepts are still so new and foreign.

I think that a new programmer would feel as though they understood
more of their code when writing in ruby. If that leads one to play
around and try stuff out more, then that’s a huge win, because
experimenting and seeing what happens is (for me at least) the single
best way to really, truly learn something.


“Remember. Understand. Believe. Yield! → http://ruby-lang.org

Jeff W.

On 11/29/05, Jeff W. [email protected] wrote:

If lines of code were the winning factor, people would almost always use
perl for all of its infamous one-liner line-noise solutions to things…

j.

Very true. Succinctness and readability are both key. Luckily ruby
excels at both.

Hehe… The thing that probably makes Ruby a little more readable for
me is
that I can see more of a program on a single screen :).

I don’t know if the perfect learner language even exists or what it
would
look like if it did. Every language seems to have its own skeletons and
quirks. I wonder if life would’ve been easier for me if I started with
something like Ruby (it would’ve been Perl given the timing).

Then again, so much of learning is dependant on the learner.

Take care,

Chris

On 11/29/05, Peter B. [email protected] wrote:

was learning Java as a newbie programmer like "Why do I have to put
around and try stuff out more, then that’s a huge win, because
experimenting and seeing what happens is (for me at least) the single
best way to really, truly learn something.

‘There was an owl lived in an oak.
The more he heard, the less he spoke.
The less he spoke, the more he heard.’

Christian L.
[email protected]

[email protected] wrote:

Quoting Isaac G. [email protected]:

But then Ruby showed people it was okay.

Smalltalk?

That’s where blocks came from, yes. But Smalltalk never caught on,
at least not to the degree that Ruby has.

Do you have any evidence for

  1. How much Smalltalk caught on
  2. How much Ruby has caught on?

[email protected] wrote:

But Smalltalk never caught on,
at least not to the degree that Ruby has.

There isn’t much unique to Ruby at all – it’s just very well
put-together, and has successfully popularized a lot of concepts
that have previously not been a significant part of “mainstream”
programming.

-mental

What are you talking about. In what way has smalltalk never caught on?

Now Modula3, Oberon and ABC could be said to have never caught on
(despite ABC being one of the predecessors of Python). But smalltalk?
Extraordinary claims require extraordinary evidence. Sir what proof do
you have?

Quoting Peter H. [email protected]:

[email protected] wrote:

But Smalltalk never caught on, at least not to the degree that
Ruby has.

What are you talking about. In what way has smalltalk never
caught on?

I should never have phrased it that way. Read it as “I think
Smalltalk never caught on to the degree that Ruby has.”

Which is still a pretty sloppy and radical claim (mea culpa), but
not so inadvertantly inflammatory.

It also needs to be read in the context of the original post,
concerned with the evangelization of certain functional programming
techniques. I didn’t intend to invoke popularity contests like TPCI
or the infamous and unscientific “google test”.

My thesis is that Ruby (for whatever reasons) has “caught on better”
in the sense that it’s attracted a much wider spectrum of
programmers than Smalltalk.

My impression of Smalltalk programmers is that they tend come from
more “functional-literate” backgrounds, so blocks are not such a
new thing for most of them. By contrast, I get the sense that new
Ruby programmers are represented by a much broader bell curve when
it comes to FP.

I’m guessing you’ve got a significant Smalltalk background (I don’t,
though I’m basically literate in it) – based on your own
experience, do you think this is accurate?

It’d be interesting to have a real, scientific, survey, but I’m not
sure how one would go about conducting one in this case.

-mental

Quoting Isaac G. [email protected]:

But then Ruby showed people it was okay.

Smalltalk?

That’s where blocks came from, yes. But Smalltalk never caught on,
at least not to the degree that Ruby has.

There isn’t much unique to Ruby at all – it’s just very well
put-together, and has successfully popularized a lot of concepts
that have previously not been a significant part of “mainstream”
programming.

-mental

[email protected] wrote:

I should never have phrased it that way. Read it as "I think
My thesis is that Ruby (for whatever reasons) has “caught on better”
in the sense that it’s attracted a much wider spectrum of
programmers than Smalltalk.

My impression of Smalltalk programmers is that they tend come from
more “functional-literate” backgrounds, so blocks are not such a
new thing for most of them. By contrast, I get the sense that new
Ruby programmers are represented by a much broader bell curve when
it comes to FP.

iirc the main alternatives to Smalltalk were C++ and 4GLs

The folk learning Smalltalk range from experienced procedural
programmers to non-programmers:

IBM implemented Smalltalk across a wide range of hardware, and trained
their consulting staff.

The Open University used Smalltalk to teach programming to 5,000-8,000
students a year (for about a decade, they switch to Java in 2006).

On 28/11/05, Dab [email protected] wrote:

Thanks for looking!

I’m brand new to programming and had just decided to learn Java as a
first language, then stumbled accross Ruby, which seems far simpler to
learn, but doesn’t seem to have as many resources/books etc.

You make that sound like a bad thing :

http://www.garbett.org/upload/books.jpg

_why has been busy again. Have a look at:

http://tryruby.hobix.com/

then the poignant guide and chris pines ‘learn to program’ (both a
google
away).

I wouldn’t recommend the pickaxe to programming noobs since IMO its
not for total beginners to OOP and programming.

Dick D. wrote:

http://www.garbett.org/upload/books.jpg

http://ruby-doc.org/bookstore/

In general,

James

http://www.ruby-doc.org - Ruby Help & Documentation
Ruby Code & Style - Ruby Code & Style: Writers wanted
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys
http://www.30secondrule.com - Building Better Tools

Quoting Isaac G. [email protected]:

Java in 2006).
Wow, ok.

I’d have to say that’s a bit more “catching on” than Ruby’s done to
date, in any sense of the term.

I see I’ve rather flagrantly displayed my youth and ignorance of
history, then. Oops.

-mental

Ryan L. wrote:

On 11/29/05, [email protected] [email protected] wrote:

Wow, ok.

I’d have to say that’s a bit more “catching on” than Ruby’s done to
date, in any sense of the term.

Not really.

Do you have any evidence for

  1. How much Smalltalk caught on
  2. How much Ruby has caught on?

On 11/29/05, [email protected] [email protected] wrote:

Wow, ok.

I’d have to say that’s a bit more “catching on” than Ruby’s done to
date, in any sense of the term.

Not really. Universities regularly teach things that students will
never use in the real world. Before switching to Java my university
taught the basic CS course using Scheme. I also learned Lisp for my AI
class. Yet I certainly don’t see a ton of people using those
languages, and I certainly don’t see many jobs asking for experience
in those languages. I’m not saying this to belittle those languages,
but the reality is that the real world and universities don’t always
match up.

Ryan

On 11/29/05, Isaac G. [email protected] wrote:

Do you have any evidence for

  1. How much Smalltalk caught on
  2. How much Ruby has caught on?

Well if you ask the average grunt programmer born and raised on C++ or
Java about Smalltalk or Ruby he or she will probably just say “What?”
But I think there is a greater chance that person has heard of Ruby,
especially because of all the noise about Rails lately.

While certainly not scientific, a Google search for “smalltalk”
returns about 4.8 million results, whereas a search for “ruby” returns
41.8 million. Now you might scoff and say “well ruby is also a
precious gem.” OK, then let’s try “ruby language”: 7.1 million
results. Using “smalltalk language” returns 2.1 million. As another
comparison, “java language” returns 70 million results, “c++ language”
returns 26.1 million and “python language” returns 22.2 million.

Overall a Google search seems to be a pretty good indicator of
language popularity, so Ruby is 3.5 times more popular than Smalltalk.

Ryan