r/programming • • Feb 24 '13

Ruby 2.0.0

http://www.ruby-lang.org/en/news/2013/02/24/ruby-2-0-0-p0-is-released/
600 Upvotes

193 comments sorted by

View all comments

10

u/TheWakeUpCall Feb 24 '13

Where can you learn Ruby?

14

u/TikiTDO Feb 24 '13

2

u/hak8or Feb 24 '13

Holy crap this looks amazing. The book code appears to be on a repo, and if people notice something wrong they appear to fix it. The HTML is fully free, but if you want you can purchase a epub/PDF for only THREE DAMN DOLLARS! I don't know why buying both costs five, but still.

Anyone have an opinion on the books for Ruby and Python? Oh wait, his Python is for the old 2.XX version and not the newer 3.XX version, damn.

10

u/HelloAnnyong Feb 24 '13

It's written by Zed Shaw, somewhat of a superhero (or supervillain, depending on whom you ask) and creator of the Mongrel web server among other things.

3

u/myringotomy Feb 25 '13

He is neither a hero or a villain, just a drama queen that's all.

0

u/[deleted] Feb 24 '13

[deleted]

-7

u/classhero Feb 24 '13

"Rails is a Ghetto"... because it is.

http://i.imgur.com/HVUoNOH.jpg

4

u/[deleted] Feb 24 '13

The Ruby book is aimed at someone who's never programmed before. For such a person, I think it could be a good introduction to programming.

But it's not a very good introduction to Ruby. It's very unidiomatic and doesn't focus on Ruby's strengths or style.

So whether it's good or bad for you depends on what you're looking for and how much you already know. If you know how to program in another language, then I would say start somewhere else. If you don't know programming at all, try it. And then if you come to like Ruby, check out Eloquent Ruby or The Well-Grounded Rubyist afterwards for more Ruby-like Ruby.

3

u/catcradle5 Feb 24 '13

I agree in regards to his Python book, too. Someone is not going to learn Python well just based on reading his book. If anything I'd recommend to beginners to first go through Zed's initial chapters to get started, then move onto a real, more comprehensive, slower-moving book.

1

u/audiodude Feb 24 '13

The "old" 2.XX version is still the version most commonly in use today. Anyone who works with Python knows that very little work is done in 3.XX and most FLOSS Python software is written in 2.

-1

u/[deleted] Feb 24 '13

If you are learning Python, I would still go for the 2.x.x version... It's still more widely used then 3 and you should be well prepared for the changes in 3 after learning 2.

13

u/xiongchiamiov Feb 24 '13

This sort of advice is precisely why 2.x is more widely used than 3.x. Dammit, people, start writing things in 3.x and backport to 2.6, 2.7 so we can finally move on with our lives!

6

u/jargoon Feb 24 '13

This is why having Rails around is great for the Ruby community. New version of Ruby comes out, Rails core team says "the next version of Rails will only support new version of Ruby or higher", adds a bunch of deprecation warnings, and everyone either gets off their asses and updates their gems or new gems pop up to replace them.

1

u/catcradle5 Feb 25 '13

I agree with you, but as someone who writes in Python every day, I exclusively write in Python 2.7 because many, many of the libraries I rely on are still written for 2.x. I am not going to port those libraries myself. I am going to use the best tool for the job, and for now that is still 2.7. Python 3 is overall a better language, but the disadvantages of the unsupported libraries outweighs the advantages of the wart removals and feature additions.

It's certainly good for everyone, including beginners, to know most of the changes in Python 3 though, and they should know how to read, write, and modify Python 3 code.

3

u/earthboundkid Feb 24 '13

If you're learning Python, just learn both. They aren't especially different. If you learn the changes to string, you're 80% of the way there. I recommend starting with 3 first because it has codified more modern idioms, but it doesn't really matter. If you have a book written in 2 that has idiomatic code, you can just start with that. Either way, if you're serious about Python, you should know both eventually.