Ruby Newbie

Hi Everybody,

I am en experienced programmer, I have been using VB since I have
started programming. I wanted to shift to web programming but I dont
know which programming language to start with. Somebody told me that
Ruby is a very good programming language that I can start learning. I
have friends and they told me that I start with JAVA instead, Now I am
asking for your help so that I can be enlightened. Can I be a good web
programmer or develop my own web application by only learning Ruby? Or
do i need to start with JAVA and then Ruby? Please Help

Thanks a lot…

Back in school they taught us how to code web application in Java, which
entailed learning the J2EE technology set. It was a lot of work to do
something very simple, and it wasn’t very fun. Frankly, I wouldn’t ever
want to do it again.

I’ve not played with PHP so I can’t tell you much about that.

I have been doing Ruby on Rails now for a little over a year and I do
recommend it. It’s fun, easy to learn, and is a pretty good gateway
into
the Ruby language (assuming you looking under the hood). Give it a
shot. I
think you’ll like it more than Java.

James H.

On Jan 13, 4:08 pm, James H. [email protected] wrote:

[Note: parts of this message were removed to make it a legal post.]

I’ve not played with PHP so I can’t tell you much about that.

I work both with Ruby (for my own applications) and PHP (for my web
pages on the server of my university) and I must say that I am sorry I
must use PHP since the web server does not have the Ruby module
installed (and, of course, I cannot install it). Although I did not
work with “Ruby on Rails”, I feel confident to suggest you to stick
with Ruby (if you can). Ruby design is much more “coherent” and it
implements quite well the “least surprise principle”. I cannot say
the same about PHP, although, I must admit, that maybe PHP has a good
amount of useful libraries (but I would bet that for most of them, you
can find the Ruby equivalent).

(please, PHP lovers, do not flame me! :slight_smile:

On Jan 13, 2008 7:59 AM, Kara C. [email protected] wrote:

Hi Everybody,

I am en experienced programmer, I have been using VB since I have
started programming. I wanted to shift to web programming but I dont
know which programming language to start with. Somebody told me that
Ruby is a very good programming language that I can start learning. I
have friends and they told me that I start with JAVA instead, Now I am
asking for your help so that I can be enlightened. Can I be a good web
programmer or develop my own web application by only learning Ruby? Or
do i need to start with JAVA and then Ruby? Please Help

I went from Java to Ruby. Ruby suits me conceptually much better. It
really depends on your purposes. If your intentions are professional,
I suppose you should learn both (and if you happen to be really
intelligent, at the same time :slight_smile: Seriously, though, you can find a
lot of good web articles – some severely opinionated, some
refreshingly not – by searching google with phrases like “java ruby
difference” or “java vs ruby”; the former most likely turning up
technical differences, the latter, personal opinions.

hth,
Todd

On 13-Jan-08, at 5:59 AM, Kara C. wrote:

Hi Everybody,

I am en experienced programmer, I have been using VB since I have
started programming. I wanted to shift to web programming but I dont
know which programming language to start with. Somebody told me that
Ruby is a very good programming language that I can start learning. I
have friends and they told me that I start with JAVA instead, Now I am
asking for your help so that I can be enlightened. Can I be a good web
programmer or develop my own web application by only learning Ruby? Or
do i need to start with JAVA and then Ruby? Please Help

If “web programming” is what you want to do then I recommend starting
with PHP. Any shared host or current OS install will probably support
PHP out of the box and writing your first PHP web script can be as
simple as:

<?php phpinfo(); ?>

From there you can grow it up and the http://php.net/ documentation
is excellent.

To get started doing web development in Ruby is a bit more work, in
fact an optimal way is probably to start with Rails (which does most
of the heavy lifting for you) and then work backwards from there.
Also, the online Ruby docs are considerably less beginner-forgiving
that the PHP docs but then again you have this list :wink:

That said, if you want to become enamoured of a language and have a
ton of fun simply learning further programming for the sake of
programming, I’d start with Ruby and the command line. A first script
can be as simple as:

~/: ruby -e “puts “Hello world””

or

~/: ruby hello_world.rb

I personally would not start with Java. Perhaps later if neither Ruby
nor PHP touch you, but to start with Java might make you think that
web programming requires tedium and dreariness before the fun sets in
and that just ain’t so.

Hope that helps,
Chris

If “web programming” is what you want to do then I recommend starting
with PHP. Any shared host or current OS install will probably support
PHP out of the box and writing your first PHP web script can be as
simple as:
From there you can grow it up and the http://php.net/ documentation
is excellent.

I have to STRONGLY DISAGREE.

I would NOT recommend learning PHP because it as an ABSOLUTELY AWFUL
LANGUAGE.
If you “learn” it first, you will CUT YOURSELF OFF from an entire
range of approaches, thinking and solutions! (If you’re making a
living on PHP, use it: if you want to learn, look elsewhere–it’s
easier to “scale thinking” down than to try and scale it up late.)

(Talking about the design, not how “practical” it is because every $2
web-host supports PHP 4/5. If you feel like “debating” how well PHP is
as a -language-, look up create_function() and provide a valid
argument for the implementation.)
Besides, the PHP documentation has to be the worst site ever. It also
promotes bad practices.

If you like the “embedded approach” that PHP encourages, there are
PLENTY of frameworks out there that will allow you write a mash of
something that is hard to maintain. Some people like mixing things.
Others don’t. The thing is, almost every OTHER language (save PHP, CF,
JSP and a few more I’m sure) allows you do to this without
establishing it “as the way”.

To get started doing web development in Ruby is a bit more work, in
fact an optimal way is probably to start with Rails (which does most
of the heavy lifting for you) and then work backwards from there.
Also, the online Ruby docs are considerably less beginner-forgiving
that the PHP docs but then again you have this list :wink:

Ruby is not Rails. Rails is not Ruby. Rails is just the most popular
Ruby web framework.
You can’t compare Ruby to PHP in this sense.
It would be slightly more useful to compare Rails vs. Cake (or
whatever else you have).
There are MANY ruby web frameworks that are much easier to “whip out
small projects” (esp. assuming that you are a beginner that hasn’t
learned the “The Rails Way”) than Rails.

That said, if you want to become enamoured of a language and have a
ton of fun simply learning further programming for the sake of
programming, I’d start with Ruby and the command line. A first script
can be as simple as:

Ruby is a fun language and you’ll learn many new constructs (coming
from VB) if you learn it. Ruby will teach you to code in ways that
simply aren’t feasible in PHP. You’ll learn about powerful dynamic OO,
closures/blocks, mixins, singleton-methods, functional syntax,
duck-typing, how easy creating a DSL should be, testing, etc…

Ruby even comes with this nifty program called “irb” so you can try
things interactively. You can also get a start at
http://tryruby.hobix.com. (If you have a crazy sense of humor, _why
might just make you learn Ruby as an excuse to keep up with his crazy
antics…)

I personally would not start with Java. Perhaps later if neither Ruby
nor PHP touch you, but to start with Java might make you think that
web programming requires tedium and dreariness before the fun sets in
and that just ain’t so.

I would avoid starting with Java as well. Java is a mediocre OO
language at best and the boilerplate will make you cry–as far as a
language, it really teaches nil. (For much better statically/strongly
typed languages, see Scala, Eiffel and various ML implementations as
examples). That being said, the JVM is the best cross-platform VM I
know about. Which is why JRuby (yes, Ruby that runs in, and can
interact with, “Java”) runs on it :slight_smile:

There are MANY languages out there. Unless you are (or will be) paid
for using a crappy language, don’t use it. It’s not fun. And you’ll be
cramped in the limited language space. Learn -good- techniques while
you can. The more -good- approaches you know the better you can code.

Languages to look at (in no particular order, just a small random list
that comes to the top of my head of languages that can teach you
things–google will provided hundred of languages with multiple
variations if you ask):
Io, Scala, Lisp/Scheme, F#, Ruby, Python, Perl, Self, Smalltalk, Groovy

There are also a million Ruby frameworks.
Merb. Wuby. Ramaze. Rack+whatever, Camping, Sinatra, Rails, Nitro/Og,
etc, etc.
Each framework has its own design ideals. Some are huge, some are
small. But, with the core separation the choice is truly up to you for
what fits your current (web) project.

Opinionated: yes.

With all due respect, your response is precisely why I qualified mine
by breaking it down into just learning to do “web programming” and an
alternate language-specific recommendation if the OP wants to learn to
actually “program” (with all the ivory tower, religious zealotry that
that particular statement engenders).

Paul S. wrote:

If you feel like “debating” how well PHP is as a -language-, look up
create_function()

As a matter of fact I don’t want to debate any such straw-man argument
ever again in my life. I grew tired of the language wars about a
decade ago. However the OP wasn’t asking that particular question,
you’ve just read my response through your bias and exploded quite
spectacularly in the wrong direction. Had the OP written: “I want to
learn to program, to become a better programmer, which language should
I look at next?” then I’d probably have suggested Ruby first and
then… well that ought to be sufficient to occupy them for the next
couple of years.

But that’s not what was asked, was it now?

Cheers,
C=

If I had a penny for every time I saw some awful code influenced by
learning awful languages (and yes, this includes my code too)… I
stand by by answer. Do not learn poorly-designed languages unless
there is a direct gain from it (eg: to put food on the table). It’s
easier to learn than to unlearn.

Thank you for not kicking the straw-man. That was uncalled for on my
part.

As far as not answering the original question, I beg to differ:

Can I be a good web
programmer or develop my own web application by only learning Ruby? Or
do i need to start with JAVA and then Ruby?

(I feel that I also covered most of the implicit non-questions
culminating with: “…so that I can be enlightened”.)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs