Python and Ruby are both excellent languages, all of which emphasize people-oriented and have their own merits. However, I feel Ruby seems more friendly. Ruby draws on the advantages of smalltalk, Python, and Perl.
We recommend that you learn Ruby resources:
English
Clear and short free ebook, I think it is
When learning a new programming language, we must be clear about a few questions:What is the type model of the language?Strongly typed / weakly typed, static type / dynamic typeThe type model changes the way the problem is handled and controls how the language runsWhat is the programming paradigm of language?Object-oriented, functional, procedural, etc.How to interact with the language?Compiling, interpretingWhat is the judgment structure of language (decision construct) and the core data struct
The founder of Ruby talked about the ruby blocks and closure structure at on. I want to repost on Qiu Haifeng's translation network (0) font size: T | T
This conversation is translated from the third part of the interview with Matz on the artima.com website to help you understand the blocks and closure structures in ruby.
AD:
This interview is an interview with
JRuby (Java platform), IronRuby (. NET platform). Ruby's author began writing Ruby on February 24, 1993, until December 1995, when it was officially released in FJ (News Group). Because Perl is pronounced the same as the June Birthstone Pearl (Pearl), Ruby is named after the Birthstone Ruby (Ruby) of July.Download Rub
Explain the methods in Ruby and the Ruby Methods
The Ruby method is very similar to the functions in other programming languages. The Ruby method is used to bind one or more repeated statements in a unit.
The method name should start with a lowercase letter. If the name of a method starts with an uppercase letter,
Analysis of Ruby relay and message-related knowledge, analysis of ruby
Inheritance allows you to create a class as the refinement and specialization of another class ). For example, in our automatic karaoke system, the concept of "Song" is encapsulated in the Song category. Then, as the market grows, we need to provide karaoke support. A karaoke song is no different from other songs (it just does not have a
Introduction to file operations in Ruby and file operations in ruby
Ruby provides a complete set of I/O-related kernel modules. All I/O methods come from IO classes.
Class IO provides all the basic methods, such as read, write, gets, puts, readline, getc, and printf.
This chapter covers all basic I/O functions available in Ru
Ruby syntax notes, ruby syntax
Accept user input
first_name = gets.chomp
Uppercase letters
first_name.capitalize!
Uppercase letters
first_name.upcase!
Lower letters
first_name.downcase!
Multi-row output
Print
Note
# I am a comment
Variable acquisition
#{first_name}
Variable
Global variable $
Class variable @@
Method variable @
Local variables are lowercase letters or _
If/else
if a
Class
class
Basic instructions for using regular expressions in Ruby, ruby Regular Expressions
Built-in support for regular expressions is usually limited to scripting languages such as Ruby, Perl, and awk. This is a shame: although regular expressions are mysterious, they are a powerful text processing tool. It is quite different to support it through built-in instead of li
A summary of variable learning in Ruby and a summary of Ruby variable learning
Variables in Ruby are in several forms, including local variables, instance variables, class variables, and global variables. For Beginners, they are often easy to mix up, especially java-like, it is still a headache to understand. After careful identification and learning, we will sum
Many times we will find that the real production environment is not a lot of external network, only intranet environment, this time we need to install Ruby, we can not provide the Yum command to install online, this time we need to download the installation package for offline installation. This article is mainly about if you
Introduction: Ruby on Rails is just one aspect of making Ruby very powerful, just as EJB is part of the Java Enterprise platform. Andrew Glover reveals what Java developers can do with Ruby.
Before I begin this article, I need to clarify a few things. First, it's not an article about Ruby on Rails. If you want to lear
The example explains how Ruby uses the decorator mode in the design mode, and the ruby design mode.
OverviewIf you are engaged in object-oriented development, adding behavior to a class or object and using inheritance mechanisms, this is a basic feature of all object-oriented languages. If an existing class lacks some methods, or you need to add more functions (CHARM) to the method ), you may just inherit t
Example of how to optimize Ruby code to speed up the program running, ruby speed
This article mainly introduces how to increase ruby gem contracts. ruby speed by 10 times.
Contracts. ruby is used in my project to add code contracts to Ru
How to learn ruby at high speed ? The quickest way to learn a language.variables, constants, variable types, operators.Logical statements such as if, else, switch, for, foreach, does while, break, and so on. What languages do you want to learn? What are the commands that are similar to these commands? Know how to use it. Then, assuming object-oriented, you need to understand the object's operation.There is no library of functions. The general language
Ruby uses the simple factory mode and factory method mode in the design mode, and the ruby Design Mode
I have read the ruby design pattern before, But I gradually forget it. Now I bought a big talk design pattern, which doesn't look so boring. By the way, I implemented the code in ruby.
Simple factory mode:
#-*-Encodin
It's pretty rare I recommend new blogs to follow on Ruby inside. Not because I don't like them-I link to their posts all the time!-But because it's hard to tell if a new blog is going to keep going and be worth your while. Well, the Ruby community has a new blog in its midst that's proving to be a must-read-Ruby Best Practices.It's a must-subscribe (RSS feed) fo
What is Ruby FPDF?
Ruby FPDF is a Ruby portOlivier Plathey's excellent PDF generator,FPDF.FPDF is written in PHP, and as such can only be used from PHP scripts.Ruby FPDF, as the name suggests, is written in Ruby and can be usedFrom Ruby scripts.
Application instance analysis of appearance mode in Ruby Design Mode Programming, and ruby Design Mode
What is the appearance mode?
The appearance mode provides unified interfaces for a group of different interfaces in the subsystem. The upper-layer interfaces are defined. by reducing complexity and hiding the communication and dependency between subsystems, the subsystems are easier to use.
For example, su
Tutorial on the basic usage of Regular Expressions in Ruby programs, ruby Regular Expressions
Most of Ruby's built-in types are similar to other programming languages. Mainly include strings, integers, floats, and arrays. However, only script languages such as Ruby, Perl, and awk provide support for built-in expression types. Although the regular expression is re
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.