Ruby: Most Popular Articles
These articles are the most popular over the last month.
Command-line Arguments
Use command-line arguments to pass parameters to your Ruby scripts from the command line.
Use command-line arguments to pass parameters to your Ruby scripts from the command line.
The 'require' Method
The 'require' method is the reusable code mechanism in Ruby. It allows you to import other source files into your programs.
The 'require' method is the reusable code mechanism in Ruby. It allows you to import other source files into your programs.
Environment Variables
Using environment variables in Ruby.
Using environment variables in Ruby.
Comments
Use comments to annotate your Ruby code.
Use comments to annotate your Ruby code.
Install Ruby on Windows
How to install the Ruby interpreter on the Windows operating system.
How to install the Ruby interpreter on the Windows operating system.
The Twitter API
The Twitter API (Application Programming Interface) in Ruby on Rails is about as simple as you can get. Twitter is a RESTful Rails application.
The Twitter API (Application Programming Interface) in Ruby on Rails is about as simple as you can get. Twitter is a RESTful Rails application.
Install Ruby on OS X
How to install Ruby on Apple OS X
How to install Ruby on Apple OS X
Using the Command Line
Learn how to use the command line interface on Windows, Linux and OS X to run rb files and use the interactive Ruby program.
Learn how to use the command line interface on Windows, Linux and OS X to run rb files and use the interactive Ruby program.
Adding RESTful Authentication
Part three of the Ruby on Rails blog tutorial uses the RESTful authentication plugin to make sure only authorized users can make posts to your blog.
Part three of the Ruby on Rails blog tutorial uses the RESTful authentication plugin to make sure only authorized users can make posts to your blog.
Getting Started With Ruby
How to use the command line interface on Windows, Linux and OS X to run Ruby scripts and use the interactive Ruby program.
How to use the command line interface on Windows, Linux and OS X to run Ruby scripts and use the interactive Ruby program.
Installing Ruby
How to install the Ruby interpreter on Windows, Linux and OS X.
How to install the Ruby interpreter on Windows, Linux and OS X.
Install Ruby on Linux
How to install Ruby on the Linux operating system.
How to install Ruby on the Linux operating system.
Parse Command Line Options
Ruby comes equipped with a powerful and flexible tool to parse command-line options, OptionParser. The class is an alternative to GetoptLong for analyzing command line options.
Ruby comes equipped with a powerful and flexible tool to parse command-line options, OptionParser. The class is an alternative to GetoptLong for analyzing command line options.
Special Characters
Aside from the basic regular expression operators such as groupings and quantifiers, there are some other special characters and escape sequences (backslash followed by a character) that can help you out when you're working with Ruby.
Aside from the basic regular expression operators such as groupings and quantifiers, there are some other special characters and escape sequences (backslash followed by a character) that can help you out when you're working with Ruby.
Ruby Gems
Learn to search the Ruby Gems repository to find gems to add and install to your library.
Learn to search the Ruby Gems repository to find gems to add and install to your library.
What is Ruby?
What type of language is the Ruby programming language?
What type of language is the Ruby programming language?
Option Hashes
Using hashes to simulate optional named parameters in methods.
Using hashes to simulate optional named parameters in methods.
While, Until, Each and Time
Loops, including while and include loops, are one of the most commonly used constructs in computer programs.
Loops, including while and include loops, are one of the most commonly used constructs in computer programs.
The logger Library
How to use the logger library to create and write to log files in Ruby.
How to use the logger library to create and write to log files in Ruby.
Parsing Twitter XML
Learn how to parse the Twitter API's XML easily using Hpricot.
Learn how to parse the Twitter API's XML easily using Hpricot.
Learn to Use Regex in Ruby
What is a regular expression and how do you use them in Ruby?
What is a regular expression and how do you use them in Ruby?
Tk
Directions of how to install the Tk GUI and its Ruby bindings on Windows, Linux and Mac OS X.
Directions of how to install the Tk GUI and its Ruby bindings on Windows, Linux and Mac OS X.
Builder RubyGem
The Builder library is a Ruby Gem that uses a meta-language to generate HTML, XML or CSS markup.
The Builder library is a Ruby Gem that uses a meta-language to generate HTML, XML or CSS markup.
Arrays
This article explains and teaches how to use a arrays as a way to store multiple variables in one data structure.
This article explains and teaches how to use a arrays as a way to store multiple variables in one data structure.
Twittering in Ruby
Twitter provides programmers with an excellent API, which is why so many Twitter interfaces exist for tweeting, following updates, following friends and thread-sorting. Writing Twitter clients in Ruby is a breeze!
Twitter provides programmers with an excellent API, which is why so many Twitter interfaces exist for tweeting, following updates, following friends and thread-sorting. Writing Twitter clients in Ruby is a breeze!
Installing Rubygame on Windows
A visual tutorial with screenshots showing how to install the Rubygame library on Windows, including installing all needed DLL files.
A visual tutorial with screenshots showing how to install the Rubygame library on Windows, including installing all needed DLL files.
Starting the Blog
Part one of the Ruby on Rails blog tutorial focuses on creating a Rails project and scaffolding a basic blog post data structure.
Part one of the Ruby on Rails blog tutorial focuses on creating a Rails project and scaffolding a basic blog post data structure.
Strings
Using and manipulating strings and substrings in Ruby.
Using and manipulating strings and substrings in Ruby.
Exceptions
Exceptions are used to handle things the unexpected things that might go wrong with your Ruby code. This article addresses what Exceptions are and how they can be used.
Exceptions are used to handle things the unexpected things that might go wrong with your Ruby code. This article addresses what Exceptions are and how they can be used.
String Substitution in Ruby
Splitting a string is only one way to manipulate string data. You can also make substitutions to replace one part of a string with another string. For instance, in an example string "foo,bar,baz", replacing "foo" with "boo" in "foo,bar,baz" would yield "boo,bar,baz". You can do this and many more things using the sub and gsub method in the String class.
Splitting a string is only one way to manipulate string data. You can also make substitutions to replace one part of a string with another string. For instance, in an example string "foo,bar,baz", replacing "foo" with "boo" in "foo,bar,baz" would yield "boo,bar,baz". You can do this and many more things using the sub and gsub method in the String class.
Spotlight on Gems: ShortURL
Shortening URLs for Twitter is much easier with the one-line interface provided by ShortURL.
Shortening URLs for Twitter is much easier with the one-line interface provided by ShortURL.
nokogiri
Up until now, Hpricot HTML parser for Ruby has been the fast an easy standard. The Nokogiri Ruby gem can parse not only HTML, but also works with XML, CSS and XPath selectors.
Up until now, Hpricot HTML parser for Ruby has been the fast an easy standard. The Nokogiri Ruby gem can parse not only HTML, but also works with XML, CSS and XPath selectors.
Comments on the Ruby Blog
Part four of the Ruby on Rails blog tutorial shows you how to create a comments table to allow users to comment on your blog posts.
Part four of the Ruby on Rails blog tutorial shows you how to create a comments table to allow users to comment on your blog posts.
Interact with SSH in Ruby
Net::SSH is a way for Ruby to interact with SSH (Secure Shell) protocol. It relies on the OpenSSL library for encryption.
Net::SSH is a way for Ruby to interact with SSH (Secure Shell) protocol. It relies on the OpenSSL library for encryption.
OptionParser
Using OptionParser to parse command line options is a preferable alternative to GetoptLong or looking through ARGV manually. But how do you use it?
Using OptionParser to parse command line options is a preferable alternative to GetoptLong or looking through ARGV manually. But how do you use it?
Blocks
How to use blocks in Ruby.
How to use blocks in Ruby.
Regex: Grouping
The grouping operators, including the parentheses operator, are some of the most powerful and frequently used operators in the Ruby regex syntax.
The grouping operators, including the parentheses operator, are some of the most powerful and frequently used operators in the Ruby regex syntax.
How to Use the Gem Command
The gem command is one of the most used Ruby-related commands. This article shows 25 Gem Commands and their functions.
The gem command is one of the most used Ruby-related commands. This article shows 25 Gem Commands and their functions.
The Twitter RubyGem
Using the Twitter RubyGem, making API requests to Twitter is even easier than using the twitter method.
Using the Twitter RubyGem, making API requests to Twitter is even easier than using the twitter method.
Hashes
This article explains and teaches how to use a associative arrays (hashes) as a way to store multiple variables in one data structure.
This article explains and teaches how to use a associative arrays (hashes) as a way to store multiple variables in one data structure.
Ruby's Bignum Library
Computers are quite good at math or, more precisely, at arithmetic. In fact, technically, that's all a computer can do. However, the numbers computers typically work with are quite limited. On a typical computer, an integer number is represented by a 32-bit binary number. A 32-bit integer can only represent the numbers from about negative 2 billion to positive 2 billion.
Computers are quite good at math or, more precisely, at arithmetic. In fact, technically, that's all a computer can do. However, the numbers computers typically work with are quite limited. On a typical computer, an integer number is represented by a 32-bit binary number. A 32-bit integer can only represent the numbers from about negative 2 billion to positive 2 billion.
Send Email with Ruby
How to send email with Ruby on Rails using SMTP.
How to send email with Ruby on Rails using SMTP.
5 Must Know Features of Ruby
If you're going to program in the Ruby language, there are some basic features you absolutely must know. Here are the Top 5.
If you're going to program in the Ruby language, there are some basic features you absolutely must know. Here are the Top 5.
Running the Ruby Profiler
Running the Ruby profiler to determine which methods are most expensive and which need to be optimized.
Running the Ruby profiler to determine which methods are most expensive and which need to be optimized.
Using the 'split' Method
String manipulation using the split method in Ruby. Split strings into a list of substrings.
String manipulation using the split method in Ruby. Split strings into a list of substrings.
A Practical Twitter Script
Since the Twitter API makes it easy to do anything you can do on the website, writing a Ruby script to automatically follow followers is very simple.
Since the Twitter API makes it easy to do anything you can do on the website, writing a Ruby script to automatically follow followers is very simple.
Defining Cloud Computing
What is cloud computing? Interviews with industry experts help us define cloud computing, software as service, platform as service and more.
What is cloud computing? Interviews with industry experts help us define cloud computing, software as service, platform as service and more.
Beginning Ruby
A review of the book Beginning Ruby: From Novice to Professional by Peter Cooper from Apress.
A review of the book Beginning Ruby: From Novice to Professional by Peter Cooper from Apress.
Creating the "Blog Look"
Part two of the Ruby on Rails blog tutorial focuses on using the Yahoo! UI library to help make your blog look like a blog.
Part two of the Ruby on Rails blog tutorial focuses on using the Yahoo! UI library to help make your blog look like a blog.
Using rails.vim
Editing Rails projects in Vim effectively.
Editing Rails projects in Vim effectively.
exec and exec!
Running programs with Net::SSH is simple enough. The Session object gives you two convenient methods with which to accomplish this task.
Running programs with Net::SSH is simple enough. The Session object gives you two convenient methods with which to accomplish this task.
GeoIP
Using GeoIP databases to correlate IP addresses and physical locations using the GeoIP gem.
Using GeoIP databases to correlate IP addresses and physical locations using the GeoIP gem.
Variables
What are Variables and how to use Variables in Ruby.
What are Variables and how to use Variables in Ruby.
Hello WxRuby World
Want to learn how to use WxRuby? There's no better way to get started than to write a "Hello World" program.
Want to learn how to use WxRuby? There's no better way to get started than to write a "Hello World" program.
Email Addresses
Using regular expression to tell if an email address is valid or not.
Using regular expression to tell if an email address is valid or not.
Spotlight on Gems: TMail
The TMail gem provides an interface for manipulating and parsing email messages.
The TMail gem provides an interface for manipulating and parsing email messages.
Package Manager
A package manager is software on a Linux system that manages the other software installed on the system.
A package manager is software on a Linux system that manages the other software installed on the system.
Displaying Images With Shoes
Displaying images using the Shoes GUI toolkit is as simple as using the image method. This tutorial walks you through adding images in Shoes.
Displaying images using the Shoes GUI toolkit is as simple as using the image method. This tutorial walks you through adding images in Shoes.
Shoes' 5 Dialog Methods
We've all had to respond to that ubiquitous question: Are You Sure You Want to Exit? Ever wondered what was behind creating them? Shoes gives you 5 different dialog methods to choose from.
We've all had to respond to that ubiquitous question: Are You Sure You Want to Exit? Ever wondered what was behind creating them? Shoes gives you 5 different dialog methods to choose from.
Aliasing
Aliasing is a powerful Ruby feature that allows more than one method to be referred to by multiple names. This can be used to give a programmer more expressive options or to create copies of a method, allowing you to change the behavior of a class.
Aliasing is a powerful Ruby feature that allows more than one method to be referred to by multiple names. This can be used to give a programmer more expressive options or to create copies of a method, allowing you to change the behavior of a class.
What is Ruby on Rails?
What is the Ruby on Rails web framework?
What is the Ruby on Rails web framework?
Installing Ruby on Windows
A visual walkthrough on installing Ruby on Windows.
A visual walkthrough on installing Ruby on Windows.
Input and Output
Input and output methods are often overlooked by many Ruby programmers. How often have you used the <b>gets</b> and <b>puts</b> methods without giving them a second glance? Learn all the features of these methods to better put them to use in your code.
Input and output methods are often overlooked by many Ruby programmers. How often have you used the <b>gets</b> and <b>puts</b> methods without giving them a second glance? Learn all the features of these methods to better put them to use in your code.
WxWidgets
WxWidgets is a C++ GUI toolkit that can be used to write GUI (graphical user interface)applications. And WxRuby? Well, it's a Ruby binding and wrapper for the WxWidgets C++ classes.
WxWidgets is a C++ GUI toolkit that can be used to write GUI (graphical user interface)applications. And WxRuby? Well, it's a Ruby binding and wrapper for the WxWidgets C++ classes.
Edit Boxes
A quick tutorial taking you through using edit_line and edit_box elements in Shoes to provide text editing.
A quick tutorial taking you through using edit_line and edit_box elements in Shoes to provide text editing.
Following Updates on Twitter
Learn how to follow Twitter updates using Twitter's openly-provided Ruby API.
Learn how to follow Twitter updates using Twitter's openly-provided Ruby API.
Distributed Ruby
Distributed Ruby, or DRb, is a library that allows you to communicate with remote Ruby objects and programs, using TCP/IP network protocols.
Distributed Ruby, or DRb, is a library that allows you to communicate with remote Ruby objects and programs, using TCP/IP network protocols.
Using Variables
Learn how to use variables in Ruby, assign them information using the assignment operator and pass to a variable using the "puts" function.
Learn how to use variables in Ruby, assign them information using the assignment operator and pass to a variable using the "puts" function.
Ruby - QuickTips
An index of QuickTips for the Ruby guide site.
An index of QuickTips for the Ruby guide site.
The Main Loop
The main loop is the heartbeat of any game, and is the first thing you need to learn to start making your own games.
The main loop is the heartbeat of any game, and is the first thing you need to learn to start making your own games.
Installing wxRuby
wxRuby, a GUI toolkit for Ruby which interfaces with wxWidgets, can be installed on Ubuntu Linux with relative ease.
wxRuby, a GUI toolkit for Ruby which interfaces with wxWidgets, can be installed on Ubuntu Linux with relative ease.
Update from an RSS Feed
This Ruby script to update Twitter from an RSS feed is what's often referred to as a "mashup." Mashups interface one protocol to another, or one website to another. This mashup takes information from an RSS feed and posts it as updates to Twitter.
This Ruby script to update Twitter from an RSS feed is what's often referred to as a "mashup." Mashups interface one protocol to another, or one website to another. This mashup takes information from an RSS feed and posts it as updates to Twitter.
Create Menus in WxRuby
Menus are relatively easy to create and use in wxRuby,you only need to create a Wx::MenuBar object to hold all of the menus, and a number of Wx::Menu objects.
Menus are relatively easy to create and use in wxRuby,you only need to create a Wx::MenuBar object to hold all of the menus, and a number of Wx::Menu objects.
Test Suites
Grouping your test cases into test suites.
Grouping your test cases into test suites.
Rounding Down
Is there a nice way to get the floating-point value of a number if it's floating-point, but the integer value if it's just X.0?
Is there a nice way to get the floating-point value of a number if it's floating-point, but the integer value if it's just X.0?
4Ways
A comparison of Ruby to other programming languages, including Perl, Java, Python and PHP.
A comparison of Ruby to other programming languages, including Perl, Java, Python and PHP.
Conditionals
How to use conditional statements in Ruby
How to use conditional statements in Ruby
Require
A statement that will include the statements from another file in the current file.
A statement that will include the statements from another file in the current file.
External Return Value
Ruby makes it easy to run external programs and capture their output. Using the built-in "backtick" operator is as easy as running these programs from the command line. However, it's not obvious how to capture the return value of these programs.
Ruby makes it easy to run external programs and capture their output. Using the built-in "backtick" operator is as easy as running these programs from the command line. However, it's not obvious how to capture the return value of these programs.
Using the Test::Unit Library
The Test::Unit library comes with a variety of assertions to make writing tests much easier. Learn what the assertions are for Test-Driven Development and when to use them.
The Test::Unit library comes with a variety of assertions to make writing tests much easier. Learn what the assertions are for Test-Driven Development and when to use them.
Chronic
Use the Chronic RubyGem as a language parser. It will create representations of date and time phrases as Ruby variables.
Use the Chronic RubyGem as a language parser. It will create representations of date and time phrases as Ruby variables.
Command Line Options
There are two forms of command-line options: long form and short form. Both long and short form options take arguments, each a little differently.
There are two forms of command-line options: long form and short form. Both long and short form options take arguments, each a little differently.
Transfer Files with Net::SCP
SSH is not just for [link url=/od/ssh/a/runprogramsnetssh.htm]running commands[/link], it's a general conduit for encrypted communications between two hosts. One common use for SSH is to transfer files using the SCP protocol over SSH. You can use SCP in your Ruby programs with the Net::SCP library, which is a supplement to Net::SSH.
SSH is not just for [link url=/od/ssh/a/runprogramsnetssh.htm]running commands[/link], it's a general conduit for encrypted communications between two hosts. One common use for SSH is to transfer files using the SCP protocol over SSH. You can use SCP in your Ruby programs with the Net::SCP library, which is a supplement to Net::SSH.
Lookahead and Back-references
Using lookahead and back-references to refer to other parts of the regular expression text.
Using lookahead and back-references to refer to other parts of the regular expression text.
Checking Your Email with Ruby
How to check POP3 email accounts in Ruby.
How to check POP3 email accounts in Ruby.
Question Mark Operator
Among the new features in release of Ruby 1.9.1 is what the question mark operator will return. Learn what happens now in Ruby 1.9.1.
Among the new features in release of Ruby 1.9.1 is what the question mark operator will return. Learn what happens now in Ruby 1.9.1.
Blocks in Ruby 1.9.1
The release of Ruby 1.9.1 brings new features to be learned,among them are the changes in block variable scope. Learn the new syntax for block variable scope introduced in Ruby 1.9.1.
The release of Ruby 1.9.1 brings new features to be learned,among them are the changes in block variable scope. Learn the new syntax for block variable scope introduced in Ruby 1.9.1.
Regular Expression
Regular expression is a specialized computer language for matching strings of text.
Regular expression is a specialized computer language for matching strings of text.
Regular Expression Options
Using options to change the behavior of regular expressions.
Using options to change the behavior of regular expressions.
Method
A subroutine or function associated with a class or object.
A subroutine or function associated with a class or object.
Test Unit Terminology
There's a lot of technical terminology surrounding Test Driven Development. Here's a glossary of common terms used in TDD (and specifically in Test::Unit) that you should know.
There's a lot of technical terminology surrounding Test Driven Development. Here's a glossary of common terms used in TDD (and specifically in Test::Unit) that you should know.
Debugging Ruby
Debugging Ruby programs using the Ruby debugger.
Debugging Ruby programs using the Ruby debugger.
Using Buttons in Shoes
In a Shoes application, the button is one of the simplest elements. This tutorial will teach you how to make the most of the your GUI toolkit in Ruby.
In a Shoes application, the button is one of the simplest elements. This tutorial will teach you how to make the most of the your GUI toolkit in Ruby.
3 Ruby Scripts for Twitter
Exploring and knowing the Twitter API is fine, but what do you do from there? Here are 3 practical scripts to help you follow followers on Twitter, update your Twitter account via an RSS feed and to be notified of your friend's new Tweets as they come in.
Exploring and knowing the Twitter API is fine, but what do you do from there? Here are 3 practical scripts to help you follow followers on Twitter, update your Twitter account via an RSS feed and to be notified of your friend's new Tweets as they come in.
Exception Classes
Knowing how to make quick exceptions to catch and tell the difference between several conditions is a Ruby best practice you can't afford not to know.
Knowing how to make quick exceptions to catch and tell the difference between several conditions is a Ruby best practice you can't afford not to know.
Associative Array
A named collection of key/value pairs.
A named collection of key/value pairs.
DRY
You'll often hear DRY used as an adjective, such as "Is this code DRY enough?" It means Don't Repeat Yourself and seeks to avoid duplication of efforts in your code.
You'll often hear DRY used as an adjective, such as "Is this code DRY enough?" It means Don't Repeat Yourself and seeks to avoid duplication of efforts in your code.
Ruby Regexen
Regular Expressions provide a way search for patterns, strings or specific characters in your code. Learn how to start creating regular expressions in Ruby.
Regular Expressions provide a way search for patterns, strings or specific characters in your code. Learn how to start creating regular expressions in Ruby.
acts_as_authenticated
acts_as_authenticated is plugin for Ruby on Rails to add authenticated users to your application.
acts_as_authenticated is plugin for Ruby on Rails to add authenticated users to your application.
Using WxRuby Layout Managers
Arranging widgets in your WxRuby applications can be accomplished more easily by using the layout managers, known as sizers.
Arranging widgets in your WxRuby applications can be accomplished more easily by using the layout managers, known as sizers.
Ruby vs. Java
What features do Ruby and the Java programming language share? How are they alike and how are they different?
What features do Ruby and the Java programming language share? How are they alike and how are they different?
Regular Expression Syntax
The basic syntactical elements of regular expressions in Ruby.
The basic syntactical elements of regular expressions in Ruby.
Newline
A character or sequence of characters used to signify to a terminal or typesetting program that a line has ended and a new line is beginning.
A character or sequence of characters used to signify to a terminal or typesetting program that a line has ended and a new line is beginning.
An Introduction to Shoes
This tutorial is a introductory look at the Shoes GUI toolkit for Ruby. You'll find it is easy to learn, making it a good option for beginning programmers to make Shoes online applications.
This tutorial is a introductory look at the Shoes GUI toolkit for Ruby. You'll find it is easy to learn, making it a good option for beginning programmers to make Shoes online applications.
Installing NetBeans
The NetBeans IDE created by Sun Microsystems is often associated with Java development. However, in the past few years, Sun has slowly been adding support for more languages to NetBeans. Ruby (and more specifically, JRuby) is one of those languages.
The NetBeans IDE created by Sun Microsystems is often associated with Java development. However, in the past few years, Sun has slowly been adding support for more languages to NetBeans. Ruby (and more specifically, JRuby) is one of those languages.
RedCloth
RedCloth is an easy to use markup language.
RedCloth is an easy to use markup language.
TDD
You may have heard of Test-Driven Development, but what does it really mean? Learn the reasons for using TDD and the features of it.
You may have heard of Test-Driven Development, but what does it really mean? Learn the reasons for using TDD and the features of it.
Installation Instructions
Instructions for installing Ruby on Windows, Mac OS X and Linux as well as instructions for installing a few Ruby-related extras.
Instructions for installing Ruby on Windows, Mac OS X and Linux as well as instructions for installing a few Ruby-related extras.
Ruby vs. Python
How do Ruby and Python compare in terms of features, form and function?
How do Ruby and Python compare in terms of features, form and function?
protect_from_forgery
Knowing what vulnerabilities exist in your Ruby code is only half the battle. You also need to know how to counteract them. Begin by enabling forgery protection.
Knowing what vulnerabilities exist in your Ruby code is only half the battle. You also need to know how to counteract them. Begin by enabling forgery protection.
Using Migrations
Using migrations to manage your Ruby on Rails application databases.
Using migrations to manage your Ruby on Rails application databases.
Installing Ruby 1.9.1 on Linux
Install Ruby 1.9.1 on your Linux machine alongside your current Ruby 1.8.x distribution to upgrade it. You'll have to compile the code from source, as shown in this tutorial.
Install Ruby 1.9.1 on your Linux machine alongside your current Ruby 1.8.x distribution to upgrade it. You'll have to compile the code from source, as shown in this tutorial.
Unit Tests
Learn the basics of writing and running unit tests for test driven development in Rails.
Learn the basics of writing and running unit tests for test driven development in Rails.
Making Nameless Methods in Rub
Among the new features in release of Ruby 1.9.1 is the Lambda operator, a shortcut used to make nameless methods. Learn how to use this feature introduced in Ruby 1.9.1.
Among the new features in release of Ruby 1.9.1 is the Lambda operator, a shortcut used to make nameless methods. Learn how to use this feature introduced in Ruby 1.9.1.
Twitter With Ruby
Now that you have a handle on the Twitter API and parsing the data returned by Twitter, it's time to start tweeting!
Now that you have a handle on the Twitter API and parsing the data returned by Twitter, it's time to start tweeting!
Top 5 New Features in Ruby 1.9
The 5 most interesting or useful features in the new Ruby 1.9.1 release.
The 5 most interesting or useful features in the new Ruby 1.9.1 release.
Try Ruby!
You can learn Ruby for free with this online tutorial, Try Ruby! A quick profile of why the lucky stiff's in-your-browser Ruby lessons for beginners.
You can learn Ruby for free with this online tutorial, Try Ruby! A quick profile of why the lucky stiff's in-your-browser Ruby lessons for beginners.
Handling Input
Now that we have the player sprite loaded and displayed, and the player itself is a class, it's time to make it move. There are two ways to handle input: handling the events or getting the keyboard state. In this article, only events will be discussed.
Now that we have the player sprite loaded and displayed, and the player itself is a class, it's time to make it move. There are two ways to handle input: handling the events or getting the keyboard state. In this article, only events will be discussed.
A Benchmarking Experiment
Benchmarking measures the time it takes to execute code and compares it to other code that accomplishes the same task. This is useful to see which is faster, and gives you the opportunity to use the faster code in your program.
Benchmarking measures the time it takes to execute code and compares it to other code that accomplishes the same task. This is useful to see which is faster, and gives you the opportunity to use the faster code in your program.
Text and Paragraphs
Since the Shoes GUI is so heavily inspired by the World Wide Web and HTML, it provides a good selection of elements with which you can display text. Here's a tutorial showing you how to use those elements.
Since the Shoes GUI is so heavily inspired by the World Wide Web and HTML, it provides a good selection of elements with which you can display text. Here's a tutorial showing you how to use those elements.
CSRF Without XSS
CSRF attacks are similar in nature to Cross-Site Scripting (XSS) attacks and can occur in conjunction with an XSS attacks, but they don't always go hand-in-hand and differ in nature. While XSS attacks rely on HTML code injected into the target site, a CSRF attack may also be initiated from a second site.
CSRF attacks are similar in nature to Cross-Site Scripting (XSS) attacks and can occur in conjunction with an XSS attacks, but they don't always go hand-in-hand and differ in nature. While XSS attacks rely on HTML code injected into the target site, a CSRF attack may also be initiated from a second site.
NetBeans Tour
When switching to a new IDE, program or environment, there's always an awkward phase during which you just don't know where to find anything. I'd been using the command prompt to run Rails commands for quite a while. However, you just can't do that with Netbeans.
When switching to a new IDE, program or environment, there's always an awkward phase during which you just don't know where to find anything. I'd been using the command prompt to run Rails commands for quite a while. However, you just can't do that with Netbeans.
Using the Jabber Protocol
Be notified of Twitter updates by IM, using this Ruby script. It's a pain to switch to a Web browser every you want to check your Twitter account. This script solves that by sending you an instant message (IM) using the Jabber protocol when there's something new to see on Twitter.
Be notified of Twitter updates by IM, using this Ruby script. It's a pain to switch to a Web browser every you want to check your Twitter account. This script solves that by sending you an instant message (IM) using the Jabber protocol when there's something new to see on Twitter.
Loading and Displaying Images
Loading images from files and displaying them om the screen is the one of the most basic things you can do in game programming. Luckily, Rubygame makes this really simple.
Loading images from files and displaying them om the screen is the one of the most basic things you can do in game programming. Luckily, Rubygame makes this really simple.
Named Regexp Groups
Ruby 1.9 introduces the concept of a named capture group. These named groups can be defined at the beginning of a regexp statement using a trick that tells for the regexp engine to look for exactly 0 instances of the group. Later, the group can be recalled using the \g element, followed by the name of the group. You can think of named capture groups as subroutines inside of a regular expression.
Ruby 1.9 introduces the concept of a named capture group. These named groups can be defined at the beginning of a regexp statement using a trick that tells for the regexp engine to look for exactly 0 instances of the group. Later, the group can be recalled using the \g element, followed by the name of the group. You can think of named capture groups as subroutines inside of a regular expression.
Cloud Computing
What is cloud computing? We asked Dave Vandervort of Xerox Innovation Group to help us answer that question and more.
What is cloud computing? We asked Dave Vandervort of Xerox Innovation Group to help us answer that question and more.
Stacks and Flows
A short tutorial on using the Shoes layout manager, using stacks and flows. To effectively use any GUI toolkit, you have to understand its layout manager (or geometry manager). In Qt, you have HBoxes and VBoxes, in Tk you have the Packer and in Shoes you have stacks and flows.
A short tutorial on using the Shoes layout manager, using stacks and flows. To effectively use any GUI toolkit, you have to understand its layout manager (or geometry manager). In Qt, you have HBoxes and VBoxes, in Tk you have the Packer and in Shoes you have stacks and flows.
Tk Widgets
How to use some of the most basic Tk widgets.
How to use some of the most basic Tk widgets.
Loading and Displaying Sprites
Now that you know how to load and display a background image in Rubygame, it's time to move onto other graphics, like sprites. A sprite is a smaller graphic displayed on the screen, usually representing the part of the game like the player's ship in Space Invaders or Pac-man in any of the Pac-man games. Backgrounds usually remain static, while sprites can move around and be animated.
Now that you know how to load and display a background image in Rubygame, it's time to move onto other graphics, like sprites. A sprite is a smaller graphic displayed on the screen, usually representing the part of the game like the player's ship in Space Invaders or Pac-man in any of the Pac-man games. Backgrounds usually remain static, while sprites can move around and be animated.
Array
An ordered collection of values, often assigned to a variable. In Ruby, the array takes the place of all ordered collections. They act as arrays, lists, stacks, queues, etc.
An ordered collection of values, often assigned to a variable. In Ruby, the array takes the place of all ordered collections. They act as arrays, lists, stacks, queues, etc.
Socket
A socket is a network communications channel used by a program to communicate with a remote computer.
A socket is a network communications channel used by a program to communicate with a remote computer.
What's New in Rails 2.2?
The release of Ruby on Rails 2.2 bring a new set of features to the table. While release 2.2 is only an incremental release and there are no major architectural changes, there are still some important thing you should know about.
The release of Ruby on Rails 2.2 bring a new set of features to the table. While release 2.2 is only an incremental release and there are no major architectural changes, there are still some important thing you should know about.
Pseudocode
Pseudocode is example code in an imaginary language used to demonstrate an algorithm without writing a working implementation.
Pseudocode is example code in an imaginary language used to demonstrate an algorithm without writing a working implementation.
Ruby - HowTos
An index of HowTos for the Ruby guide site.
An index of HowTos for the Ruby guide site.
Graphical User Interface
A graphical user interface (or GUI) is an interface to a program built with images, words and symbols.
A graphical user interface (or GUI) is an interface to a program built with images, words and symbols.
The Four Quantifiers
Quantifiers tell how many times an element should be matched. Below is a list of all quantifiers supported by the Ruby regular expression engine, how to use them and examples of their use. Though you can get by with the common quantifiers such as + or ?, there are a few more you should know about.
Quantifiers tell how many times an element should be matched. Below is a list of all quantifiers supported by the Ruby regular expression engine, how to use them and examples of their use. Though you can get by with the common quantifiers such as + or ?, there are a few more you should know about.
Using Structs and OpenStructs
Storing key/value pairs in Ruby doesn't always need to be accomplished by using a hash. You can also use the Struct and OpenStruct classes.
Storing key/value pairs in Ruby doesn't always need to be accomplished by using a hash. You can also use the Struct and OpenStruct classes.
Ruby - StepBySteps
An index of StepBySteps for the Ruby guide site.
An index of StepBySteps for the Ruby guide site.
Understanding the Tk Packer
Understand the inner workings of the Tk GUI toolkit's geometry manager, the "packer."
Understand the inner workings of the Tk GUI toolkit's geometry manager, the "packer."
Net::SSH Classes
The Net::SSH library contains handy abstractions for most common tasks so you don't always have to think about channels. However, to get the most out of the library, you'll have to learn about channels.
The Net::SSH library contains handy abstractions for most common tasks so you don't always have to think about channels. However, to get the most out of the library, you'll have to learn about channels.
Attack Example #1
Concerned about security with your Ruby code? Check out this analysis of an CSRF attack (without XSS).
Concerned about security with your Ruby code? Check out this analysis of an CSRF attack (without XSS).
Ruby Script- -Cryptograms
This Ruby script will generate a cryptogram out of any text file. It can be used to decrypt messages for various tasks and will be of particular interest to Geocachers!
This Ruby script will generate a cryptogram out of any text file. It can be used to decrypt messages for various tasks and will be of particular interest to Geocachers!
Blacklist Filter
Any filter that describes what is not allowed.
Any filter that describes what is not allowed.
Spotlight on RubyGems: Cheat
Using the RubyGem 'cheat' for access to wiki-like cheat sheets.
Using the RubyGem 'cheat' for access to wiki-like cheat sheets.
Vim
A review of the Vim text editor for writing Ruby code.
A review of the Vim text editor for writing Ruby code.
jobsites
Looking for a job as a Ruby or Rails programmer? These websites are a great place to start.
Looking for a job as a Ruby or Rails programmer? These websites are a great place to start.
POST Request
A POST request is used to submit forms or upload files.
A POST request is used to submit forms or upload files.
Named Character Classes
A listing of the named character classes available to you in regular expressions in Ruby.
A listing of the named character classes available to you in regular expressions in Ruby.
Algorithm
An algorithm is a sequence of operations to perform a certain task.
An algorithm is a sequence of operations to perform a certain task.
Apt-get
The apt-get command is used to install .deb software packages on Debian-based Linux distributions.
The apt-get command is used to install .deb software packages on Debian-based Linux distributions.
