Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tominated

macrumors 68000
Original poster
Jul 7, 2006
1,723
0
Queensland, Australia
I have been wondering for a while. what exactly is ruby? All i know is that it is for the web and is 'cool'. Can someone give me a quick description, or a link to one. BTW: if it has anything to do with php, i think i am kinda stuffed (don't have a clue how it works)
 
Ruby is a programming language. They compare it to perl, smalltalk, python, and some other. it's supposed to be really good. Sooooo, some people got together and created a web application framework with it called Ruby on Rails. It's suppose to be really easy and fast to create web apps with it.

the ruby language page is here:
http://www.ruby-lang.org/en/

and ruby on rails was already linked :)
 
I have been wondering for a while. what exactly is ruby?
It's yet another interpreted programming language, what you might end up with if Perl had properly integrated OO features, or Python had brackety syntax.
All i know is that it is for the web
Ehhh, not really. The Rails framework has made Ruby popular there, but it's really a general-purpose language, not really a Web specialty like PHP tries to be.
and is 'cool'.
Not so sure about cool, but the Ruby community certainly has evolved itself into quite the hype machine over the years.
Can someone give me a quick description, or a link to one.
Straight from the horse's mouth.
BTW: if it has anything to do with php, i think i am kinda stuffed (don't have a clue how it works)
It's not the prettiest language IMHO, but it's much less hideous than PHP.
 
Oh, this is interesting, I have heard so much about ruby and ruby on rails, what are your opinions about this language? So far, I have not tried it at all but I am open to new ideas. Does it really live up to it's hype?
 
I know HTML, but is ruby hard to lern?

The two are remarkably different. HTML is what's called a Markup language (no real logic or control structures) and is definitely NOT a programming language, whereas Ruby is a full-on dynamic scripting language and most definitely IS a programming language. From what I understand, Ruby is pretty easy to pick up and reads a lot like English, but trust me when I tell you that it's NOTHING like HTML.
 
It is not hard to learn the basics of Ruby (on Rails). Basic applications can be created in no time. For my first Rails app, I made an inventory tracking system in about 6 minutes.

The harder part comes when you need to break out of the regular single-object read-write-update-delete mantra. To work most efficiently in Rails, you need to both understand Ruby and understand the shortcuts going on in the backround of Rails to properly take advantage of the framework. I'm sort of in the middle of that period now. It can be frustrating, but once you discover something it's very cool and from then on it saves you a lot of time.

Overall, it's much faster to build using the Rails framework than PHP, for example, as long as you like keeping things organized and can follow conventions.

And no, HTML is not a programming language. Knowing HTML helps you program about as much as knowing how to use Microsoft Word does.
 
I've been wondering about this too. I have been writing various scripts in Perl for a little over a year, and incorporating them into websites with Mason components, but sometimes I feel like I'm miles away from being on the "cutting edge" (much less the bleeding edge) of technology because PHP is practically the standard these days, and then there's all the object-y stuff to make your sites all snazzy and glossy and interactive.

The web development company I work for is very committed to making sure our sites still work on older (read: IE6) browsers, and with Javascript turned off, and without plug-ins. Our tech guy is also very concerned about security problems with these new-fangled things, because people are writing and implementing scripts without really knowing how they work.

Given my constraints of making sites that work for everyone, is it worth it to try to learn the latest "language of the week", or should I stick with what I already know and get better at it instead?

http://www.korora.com
 
The web development company I work for is very committed to making sure our sites still work on older (read: IE6) browsers, and with Javascript turned off, and without plug-ins. Our tech guy is also very concerned about security problems with these new-fangled things, because people are writing and implementing scripts without really knowing how they work.
While Rails provides developers with a framework for using "new-fangled" things (such as Ajax-based user interfaces) it certainly doesn't require that you use them. So I don't believe that switching to Rails would inherently introduce new security or backwards-compatibility related problems.

iceprincess0966 said:
Given my constraints of making sites that work for everyone, is it worth it to try to learn the latest "language of the week", or should I stick with what I already know and get better at it instead?
One of the reasons that Rails has really taken off over the last few years is that web developers who are experienced with PHP and Java claim that they're much more productive when using Rails. While I can sympathize with your reluctance to invest too much time in the "language of the week", I think it's safe to say that Rails is worth your time to at least experiment with. I'm currently reading "From Java to Ruby" (by Bruce Tate) and it's written more from a manager's perspective about the pros and cons of moving to Ruby (and specifically Rails). Although he specifically calls out Java in the book's title, so far it seems that most of his arguments would apply to PHP or other legacy web development platforms.
 
First of all, I am a Ruby (and RoR) Zealot...

It's not the prettiest language IMHO, but it's much less hideous than PHP.

Ehh.. Ruby has one of the most elegant syntax possible! Passing blocks of code can be confusing at first but it is so much powerful that once you know about it, you wonder how you lived without!

Also, Ruby as a lot of idiomatic coding, logical default values, etc... I was coding in Java before learning about Ruby and now I deserted java because I find it ugly. Not as ugly has objectiveC, but still...

Ruby and Ruby on rails require more thinking from the developper than other language such as PHP because the framework encourage you to think and come up with a good design. If you do so, you get A LOT of code for free, and that is why a lot of good programmers are embrassing RoR so much. You have to know about MVC, REST, OO to really appreciate RoR.

Each language has a target audience and mantra. R and RoR are the only ones who are made to maximize programmers happiness. This sound cheesy but its true! By doing less coding more thinking you get:
- a better design
- less code to maintain (which increase happiness!)

With a knowledge of database design and some scaffolding you can come up with a complete webapp in under 10mins. And 10 more and you can add autocomplete, validations, and more AJAX crazyness. Of course, a lot of the stuff will be missing, but it will be a working prototype that you can then either modify or rebuilt from scratch.

The real challenge when learning RoR isnt as much as learning Ruby as it is to learn good application design and how/where to apply them.
 
I have been wondering for a while. what exactly is ruby? All i know is that it is for the web and is 'cool'. Can someone give me a quick description, or a link to one. BTW: if it has anything to do with php, i think i am kinda stuffed (don't have a clue how it works)

Is it anythign to do with PHP? It's sort of a replacement for php but Ruby can also work outside of a web enviromment. (technically so can php but no one does that)

The language itself, be it Ruby, Python, perl or even C is not a big deal they are all close enough and differ only in details What's different and what matters is all the "stuff" that comes with and is built on top of the language.

For example Java. It's a simple language but you add it Java Beans and a billilon other APIs. With ruby. "rails is the big deal, ruby is the glue that conects big of it. In fact I could image a "pyton on rails"
 
The language itself, be it Ruby, Python, Perl or even C, is not a big deal; they are all close enough and differ only in details. What's different and what matters is all the "stuff" that comes with and is built on top of the language.
I agree that the standard library (and the selection of third-party libraries) are a significant consideration when choosing a programming language, but that's definitely not the whole story. Another important consideration is how readable and maintainable the code is, given that an overwhelming majority of the cost of software development is spent in maintenance. As radiantm3 noted, many developers (including myself) who've worked in a variety of programming languages find Ruby code very expressive and extremely easy to read. And as Mantat pointed out, Ruby code is, generally speaking, more concise (and less code means reduced maintenance costs).

ChrisA said:
... in fact I could imagine a "Python on Rails"
You wouldn't be the first... :D
 
I whant to start learing Ruby. What are good website that will teach me how to use it. also what do i need to start learning it?
 
I whant to start learing Ruby. What are good website that will teach me how to use it. also what do i need to start learning it?
Given that you're new to programming, I would recommend Chris Pine's book Learn to Program. (Although the book is a general introduction to programming concepts, Chris uses Ruby as the programming language.)

For folks who have done some programming, start at the Ruby home page and perhaps go through the "Ruby in Twenty Minutes" quickstart tutorial found there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.