Beginning Ruby
TimHunter writes "Peter Cooper's Beginning Ruby: From Novice to Professional has two audiences, novices with no programming experience who want to learn Ruby as their first programming language, and veterans who want to add Ruby to their programming toolkit. Cooper's response to this challenge is a solid entry in the limited arena of Ruby tutorials. Even though the early chapters are marred by the occasional reference to an advanced topic, readers will appreciate the plentiful examples and thoughtful description of the Ruby language." Read below for the rest of Tim's review.
Beginning Ruby: From Novice to Professional
author
Peter Cooper
pages
631
publisher
Apress
rating
7
reviewer
Tim Hunter
ISBN
1590597664
summary
An introduction to Ruby programming
Ruby is an object-oriented programming language in the same family as Perl and Python. Ruby is very popular for writing web applications but also widely used for the general-purpose programming tasks. Ruby is available for Linux, Mac OS X, and Microsoft Windows. It is Open Source software with a commercially friendly license.
I agreed to review this book in particular because, even though the Ruby community has a strong tradition of encouraging newcomers, there are actually very few resources for the Ruby beginner. Ruby has gained a repuation for being easy to learn and therefore is attractive to people with limited or no programming experience. Novice programmers post almost daily requests for help and direction to the ruby-lang mailing list.
In addition to serving people with no progamming experience, Beginning Ruby is also aimed at experienced programmers who want to learn Ruby. Progammers coming from languages such as Java or C++ often struggle with Ruby's dynamic typing and (even with the recent explosion of Ruby-related books) the relative scarcity of documentation. Beginning Ruby tries to satisfy this audience by explaining Ruby's design, history and place in the programming world and including an extensive survey of the currently-available Ruby libraries.
Beginning Ruby is divided into 3 parts. The first part is aimed at neophytes. Experienced programmers, especially those experienced with object-oriented programming, will be able to skip chapter 2 and skim chapters 3 and 4.
The book starts simply. Chapter 1 isn't even about programming. This chapter explains how to install Ruby on Windows, OS X, and Linux. The instructions are thorough and aimed squarely at beginners. For example, Cooper explains how to get a command prompt on Windows and how to run Terminal.app on OS X.
Chapters 2 and 3 introduce fundamental concepts such as variables, expressions, control flow, classes, and objects. Cooper emphasizes experimentation. He says that irb, Ruby's interactive programming module, "provides the perfect environment for tweaking and testing the language, as you cannot do any real damage from within irb." Such assurances are helpful, especially to the beginner who may be slightly afraid that he's going to somehow make a mistake that will "break" his computer.
Explaining programming to beginners is hard. I've read a number of books that try to teach object-oriented programming concepts to people with no programming experience whatsoever. None were stunningly successful. This one isn't either. The problem is that books are linear, but there are simply too many things – concepts, keywords, tools – that have to be introduced nearly simultaneously and initially taken on faith. Cooper distracts his readers by peppering his text with too many "don't worry about this yet" disclaimers and assurances that explanations will appear later. His references C and Perl will be meaningless and possibly confusing to the beginning programmer.
Chapter 4, "Developing a Basic Ruby Application," starts by explaining what a text editor is and offering a few recommendations for text editors on Windows, OS X, and Linux. Then it guides the reader through his first real program, a script to read a text file and compute simple statistics such as the number of lines and words. This is a well-chosen example that will, when completed, make the student feel like he's accomplished something.
Chapter 5, "The Ruby Ecosystem," feels out-of-place. This chapter doesn't teach anything about Ruby programming. Instead it explains Ruby's history, introduces Ruby On Rails, and talks about the Open Source movement. Little, if any, of this material will be interesting to a fledgling programmer. The chapter finishes with a list of internet-based Ruby resources such as mailing lists, IRC, and blogs. All of this seems much better suited as an appendix and indeed the list of resources appears again in Appendix C.
Part 2, "The Core of Ruby," has a slower pace. With the very basic material covered, Beginning Ruby gets a better footing. Starting in this part the material is useful to both beginners and veterans.
This is probably as good a place as any to talk about the examples, which are numerous and very likely the best part of the book. Most of the the examples are short and to the point. A few extend over several pages. My overall impression is that they are well-chosen and well-coded. I especially like the way the examples appear on the page, visually distinctive but without interrupting the flow of the text. Source code for all of the examples may be downloaded from the Apress web site. However, even though the files are divided into a directory per chapter, the examples aren't numbered in the text so it's difficult to find the code for the example you're looking at. I ended up using grep to search for keywords in the sources.
Chapter 6 is a slower pass through Ruby, focusing on Ruby's object-orientation. Though fewer than part 1, there are still problems with references to concepts that have not yet been introduced. For example, Cooper uses the require method in the context of namespaces even though require has not been introduced. Indeed, it's not even necessary to mention namespaces at all in this chapter since the entire concept could've been held off until the next chapter, which explains how to create programs from code in multiple files.
The remaining chapters in this part start to address the needs of the serious Ruby programmer. This is a lot of ground to cover, including documentation, debugging, test-driven development, I/O, databases, and how to deploy Ruby programs. I particularly liked Cooper's thorough instructions for installing and creating RubyGems, Ruby's third-part library management system. There are so many topics to cover that each one gets only an introduction, but Cooper uniformly provides links to extended online documentation.
The last chapter in this part works through an even larger example, a Ruby "chat bot." This is an ingenious and entertaining example, the kind of program that, had I read it when I was just starting to learn programming, would have spent many happy hours tweaking. Call me a geek, but I got a chuckle out of the example on page 383 of two very stupid bots conversing.
Part 3 is called "Ruby Online." Of course it starts with the obligatory chapter on Ruby on Rails. I suppose publishers require such a chapter in all Ruby books, even though RoR is more than amply covered by other excellent books. I'm not a RoR programmer so I blew off this chapter.
Chapter 14 describes Ruby's support for the Internet via its HTTP, email, and FTP libraries. Chapter 15 covers other networking support libraries. As usual there are many excellent examples. Chapter 16 is a very good survey of the standard and add-on libraries that the serious Ruby programmer will find useful. Each library is demonstrated with an example, and Cooper provides a link to the complete documentation.
At the start of this review I said that Beginning Ruby is divided into 3 parts, but actually there are four. The last part consists of 3 appendices. Appendix A is a summarization of Part 2. Appendix B is sort of a "semi-reference" to Ruby's core libraries. This is not intended to be a complete reference. Instead, Cooper limits his discussion to the most useful methods of the core classes. As I mentioned earlier, Appendix C is a list of Internet-based Ruby resources such as web pages, mailing lists, IRC channels, and blogs.
I'm giving Beginning Ruby a 7. It's a good book for someone who wants to learn Ruby as his first programming language. It could be better. I liked Cooper's patient and thoughtful explanations about installing Ruby and RubyGems, how to use a command line, and what a text editor is for. Cooper supplies answers to all the typical Ruby-nuby questions, but his explanation of basic concepts is marred by the occasional confusing reference to advanced or even irrelevant topics. For the experienced programmer who learns best by reading and working through examples this book is a good choice. Dave Thomas' Programming Ruby, The Pragmatic Programmer's Guide (a.k.a. the Pickaxe) is a tough competitor, but each book has a considerable amount of material that is not found in the other book. For example the Pickaxe's core library reference is exhaustive but it has only a limited amount of the kind of tutorial explanations that is Beginning Ruby's strength. Beginning Ruby is available in PDF format from Apress' web site at about half the price of the paper book.
I have been programming Ruby as a hobby for over 5 years. Apress gave me a review copy of this book, but otherwise I have no connection to the author or publisher."
You can purchase Beginning Ruby: From Novice to Professional from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Ruby is an object-oriented programming language in the same family as Perl and Python. Ruby is very popular for writing web applications but also widely used for the general-purpose programming tasks. Ruby is available for Linux, Mac OS X, and Microsoft Windows. It is Open Source software with a commercially friendly license.
I agreed to review this book in particular because, even though the Ruby community has a strong tradition of encouraging newcomers, there are actually very few resources for the Ruby beginner. Ruby has gained a repuation for being easy to learn and therefore is attractive to people with limited or no programming experience. Novice programmers post almost daily requests for help and direction to the ruby-lang mailing list.
In addition to serving people with no progamming experience, Beginning Ruby is also aimed at experienced programmers who want to learn Ruby. Progammers coming from languages such as Java or C++ often struggle with Ruby's dynamic typing and (even with the recent explosion of Ruby-related books) the relative scarcity of documentation. Beginning Ruby tries to satisfy this audience by explaining Ruby's design, history and place in the programming world and including an extensive survey of the currently-available Ruby libraries.
Beginning Ruby is divided into 3 parts. The first part is aimed at neophytes. Experienced programmers, especially those experienced with object-oriented programming, will be able to skip chapter 2 and skim chapters 3 and 4.
The book starts simply. Chapter 1 isn't even about programming. This chapter explains how to install Ruby on Windows, OS X, and Linux. The instructions are thorough and aimed squarely at beginners. For example, Cooper explains how to get a command prompt on Windows and how to run Terminal.app on OS X.
Chapters 2 and 3 introduce fundamental concepts such as variables, expressions, control flow, classes, and objects. Cooper emphasizes experimentation. He says that irb, Ruby's interactive programming module, "provides the perfect environment for tweaking and testing the language, as you cannot do any real damage from within irb." Such assurances are helpful, especially to the beginner who may be slightly afraid that he's going to somehow make a mistake that will "break" his computer.
Explaining programming to beginners is hard. I've read a number of books that try to teach object-oriented programming concepts to people with no programming experience whatsoever. None were stunningly successful. This one isn't either. The problem is that books are linear, but there are simply too many things – concepts, keywords, tools – that have to be introduced nearly simultaneously and initially taken on faith. Cooper distracts his readers by peppering his text with too many "don't worry about this yet" disclaimers and assurances that explanations will appear later. His references C and Perl will be meaningless and possibly confusing to the beginning programmer.
Chapter 4, "Developing a Basic Ruby Application," starts by explaining what a text editor is and offering a few recommendations for text editors on Windows, OS X, and Linux. Then it guides the reader through his first real program, a script to read a text file and compute simple statistics such as the number of lines and words. This is a well-chosen example that will, when completed, make the student feel like he's accomplished something.
Chapter 5, "The Ruby Ecosystem," feels out-of-place. This chapter doesn't teach anything about Ruby programming. Instead it explains Ruby's history, introduces Ruby On Rails, and talks about the Open Source movement. Little, if any, of this material will be interesting to a fledgling programmer. The chapter finishes with a list of internet-based Ruby resources such as mailing lists, IRC, and blogs. All of this seems much better suited as an appendix and indeed the list of resources appears again in Appendix C.
Part 2, "The Core of Ruby," has a slower pace. With the very basic material covered, Beginning Ruby gets a better footing. Starting in this part the material is useful to both beginners and veterans.
This is probably as good a place as any to talk about the examples, which are numerous and very likely the best part of the book. Most of the the examples are short and to the point. A few extend over several pages. My overall impression is that they are well-chosen and well-coded. I especially like the way the examples appear on the page, visually distinctive but without interrupting the flow of the text. Source code for all of the examples may be downloaded from the Apress web site. However, even though the files are divided into a directory per chapter, the examples aren't numbered in the text so it's difficult to find the code for the example you're looking at. I ended up using grep to search for keywords in the sources.
Chapter 6 is a slower pass through Ruby, focusing on Ruby's object-orientation. Though fewer than part 1, there are still problems with references to concepts that have not yet been introduced. For example, Cooper uses the require method in the context of namespaces even though require has not been introduced. Indeed, it's not even necessary to mention namespaces at all in this chapter since the entire concept could've been held off until the next chapter, which explains how to create programs from code in multiple files.
The remaining chapters in this part start to address the needs of the serious Ruby programmer. This is a lot of ground to cover, including documentation, debugging, test-driven development, I/O, databases, and how to deploy Ruby programs. I particularly liked Cooper's thorough instructions for installing and creating RubyGems, Ruby's third-part library management system. There are so many topics to cover that each one gets only an introduction, but Cooper uniformly provides links to extended online documentation.
The last chapter in this part works through an even larger example, a Ruby "chat bot." This is an ingenious and entertaining example, the kind of program that, had I read it when I was just starting to learn programming, would have spent many happy hours tweaking. Call me a geek, but I got a chuckle out of the example on page 383 of two very stupid bots conversing.
Part 3 is called "Ruby Online." Of course it starts with the obligatory chapter on Ruby on Rails. I suppose publishers require such a chapter in all Ruby books, even though RoR is more than amply covered by other excellent books. I'm not a RoR programmer so I blew off this chapter.
Chapter 14 describes Ruby's support for the Internet via its HTTP, email, and FTP libraries. Chapter 15 covers other networking support libraries. As usual there are many excellent examples. Chapter 16 is a very good survey of the standard and add-on libraries that the serious Ruby programmer will find useful. Each library is demonstrated with an example, and Cooper provides a link to the complete documentation.
At the start of this review I said that Beginning Ruby is divided into 3 parts, but actually there are four. The last part consists of 3 appendices. Appendix A is a summarization of Part 2. Appendix B is sort of a "semi-reference" to Ruby's core libraries. This is not intended to be a complete reference. Instead, Cooper limits his discussion to the most useful methods of the core classes. As I mentioned earlier, Appendix C is a list of Internet-based Ruby resources such as web pages, mailing lists, IRC channels, and blogs.
I'm giving Beginning Ruby a 7. It's a good book for someone who wants to learn Ruby as his first programming language. It could be better. I liked Cooper's patient and thoughtful explanations about installing Ruby and RubyGems, how to use a command line, and what a text editor is for. Cooper supplies answers to all the typical Ruby-nuby questions, but his explanation of basic concepts is marred by the occasional confusing reference to advanced or even irrelevant topics. For the experienced programmer who learns best by reading and working through examples this book is a good choice. Dave Thomas' Programming Ruby, The Pragmatic Programmer's Guide (a.k.a. the Pickaxe) is a tough competitor, but each book has a considerable amount of material that is not found in the other book. For example the Pickaxe's core library reference is exhaustive but it has only a limited amount of the kind of tutorial explanations that is Beginning Ruby's strength. Beginning Ruby is available in PDF format from Apress' web site at about half the price of the paper book.
I have been programming Ruby as a hobby for over 5 years. Apress gave me a review copy of this book, but otherwise I have no connection to the author or publisher."
You can purchase Beginning Ruby: From Novice to Professional from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
I started with Perl...I'll probably never recover from that.
Uh, right. Go ahead and mod me down. Apparently "I disagree with you" is now used for -1 point "Troll." The bottom line is, no newb to programming is going to pick this is their first.
I'm seriously considering starting programming with Ruby and plan to look on Amazon later this evening for this book. Do you have any eloquent reason why I shouldn't?
Maybe the problem is that, like a troll, you didn't give any good reason for your assertion that ruby is a bad language to start with. (assuming that puh-leese is an assertion.)
Personally, I could never go back to perl, java or php from ruby, so it that is the case, why not bother starting with ruby?
Come on.. a slashotisement on ruby, what we all need. How about some Macotisement while we're at it?
Why not? It is an acceptable LISP after all.
Combine the approaches of try ruby! and the Purple Book, and you can't really go wrong.
Now all we have to do is wait for such a book. Finished with pickaxe flavoring.
How many different programming tools do we need?
Wouldn't a venn diagram of key language features show substantial overlap?
Ruby sounds like your typical well-done tool, which clearly has its audience.
The only substantial criticism of Ruby I've ever heard is here:
http://ciaranm.org/show_post/110
Still, I'm wondering, what is the Next Big Thing? Is Python3000 going to rule the day? It's obviously 500 times better than Perl6. Then again, you've another round of C++ coming up for standardization: will svelte compiled languages recover some of the mindshare lost to these SUV scripting languages?
Is the point of making some new tool the buzz of the day simply to sell books?
Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
rotfl
I know (as in, have written a substantial amount in) perl, java, ruby, C++, C, and (god forbid) PL/I. I am acquianted with quite a number more (like Haskel, Lisp) And have no fear, ruby is a fine language to start with. Especially the irb shell is very nice for getting your bearings, and the functional support will be good for you if you ever turn to the hardcore languages, like Haskell, C++ and that ilk. On the other hand, if you prefer the more limited languages, like Java, you will still have a good idea about most concepts you'll find. The only thing you will not learn that are common is static overloading and type checking, which is easy enough to pick up.
Good luck. Learning to code and coding is very rewarding :)
Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
I prefer Python on Fixed Wing Aircraft.
Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
Me too, but strangely I think it helped more than it hurt. By the time I was fluent in Perl, every other language seemed easy to grasp. It also taught me proper object-oriented programming by punishing me mercilessly for having a poor design. I guess it's kind of like the school of hard knocks for programmers.
Positive reinforcement is for spoiled Ruby programmers.
http://www.mhall119.com
I started with Java, havent used it since :)
Of course, as beginner languages go, Java was great - fantastic for teaching OO fundamentals.
Mooniacs for iOS and Android
Why is Ruby suddenly the big buzz these days? My internets inform me it's a high level server-side language (python for websites). Isn't the most important thing in a server side language fast performance rather than quick development time? I found an article on coding horror in the depths of my RSS reader talking about how Twitter are having no end of problems scaling their system, as they're using Ruby and it just isn't made for big, high traffic sites.
If the main reason for writing server side software is web based applications, or at least dynamic content, isn't a huge factor in this how well it scales? Nobody makes sites to be used by 20 people.
Finally, if anybody can explain it's popularity to me, should I learn it? I'm currently doing freelance web dev mostly in PHP, would it be useful? How? In my spare time I'm writing a AJAX web app with PHP back-end at the moment and it's mostly for my personal use (task tracking from anywhere), is Ruby good here with the limited audience the site'll have?
Many computer science departments, including MIT, use Scheme as the language for their introductory computer science course. It's a wonderful language and helps the students learn a lot of key concepts that are important for formal computer science.
Scheme, though, is a little hard to use for real-world work. Ruby, on the other hand, is a great real-world language that has many of the features that I miss from Scheme: closures, lambda expresions, etc.
I haven't read this book, so I can't recommend it, but I can heartily recommend Ruby as a language that would be great to learn to program in. It'll let you focus on the key concepts rather than the tedium of implementing them in lower level languages.
Go for it!
Why exactly do people say that? Ruby is not terribly lisp like in any way. No macros, it has a terse context sensitive syntax, it's really kind of big where scheme and lisp are generally kind of small.
Well, you're in luck.
I think there is a world market for maybe five personal web logs.
There will never be an acceptable lisp. No sane person designs a modern language that requires counting opening and closing parentheses until your eyes burn.
Ruby is slower than pretty much everything, and using rails means committing to buying a supercomputer. The ruby community is the worst bunch of architecture astronauts ever.
there are editor tools that will do that and more for you, and not just for LISP
That's why God invented editors with brace matching. Stop using ed just because it's the standard.
Game... blouses.
FYI....it's a joke. I have used editors to write lisp and it's made my courses in AI and NLP so much easier but my fellow classmates still poked fun at lisp.
It seems that there are people pushing ruby but for no purpose than to jump on something to sell books.
What is the advantage of this language over PHP,python or Perl.
It is extrememly slow. Terrible for high usage websites.
Seems there are programmers who are in love with syntax and will trade speed for it. I would rather use CGI with C:Still the performance king,Java comes in 2nd and Perl 3rd.
...welcome our new Ruby beginners...
As a first programming language, if you are serious about programming, learn C or some Assembler, this will make you understand how a computer actually works and think before you write sucky code.
I know Assembler, C, Obj-C, C++, Haskell, Bash, Java, Python, Matlab (or whatever that language is called) plus a few proprietary languages and toy/educational languages.
Although, while I didn't start with C or Assembler (I started with C++ and felt it was a big piece of shit, though now days I find it quite useful; it is very abstracted though), this is certainly what I recommend for a person who is serious about programming.
As a side note, it is interesting that at the school at which I took my MSc, they used Haskell as a first starting language, basically to tell everyone that "you don't know shit about programming" and bring the sufferers of the perfect programmer syndrome down to the ground. A very good thing indeed.
Learn C or Assembler, and then learn Ruby, that is the way to go.
"Civis Europaeus sum!"
All new dynamic language claims be more easy to learn than Java. But it's easy from a experienced programmer that ALREADY KNOWS OO. For a totally new programmer, the lack of brackets or ; at the end of the line is not a point of easiness, because the really hard part is learn OO, in Java, Python, Ruby or any other language.
I created this site about 6 months ago for programmers to rank their favorite programming books. The concept is simple, you rank your top 5 favorite books for a particular subject like "Ruby" or "Software Engineering". Specifically here are the top ranked Ruby Books. And here's the list of Top books every programmer should read. Of course, this only really works well if more people rank books, so if you've read this book, rank it(and any other ones you've read).
Hmm...I'm not so sure about this book for my Ruby tastes. No cartoon foxes? No thanks!
I think Ruby would be a great first language. But you may want to also look at Chris Pine's Learn to Program as well as the book reviewed here: what I've heard about it is good, though I haven't looked at it myself.
$0.02
(%i1) factor(777353);
(%o1) 777353
there are editor tools that will do that and more for you, and not just for LISP
Shh, we need these Lisp jokes every once in a while to keep the Java people in Java, and the Ruby people in Ruby.
And yes, it's "Lisp" these days not "LISP". Go lurk at comp.lang.lisp if you don't believe me.
So, would you say you were tired of this MF'ing ruby on these MF'ing rails?
... I guess it's kind of like the school of hard knocks for programmers.Why UNIX?
I am a seasoned developer and one of my client pushed very hard for ruby/rails.
... In short, I feel it well behind Java or C# in a professional point of view
... My only advice is to let this "wow" period settle down before making a hard decision to switch.
This is a scripting language, and you really feel the difference with a more generic language.
Ruby spirit is "wild" :
you will have tons of libs that gonna patch standard classes everywhere (patch, like in patch, not extend)
it ends up with conflicting changes !! one require of the wrong lib and rails is crashing everywhere and it is very difficult to diagnose
duck typing renders code very hard to follow because sometime your ducks looks like ducks aren't really, you will know it late at the execution or in obscure cases
thread works cooperatively, forget about integrating nicely native code
Documentation is sparse or inexistent on lots of libs [comparing it to the apache libs for example]
No coding convention is really followed
No strict language spec : I find it really important because even with one it is often hard to standardize a language !
No type, no help -> for everything you have to jump into a paper doc or an API search just to see what this function is taking as parameter forget about the productivity of your ctrl-space in Eclipse
I18N is non existent and iconv horrible to use.
etc... I could go on but I think you get the point
I really went into ruby open minded and I am really disapointed : really, you try Ruby/Rails and it is a instant "WOW!" relayed by every journalist who just tried it
Guillaume.
I would start with Lua, Maybe. Then again, I just might not have enough experience with it to know where it falls short. (Anyone have the answer?). The reason being, is that it is very very simple and that is pretty much it. Not a whole bunch of crap. Then again I started with Javascript and Visual Basic, and those are both great places to begin. Comfortable development environments. With javascript, you can make an HTML form and a button that calls the function, and play around with the language. Very easy, and all you need is firefox. The info is all over the web (but web source is. The real point is, start simple. Many constructs in modern languages are there because of 60,000 line programs, not 100 line programs, and you don't need that getting in your way yet.
This Wiki Feeds You TV and Anime - vidwiki.org
I don't think that's all that true. I think it easy for people who themselves came to program through imperative and OO programming to think of those approaches as more "natural" than functional programming. But if someone's first exposure to programming includes functional programming from the outset, I don't think functional programming is any less natural than the other forms.
And I have a feeling a newbie programmer who learns Ruby first is going to end up and using constructs that combine OO and functional elements (passing closures to method calls on integer literals, for instance) rather than imperative mechanisms for basic tasks like looping, because, I can't imagine an newbie-focussed book not encouraging that. Sure, I mean, you could stubbornly try to do everything with while loops, but why?
PLEASE
Let's use MVC for our large sites for fuck's sake.
Thanks.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Because sometimes Ruby is too slow. :-( :-/
:-(
Both Perl and Ruby are really rad. And RAD. And they both operate on the ever-so-helpful principle of least surprise. Unlike PHP, or a lot of other languages.
If there was one thing I don't like about perl (and I can totally sympathize from a language beauty POV), it's that sigils represent interpretation intent, and do not describe the base object.
I.E.
$foo[bar] is a value in @foo not @foo[bar]. Which seems silly because the array slicing operator has list and value return forms ([5], vs. [3..5]) and that should dictate the interpretation. Other perl ops get to dictate return values... why the distinction?
And it's because Perl 5 is backwards compatible with Perl 4 which didn't have lexical namespaces, and so the sigils got ALL FUCKED UP during the transition and it makes Perl 5 look ugly.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
But Microsoft and 3rd party contributors to .NET will always skew the ecosystem around it to its own ends, even if it is an open standard. No one will care about ECMA-compliance, only the latest-version-of-.NET-on-the-latest-Windows-serve r compliance.
THIS THING CAN TURN ON A DIME, MACROSSZERO STYLE ALSO FUCK BETA, ~NYORON
Perl is great for sysadmin scripts (actually, though, so is Ruby) - what it's not great for is huge website projects (unless your a masochist - slashcode, i'm looking at you). The problem with Perl and PHP for large web projects is that even with decent project management, one bad programmer can make problems for the whole team a few months down the line after deployment. The thing I like about rails is that it forces the developer into good code-separation practices, which is a very Good Thing when you've got developers on your team with little formal training.
The secret to creativity is knowing how to hide your sources. - Albert Einstein
Are you adequate?
So why waste 40-60USD on a book that provides information that is freely available on the Internet? Is it really something that looking at free documentation and examples won't teach a reasonably intelligent programmer?
I agree with you that Perl is hard to maintain for websites of any reasonable size. But I still use Perl for websites because of how intuitive I find coding in it. (And Perl wasn't even my first language...)
Heh. Don't get me wrong, I love perl; particularly because of how intuitive it is (at least for me). What I find to be perl's biggest flaw is that while, yes, it is intuitive to many people the perl that I write is almost a different language from the perl that everybody else writes - which helps make it an intuitive language, but at the same time makes it hard as hell to read somebody else's perl code; which, in a production environment is simple unacceptable.
The secret to creativity is knowing how to hide your sources. - Albert Einstein
Ruby now runs on Blue Gene/L :)
http://www.ece.iastate.edu/~crb002/cnr.html
bash-2.04$
bash-2.04$yes "Don't you hate dialup connections?"| write USERNAME
Let me fix this sentence for you:
Wow. Sorry, I can't fix that one.
how to invest, a novice's guide
Why are you not following your team's coding standards?
how to invest, a novice's guide
They are really not that dissimilar, though the syntax are :) (Meta)-programming with templates in C++ and doing Haskell is remarkedly similar, though the syntax is not --- if you don't believe me, have a look at the boost::lambda source. Anyway, above I just meant that they are both advanced languages, as in powerful and difficult to master.
As to the rest of your comment, I think passing closures around will come naturally to most newbies of taught. The hard part of functional languages, using the lambda calculus to it's fullest extent, is not support in Ruby anyway.
Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
been following this development for a bit...huge agile fan if it matters.... http://studios.thoughtworks.com/mingle-project-int elligence/a-quick-tour
The rules of the game have changed in two important ways over the intervening years, though:
This isn't to say that hand-crafted assembly language no longer has a place. C and C++ are pretty low-level languages, and don't convey a lot of semantic information that the programmer has. Thus the compiler and optimiser are constrained in the assumptions they can safely make, with aliasing being the classic example problem. Even when they do "understand", their generic code generators may not give 100% optimal assembly in every single case. I work in high performance numerics, and I've seen my share of little functions that surprisingly weren't inlined (until, knowing that they aren't and thinking about it more deeply, you realise what assumption couldn't be made by the compiler and it's not surprising any more). I've certainly seen needlessly slow assembly language emitted in critical functions.
But the rules have changed, and the market for lovingly hand-crafted assembly is much smaller than it used to be. Software development is, in practice, all about "good enough". With today's rules, compilers are good enough a lot more often than they used to be. In contrast, writing better enough assembly language by hand is an increasingly difficult job, and the time spent doing so might well be better spend optimising some algorithm or data structure at a higher level, or filing a performance bug with your compiler vendor so they can fix their assembly language generation more generally.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
### Ruby is not terribly lisp like in any way.
Ruby is very much like Lisp in many aspects, of course not in all, especially not syntax, but that is actually the good thing about Ruby. It gives you almost all the power of Lisp, but with a syntax that is much easier to read. I mean macros in Lisp are cool, but the blocks in Ruby are just way more readable and more practical, not as powerful, but powerful enough.
http://www.youtube.com/watch?v=JMDcOViViNY
nah, I'm an old fart LISPer, haven't written any for 13 years. Ruby is more fun if very slightly less powerful. I've decided I like languages that are built to get shit done rather than tickle ivory tower fancies.