I'm interested in learning programming and have messed around with PHP for a
little while. I've been hearing a lot about Ruby/Ruby On Rails. I'm
interested in a language for an absolute beginner...is Ruby/Ruby On Rails a
good way to go or are there better languages for starters?
Ruby is a very fine language from which to learn programming.
Ruby on Rails is simply a web development framework built using the Ruby
programming language.
Start learning Ruby first.
Kirk Haines
···
On Monday 18 July 2005 5:40 pm, SomeDude wrote:
I'm interested in learning programming and have messed around with PHP for
a little while. I've been hearing a lot about Ruby/Ruby On Rails. I'm
interested in a language for an absolute beginner...is Ruby/Ruby On Rails a
good way to go or are there better languages for starters?
If you don't need to get involved in web programming right away, gawk
is probably the easiest and gives you a big bang for the buck, to mix
metaphors. Ruby is a breath of fresh air but you will have a hard time
appreciating many of the more powerful aspects of the language as a
newbie. Heck, many programmers even have a hard time wrapping their
brains around object-oriented programming. First crawl, then walk, then
run. (If you see the word 'pointer' in the language you are studying
you will want to avoid that language for at least a year. Pointers are
dangerous for newbies, and thankfully all popular scripting languages
shield you from 'em.) The easiest languages to learn are the
garbage-collected scripting languages such as PHP, Python, Perl, Ruby,
and Gawk. PHP is an excellant learning language---better than Java,
IMNSHO. Just don't stay in that rut for long. BTW, if you decide to go
with Awk/Gawk, one of the best books is called "The Awk Programming
Language," by Aho.
Oh, to be young again...
I'm interested in learning programming and have messed around with PHP for a
little while. I've been hearing a lot about Ruby/Ruby On Rails. I'm
interested in a language for an absolute beginner...is Ruby/Ruby On Rails a
good way to go or are there better languages for starters?
As a fellow Ruby and programming-in-general beginner,
I have found Ruby to be very logical and easy to use.
I can't compare it to any other languages, since I
havn't learnt any. But, I will say that I tried
learning Python in the past and I don't remember it
being as simple.
As someone else mentioned though, work out what your
reason is for wanting to learn. It will be much
easier to learn any language then. For me, I have a
couple of linux servers, and I want to be able to
write some custom scripts for management of these. So
far, Ruby is proving excellent for this task.
I can definately recommend the following tutorial for
a general introduction to programming concepts. I
still don't fully understand OO, but it explains the
basics:
I'm interested in learning programming and have
messed around with PHP for a
little while. I've been hearing a lot about
Ruby/Ruby On Rails. I'm
interested in a language for an absolute
beginner...is Ruby/Ruby On Rails a
good way to go or are there better languages for
starters?
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com
Ruby is probably a good choice, perhaps an excellent one. Having had only
Basic background, Ruby made sense to me, when neither Python nor Pascal
did. I still don't fully get OO yet, but it hasn't stopped me from using
Ruby to write various "for own use" utlities that I use for my work. I'm a
fairly "un-mathematical" person and Ruby was still accessible to me. I
think that qualifies it as a language for everyone,
A good book for a true beginner is "Teach Yourself Ruby in 21 Days" by Mark
Slagell. You could also wait for Chris Pine's upcoming beginner book. Later
on you'll want Dave Thomas' "Programming Ruby", 2nd Ed., and possibly Hal
Fulton's "The Ruby Way" (the former is -the- reference, the latter
continues nicely where Mark's book ends).
M.
···
On Mon, 18 Jul 2005 23:36:45 GMT, SomeDude wrote:
I'm interested in learning programming and have messed around with PHP for a
little while. I've been hearing a lot about Ruby/Ruby On Rails. I'm
interested in a language for an absolute beginner...is Ruby/Ruby On Rails a
good way to go or are there better languages for starters?
I think starting with Ruby is a great way to start learning how to
program, but if you are serious about programming you should definitly
look into other languages once you have a decent grasp of Ruby. If
you're gonna program for real you need to have an open mind about
languages, how they function, the pros and cons of each one, and so on.
And although pointers can be difficult to begin with, grasping the
concept is essential.
Having tried to pick up languages over the years, and only ever really
getting "Hypertalk" (small talk variant in Apple's Hypercard), I found
Ruby (and Rails) to be quite pleasant.
I started with Rails, but rapidly getting to a point where I was making
frustrating (albeit simple) ruby mistakes, I've decided to hit a ruby
book first.
I agree with DHH on having a purpose. I have wanted to make a
production pipeline for visual effects work for years now and PHP/MySQL
was causing nothing but ulcers for me as I got into the upper levels of
it. I could do a lot of stuff with PHP, but i spent so much time
writing to and from the database that i just got bored with the lack of
progress.
I've been able to get something roughly running in a few days with some
help from the IRC and email rails communities. But having a project I
had an emotional investment in definitely keeps me fighting with that
one line of code for 2 hours and then doing that little victory dance
that comes from hitting refresh and not getting a syntax error
having just started delving into ruby on rails having come from php, i can
recommend it. you're looking at using this new programming language for the
web by the sounds, right? php is great for loose scripts, and i plan to keep
using it for websites where a stitch of php will save time. but having once
put together a fully feature laden shopping cart in php (wasn't actually
that hard) i would now want to do something like it in rails if i had to
start again. for the large dynamic, and particularly database driven,
website, rails is winning me over. jeez, my heart palpitated with joy when i
discovered 'pagination'! basically the whole division of the content into
pages and the links to view other pages was done in 3 short lines. i'm still
learning rails but already the bits i've encountered so far will save _lots_
of time and unnecessary debugging.
and another reason i chose ruby was because it was tagged as an 'easy to
learn' language, certainly one of the more sensible languages around at the
moment. my initial worry was that 'easy to learn' would translate to a
baby's language. but no .. it's powerful and has depths of libraries.
"SomeDude" <somedude@somewhere.com> wrote in message
news:h2XCe.22546$yC5.810@tornado.ohiordc.rr.com...
Hello,
I'm interested in learning programming and have messed around with PHP for
a
little while. I've been hearing a lot about Ruby/Ruby On Rails. I'm
interested in a language for an absolute beginner...is Ruby/Ruby On Rails
a
···
good way to go or are there better languages for starters?
Unless you like computers and programming for the sake of it (I know
lots of people who do), I'd suggest picking a purpose. Is there a
outcome you want? Do you want to make your homepage a little more
dynamic? Do you have a web database idea for your sports club? Select
a language and environment that's most targeted for what you want to
do.
For lots of first projects, I'd actually recommend PHP. The barrier to
entry is so silly low that you might just like it on the first go.
Then, once you have enough of your soul in programming, do come back
to do some Ruby (on Rails).
BTW, if you decide to go
with Awk/Gawk, one of the best books is called "The Awk Programming
Language," by Aho.
Oh, to be young again...
The O'Reilley book on Awk & Sed is good, too, because it does show
some of the features of other awk implementations, like nawk, mawk
and...gawk. Aho is the 'a' of awk.
If you don't need to get involved in web programming right away, gawk
is probably the easiest and gives you a big bang for the buck, to mix
metaphors. Ruby is a breath of fresh air but you will have a hard time
appreciating many of the more powerful aspects of the language as a
newbie.
Why?
Heck, many programmers even have a hard time wrapping their
brains around object-oriented programming.
And many don't. And of those that do, a contributing factor is having spent too much time with procedural programming, or with "we're OO, except when we're not" languages.
OO is a fairly straightforward concept. It gets messy with different implementations; Ruby's is quite clean. People are better off going straight to OO than trying to creep up on it via clumsy "newbie" alternatives.
> First crawl, then walk, then
run. (If you see the word 'pointer' in the language you are studying
you will want to avoid that language for at least a year. Pointers are
dangerous for newbies, and thankfully all popular scripting languages
shield you from 'em.)
Please. This sounds way too condescending.
Many early languages were crippled by a need to mimic hardware concepts. Modern languages are more sufficiently abstracted so that the language exists more to serve the person than the machine.
AWK is a great tool, but there is zero reason to choose it over Ruby as a first language.
In article <1121738640.658141.246160@g43g2000cwa.googlegroups.com>,
If you don't need to get involved in web programming right away, gawk
is probably the easiest and gives you a big bang for the buck, to mix
metaphors. Ruby is a breath of fresh air but you will have a hard time
appreciating many of the more powerful aspects of the language as a
newbie. Heck, many programmers even have a hard time wrapping their
brains around object-oriented programming. First crawl, then walk, then
run. (If you see the word 'pointer' in the language you are studying
you will want to avoid that language for at least a year. Pointers are
dangerous for newbies, and thankfully all popular scripting languages
shield you from 'em.) The easiest languages to learn are the
garbage-collected scripting languages such as PHP, Python, Perl, Ruby,
and Gawk. PHP is an excellant learning language---better than Java,
IMNSHO. Just don't stay in that rut for long. BTW, if you decide to go
with Awk/Gawk, one of the best books is called "The Awk Programming
Language," by Aho.
Oh, to be young again...
This is the first time I've seen gawk mentioned as a first langauge....
Well this is c.l.r afterall, so why not try Ruby as a first language?
What a concept!
Honestly, I think that Object Oriented programming is easier for newbies
to pick up than it is for folks who start learning a procedural language
first (like PHP or gawk). Also, I think PHP would probably teach too many
bad habits so I wouldn't recommend that (that and the fact that PHP's
days are probably numbered now that RoR is out there). To the OP: By all
means don't hesitate to learn Ruby as a first
language. Oh, and if it fits your style you might try Why's Poignant
Guide to Ruby: http://www.poignantguide.net/ruby/
And many don't. And of those that do, a contributing factor is having spent too much time with procedural programming, or with "we're OO, except when we're not" languages.
OO is a fairly straightforward concept. It gets messy with different implementations; Ruby's is quite clean. People are better off going straight to OO than trying to creep up on it via clumsy "newbie" alternatives.
I would hope that a good curriculum included a mix of high level and low level teaching. Fact is, OO is implemented in assembly, deep down, and while performance might not be a decent justification for teaching it to people, here's one (to me): OO isn't the be-all and end-all of programming. By showing how OO is built out of some more basic building blocks, you can give people the tools to be able to do other fancy things, such as LISP or Prolog, without blowing up over the fact that it doesn't look like Ruby code.
That said, I'm not recommending one teach compiler techniques or computer architecture to newbies. I'm also not arguing with your opinion that Ruby's a great newbie language. In fact, that there is such a (relatively) low barrier of entry in going from this:
puts "Hello, world!'
to this:
def greet(thing)
puts "Hello, #{thing}!"
end
greet "world"
to this:
class Greeter
def initialize(thing) @thing = thing
end
def greet
puts "Hello, #@thing!"
end
end
g = Greeter.new "world"
g.greet
that someone can actually attempt to teach the *reasons* to use OO (that is, the problems it addresses), rather than just impose it as a code convention for the class.
Having never taught formally, or even regularly, I could be full of it, though.
Java, at least old Java, or Python would probably be an easier
introduction to OO.
I still find Ruby's OO to be mind-boggling with its classes are
objects and objects are classes, class variables and class instance
variables, virtual classes, self and so forth. Fact is, if you really
want to understand Ruby's object model it also helps if you go down to
the C level implementation.[1]
Ruby is fascinating and satisfying, but I'm not entirely sure exposure
to such an object model is entirely appropriate for a newbie...
Although certainly much of it can be ignored at the beginning and
introduced in steps, a newbie might be more satisfied with, say,
Python since it would probably be easier to grasp in its entirety.
OO is a fairly straightforward concept. It gets messy with different
implementations; Ruby's is quite clean. People are better off going
straight to OO than trying to creep up on it via clumsy "newbie"
alternatives.
> OO is a fairly straightforward concept. It gets messy with different
> implementations; Ruby's is quite clean. People are better off going
> straight to OO than trying to creep up on it via clumsy "newbie"
> alternatives.
Java, at least old Java, or Python would probably be an easier
introduction to OO.
No, not Java. I'm not a teacher, but i do Java/C coaching from time
to time and the hardest things to explain are static vs instance methods
and primitives vs objects in Java. There are no static methods in Ruby
(there is always a "self") and no primitives in the Java sense.
Then explain interfaces, a type system which is partially static and
partially dynamic, try to read a single line from the console(!), ...
I like Python (don't shoot me until it comes to OO, which feels
a bit clumsy. Ruby's OO feels much more "natural" to me.
IMHO there a fewer Ruby concepts you need to know to write useful
software than with Java or Python.
···
On Tuesday 19 July 2005 09:41, Navindra Umanee wrote:
James Britt <james_b@neurogami.com> wrote:
I still find Ruby's OO to be mind-boggling with its classes are
objects and objects are classes, class variables and class instance
variables, virtual classes, self and so forth. Fact is, if you really
want to understand Ruby's object model it also helps if you go down to
the C level implementation.[1]
Ruby is fascinating and satisfying, but I'm not entirely sure exposure
to such an object model is entirely appropriate for a newbie...
Although certainly much of it can be ignored at the beginning and
introduced in steps, a newbie might be more satisfied with, say,
Python since it would probably be easier to grasp in its entirety.
OO is a fairly straightforward concept. It gets messy with different implementations; Ruby's is quite clean. People are better off going straight to OO than trying to creep up on it via clumsy "newbie" alternatives.
Java, at least old Java, or Python would probably be an easier
introduction to OO.
python is ok. I won't say that metaclass hackery, multiple inheritance and __mro__, the cooperative super() class, descriptors and so on are easy, but a noob won't hit them too soon. But the same is valid for ruby.
But please no java for a beginner.
Trust me, in my university Java is uased as the language for the first programming class, and the standard reaction to
public class Test{
public static void main(String args){
System.out.println("hello world");
return;
}
}
is people running away screaming, since they're introduced to a dozen of concepts in a single 5 line code. This does not mean they won't learn, in the end, but they find it freaking hard and non-funny.
I still find Ruby's OO to be mind-boggling with its classes are
objects and objects are classes, class variables and class instance
variables, virtual classes, self and so forth. Fact is, if you really
want to understand Ruby's object model it also helps if you go down to
the C level implementation.[1]
maybe this is because you have always thought classes were not objects, I, for one, found it extremely strange when I discovered in some languages they are not
(Classes are objects even in java and python, btw
OO is a fairly straightforward concept. It gets messy with different
implementations; Ruby's is quite clean. People are better off going
straight to OO than trying to creep up on it via clumsy "newbie"
alternatives.
Java, at least old Java, or Python would probably be an easier
introduction to OO.
I still find Ruby's OO to be mind-boggling with its classes are
objects and objects are classes, class variables and class instance
variables, virtual classes, self and so forth. Fact is, if you really
want to understand Ruby's object model it also helps if you go down to
the C level implementation.[1]
Ruby is fascinating and satisfying, but I'm not entirely sure exposure
to such an object model is entirely appropriate for a newbie...
Although certainly much of it can be ignored at the beginning and
introduced in steps, a newbie might be more satisfied with, say,
Python since it would probably be easier to grasp in its entirety.
But isn't Ruby's object model very similar to Smalltalk's and wasnt'
Smalltalk developed to teach programming to children? If anything Ruby is
more consistent. A newbie (not having been exposed to, say Java's object
model) might think it very natural that a class is an object. I think
it's just an impediment for those who have come from other languages where
that wasn't the case.
I still think that Ruby is a very good learning language. I've taught
Ruby to total newbies before. Well, one person in the class wasn't a
total newbie: he was an old assembly programmer (the guy would even do web
stuff in assembly). The assembly programmer just couldn't get it, but
most everyone else (most of whom had 0 programming experience) grasped the
concepts (even the OO ones) pretty quickly. I suspect that the assembly
programmer just had too much baggage and that he was trying to understand
Ruby through that assembly language baggage.
No, not Java. I'm not a teacher, but i do Java/C coaching from time
to time and the hardest things to explain are static vs instance methods
and primitives vs objects in Java.
Not to mention variables which are passed by value vs those which are passed by reference, hence assignments and comparison working differently depending on the type, arrays being unlike every other type, constructors having special unique syntax, and a huge and inconsistent class library. (Which are we using this release? array, Array, ArrayList, or Vector?)
I was writing Java long before I came to Ruby, and I wouldn't push Java on someone new to programming.