It was designed for programmer productivity with the idea that programming should be fun for programmers. It emphasizes the necessity for software to be understood by humans first and computers second. Ruby continues to gain popularity for its use in web application development.
The Ruby on Rails framework, built with the Ruby language by David Heinemeier Hansson, introduced many people to the joys of programming in Ruby. Ruby has a vibrant community that is supportive for beginners and enthusiastic about producing high-quality code.
In programming and computer science in general, there is a concept called abstraction. Abstraction ensures that as users, we're far removed from what's happening "under the hood". A simple example will help illustrate this concept. Think about the mobile phone you use everyday to communicate with your friends and loved ones. As a user, you only care about the basic functionalities the phone makes available to communicate. Stated differently, you're dealing with an interface provided by the manufacturer of the phone.
The phone technician, on the other hand, must repair the phone and is faced with a different level of abstraction. She's well-versed in how the different components interact with the various sub-systems of the phone. Further down, the software engineer is concerned with the Operating System and deals with yet another layer of abstraction. The above analysis is similar to what happens with computers. The user or client uses computers to listen to music, send emails, play games and more.
They interact with the applications that make these tasks possible without any knowledge of the low level details. Programmers are also offered a level of abstraction by making use of a programming language like Ruby, which is written in C, which translates to Assembly language, which translates to machine language to translate 0s and 1s into something the computer understands. That means, every programming language is based on other lower level layers of code that make it easy to use. Another level of abstraction is how Ruby programmers use the Ruby programming language to design and build higher level languages called Domain Specific Languages or DSL's like Rails and Rspec.
We do not necessarily need to know how these DSL's are implemented, but we know they exist and know how to use them. As a beginner, you'll have to be aware of these abstractions particularly in programming and computer science and how they simplify programming and make computers easy to use.
It's often confusing, for example, to read Rails or Rspec code without understanding Ruby because Rails and Rspec are DSLs operating at a higher level of abstraction. The goal of this book is to show you Ruby, so that when you come across higher level abstractions and DSLs, you can recognize it as just Ruby code. This book is written for the inexperienced or completely new programmer.
So that clinched it. I've always been a little intrigued by Ruby, mostly because of the absolutely gushing praise Steve Yegge had for the language way back in I've never forgotten this. For the most part, Ruby took Perl's string processing and Unix integration as-is, meaning the syntax is identical, and so right there, before anything else happens, you already have the Best of Perl.
And that's a great start, especially if you don't take the Rest of Perl. But then Matz took the best of list processing from Lisp, and the best of OO from Smalltalk and other languages, and the best of iterators from CLU, and pretty much the best of everything from everyone.
And he somehow made it all work together so well that you don't even notice that it has all that stuff. I learned Ruby faster than any other language, out of maybe 30 or 40 total; it took me about 3 days before I was more comfortable using Ruby than I was in Perl, after eight years of Perl hacking. It's so consistent that you start being able to guess how things will work, and you're right most of the time.
It's beautiful. And fun. And practical. Steve is one of those polyglot programmers I respect so much that I basically just take whatever his opinion is, provided it's not about something wacky like gun control or feminism or T'Pau, and accept it as fact. I apologize, Steve.
I'm sorry it took me 7 years to get around to Ruby. But maybe I was better off waiting a while anyway:. Ruby is a decent performer, but you really need to throw fast hardware at it for good performance. Yeah, I know, interpreted languages are what they are , and caching, database, network, blah blah blah. Still, we obtained the absolute fastest CPUs you could buy for the Discourse servers, 4. Not great. That's what I am used to. I do sometimes pine away for the bad old days of.
NET when we could build pages that serve in well under 50 milliseconds without thinking about it too hard. Interpreted languages aren't going to be able to reach those performance levels. But I can only imagine how rough Ruby performance had to be back in the dark ages of when CPUs and servers were five times slower than they are today! I'm so very glad that I am hitting Ruby now, with the strong wind of many solid years of Moore's law at our backs.
Ruby is maturing up nicely in the 2. So, yes, the downside is that Ruby is slow. But the upside is there is a lot of low hanging performance fruit in Ruby-land. From a future performance perspective, Ruby is nothing but upside. Ruby isn't cool any more. Yeah, you heard me. It's not cool to write Ruby code any more. All the cool people moved on to slinging Scala and Node. Our project isn't cool, it's just a bunch of boring old Ruby code.
It is written for experienced programmers who are new to Ruby, and for current Ruby programmers who want to challenge their understanding and increase their mastery of the language. Show and hide more. Table of contents Product information. Boolean flip-flops Conditional:? Operator Statement Modifiers Nonoperators 5. ISBN: You might also like book Designing Data-Intensive Applications by Martin Kleppmann Data is at the center of many challenges in system design today. Difficult issues need to … book Fundamentals of Software Architecture by Mark Richards, Neal Ford Salary surveys worldwide regularly place software architect in the top 10 best jobs, yet no real … book Software Engineering at Google by Titus Winters, Tom Manshreck, Hyrum Wright Today, software engineers need to know not only how to program effectively but also how to … book 40 Algorithms Every Programmer Should Know by Imran Ahmad Learn algorithms for solving classic computer science problems with this concise guide covering everything from fundamental ….
0コメント