Monday, October 8, 2007

Ruby: Redirecting standard Input, Output or Error

Sometimes we may postulate to save the output of the program or errors generated in the program into a file or a file type object instead of sending them to default IO objects.

This technique is very simple in shell programming from the command prompt, but not too hard to achieve from the ruby.

The solution is pretty simple, Assign the IO object like a File, Socket to the the global variables such as $stdin, $stdout and/or $stderr.

Take a stab into this small chunk of ruby code, that will explicate everything mostly.

#/auto/itasca/tools/bin/ruby -w
require 'stringio'
new_stdout = StringIO.new #new_stdout is an stringIO object
$stdout = new_stdout #assign this object variable to the gloabal variable
puts "Hello Maruthi."
puts "I am writing to standard output"

$stderr.puts "The screen output will not shown"
$stderr.puts new_stdout.string

* Write the output to the StringIO object.
* Just set
$stdout at the start of your program.
* Since
$std objects are global variables, even temporary changes affects all threads in your scripts.
* The standard input, output and error streams of the process are always available as a constants STDIN, STDOUT and STDERR respectively.

Friday, August 17, 2007

Self in Ruby.

What is all about “self” in ruby.
An object can send a message in three ways:
1) It can send a message to the other object
2) It can send a message to no object, which implicitly sends message to itself
3) It can send a message to explicitly itself

Example for case-I
-------------------
class Upcaser
def some_behavior_on(a_string)
a_string.upcase
end
end
Upcaser.new.some_behavior_on("foo")
=> "FOO"

Example for case-II
--------------------
class Bouncer
def some_behavior
another_behavior
end
def another_behavior
"another_behavior used"
end
end
Bouncer.new.some_behavior
=> "another_behavior used"

Example for case-III
---------------------
class AnotherBouncer
def some_behavior
self.another_behavior
end
def another_behavior
"another_behavior used"
end
end
AnotherBouncer.new.some_behavior
=> "another_behavior used"

“self” is a variable that always names the object itself. It is not widely common in scripts, But it is mainly used in the following cases
Suppose you have a class that stores an integer and can do nothing but add one to it:
Self in Ruby. When you search for online code in ruby language, emphatically you will encounter with the key word self exploited in many places. Inquisitive to know more on self?

Here we go. Let’s have some basic background information on object to object interface in ruby. An object can send message to other object in 3 ways.
1) It can send a message to the other object.
2) It can send a message to no object, which implicitly sends message to itself
3) It can send a message to explicitly itself

Take an example for

Case-I
------
class Upcaser
def some_behavior_on(a_string)
a_string.upcase
end
end
Upcaser.new.some_behavior_on("maruthi")
=> "MARUTHI"

Case-II
--------
class Bouncer
def some_behavior
another_behavior
end
def another_behavior
"another_behavior used"
end
end
Bouncer.new.some_behavior
=> "another_behavior used"

Case-III
---------
class AnotherBouncer
def some_behavior
self.another_behavior
end
def another_behavior
"another_behavior used" -----> (1)
end
end
AnotherBouncer.new.some_behavior
=> "another_behavior used"

Let’s emphasize on case-III, In this case we have used “self”.

No we can define self; Self is an variable that always names the object itself. Of course it’s not widely common scripts. But it plays the vital role in the following cases.

Suppose you have a class that stores an integer and can do nothing but add one to it:

class Adder
attr_reader :value
def initialize
@value = 0
end
def add1
@value += 1
end
end

(@value += 1 is a shorthand way of writing @value = @value + 1.)

Further suppose you wanted to add three to one of these objects. You’d have to do this:
a = Adder.new
=> #

a.add1
=> 1

a.add1
=> 2

a.add1
=> 3

That’s rather verbose. But suppose add1 returned self instead of the result of the addition:

class Adder
def add1
@value += 1
self
end
end

That allows this more succinct form:

Adder.new.add1.add1.add1.value
=> 3

Some method names are also special words in the Ruby language. For example, when Ruby sees class, how does it know whether you are sending the class message to self or starting to define a new class?

The answer is that it doesn’t:

class Informer
def return_your_class
class
end
end
SyntaxError: compile error

You can prevent the error with self:

class Informer
def return_your_class
self.class
end
end
=> nil Informer.new.return_your_class
=> Informer

When you leave parentheses off messages with no arguments, what you have looks just like a local variable. Consider the following:

class M
def start
1
end
def multiplier
start = start -->(1)
start * 30
end
end

At (1), is the start to the right of the equal sign the local variable created on the left, or does it represent sending the message start to self? Let’s find out:

M.new.multiplier
NoMethodError: undefined method ‘*' for nil:NilClass in ‘multiplier'

Both uses of the word “start” refer to a variable, though the exact sequence of events is a little hard to figure out:

1. Ruby encounters the line at (1) It’s an assignment to a name never been seen before. Ruby creates the new local variable and gives it the value nil.
2. Ruby now looks at the right side of the assignment. There’s a reference to. . .what? Ruby guesses it’s the local variable start. So Ruby assigns start the value it already has, nil.
3. The next line multiplies nil by 30.
The problem can be avoided by sending the message to self. . .

start = self.start
. . . or by using parentheses:
start = start()

It’s a good idea to get in the habit of doing one or the other. I favor using self, for no good reason.

Wednesday, August 15, 2007

What is Ruby and Rails

What is Ruby?

Ruby is a pure object-oriented programming language with a super clean syntax that makes programming elegant and fun. Ruby successfully combines Smalltalk's conceptual elegance, Python's ease of use and learning, and Perl's pragmatism. Ruby originated in Japan in the early 1990s, and has started to become popular worldwide in the past few years as more English language books and documentation have become available.

What is Rails?

Rails is an open source Ruby framework for developing database-backed web applications. What's special about that? There are dozens of frameworks out there and most of them have been around much longer than Rails. Why should you care about yet another framework?

What would you think if I told you that you could develop a web application at least ten times faster with Rails than you could with a typical Java framework? You can--without making any sacrifices in the quality of your application! How is this possible?

Part of the answer is in the Ruby programming language. Many things that are very simple to do in Ruby are not even possible in most other languages. Rails takes full advantage of this. The rest of the answer is in two of Rail's guiding principles: less software and convention over configuration.

Less software means you write fewer lines of code to implement your application. Keeping your code small means faster development and fewer bugs, which makes your code easier to understand, maintain, and enhance. Very shortly, you will see how Rails cuts your code burden.

Convention over configuration means an end to verbose XML configuration files--there aren't any in Rails! Instead of configuration files, a Rails application uses a few simple programming conventions that allow it to figure out everything through reflection and discovery. Your application code and your running database already contain everything that Rails needs to know!

Thursday, July 12, 2007

Difference between Use and Require in perl

Use :
1. The method is used only for the modules(only to include .pm type file)
2. The included objects are varified at the time of compilation.
3. No Need to give file extension.

Require:
1. The method is used for both libraries and modules.
2. The included objects are varified at the run time.
3. Need to give file Extension.

Wednesday, July 11, 2007

Exception handling in Ruby

Like Java, Ruby has the exception handling capabilities.
Handling the any type of exceptions in ruby is pretty simple,
Just use begin rescue pair w/t specifying what kind of exceptions you do want to catch.

begin
code
code
resuce Exception => msg
puts "Something went wrong ("+msg+")"
end

rescue/raise is used to signal error conditions. This is analogous to
Exceptions in Java or C++.

Throw/catch is used to unwind the stack to a desired point. It's like
a labeled break. For example:

catch(:done){
loop {
do_work
if time_to_stop? throw :done
}
}

It's nice because you can break out of arbitrarily nested loops/blocks/etc.

There appear to be 2 separate exception mechanisms in Ruby, catch/throw and
rescue/raise/retry. Is this right?

Not really. A throw just lets one unwind from some deep nesting without
generating a back trace, passing some value along to the catch.

It is much faster and lighter weight than the exception mechanism, and should
be used for cases where a fast, lightweight escape from some deep place is
wanted, perhaps with some passing of data from the deep place to the shallow
place, but where an actual exception isn't needed.

Classes in Ruby

Classes in Ruby

Monday, June 25, 2007

Gowribidanur a place for quality education.

Gowribidanur, also articulated as gouribidanur is just 47 miles(75 kms) from Garden city Bangalore. Telugu is the widely used native language in taluk, even though kannada is the official language. Long long ago, too long ago... nobody do not know how long ago! gowribidanur used to be the hub for sports and cultural activities.
Acharya High School(AHS) is the very old and popular school(Not sure about the popularity now, When i was doing my schooling it was the most preferred school for quality education). AHS used to be the fabricated industry for talented people. If we go back to pages of history, there are stories even now people say. Homi Babha and Mahatma Gandhi visitied this school .

Gowribidanur is world famous for one memorable legend, Dr H Narasimhaiah. Popularly known as HN. He born in Hosur, a village near gowribidanur from the poor and illeterate family.
He turned upto be the Vice-Chancellor for Bangalore university. He known to be the god father of chain of National collages.

AES National college is the quondam and fantabulous collage for high quality pre-university and university education. National college library was used to be the second largest library in India.
Muncipal college is the another best educational institure preferred for pre-university education especially for science. Acharya also has pu college for Arts and commerce and has arts degree college for women.

Vidurashwatha is the well known pilgrimage place just attached to taluk(6kms), This place is known for freedom fight and film shootings.

Gouribidanur taluk also has BARC(Bhaba automic research centre) for Nuclear Research. BARC hosts several highly sensitive seismometers that can record minutest disturbances in the earths crust across the globe. TIFR has a centre for research on gravitational fields.

Gauribidanur had a population of 30,530. Males constitute 51% of the population and females 49%. Gauribidanur has an average literacy rate of 72%, higher than the national average of 59.5%: male literacy is 77%, and female literacy is 67%. In Gauribidanur, 11% of the population is under 6 years of age. It has an average elevation of 694 metres.

Finally to conclude about the title, It has very good faculty to provide quality education accross the colleges in the taluk head quarters.

External Links:
Wikimapia
Wikipedia

-Maruthi Reddy M H

Friday, June 22, 2007

Faq's Ruby

When we start using Ruby, Attain with the galore of questions.
The first question would be "why ruby?" and the list follows ...What is ruby, Why the name Ruby, what is the History behind ruby, Where can i find the documents, what is the best way to start with ...etc...etc...

Lately, I commenced habituating the triple dot notation most often. Still not clear why i am using it. Anyway, This link address all your basic question wrt to Ruby.

Frequently asked questions

More Faq's

Why Ruby

Perl Newsgroups

Wondering! Where to post your queries regarding perl?
Here is the list of top perl newsgroups. I bet your issues will be best addressed in one of these newsgroups depending upon your issue.

Thursday, June 21, 2007

Inter process communication(IPC)

IPC

Interprocess Communication in perl (IPC)

To maximize portability, don't try to launch new processes. That means you should avoid system, exec, fork, pipe, ``, qx//, or open with a |.

The main problem is not the operators themselves; commands that launch external processes are generally supported on most platforms (though some do not support any type of forking). Problems are more likely to arise when you invoke external programs that have names, locations, output, or argument semantics that vary across platforms.

One especially popular bit of Perl code is opening a pipe to sendmail so that your programs can send mail:

open(MAIL, '|/usr/lib/sendmail -t') or die "cannot fork sendmail: $!";
This won't work on platforms without sendmail. For a portable solution, use one of the CPAN modules to send your mail, such as Mail::Mailer and Mail::Send in the MailTools distribution, or Mail::Sendmail.

The Unix System V IPC functions (msg*(), sem*(), shm*()) are not always available, even on some Unix platforms.

For general information on IPC.
Part - I
Part - II

Hosting...Ruby

Hosting...Ruby

  1. Rails Playground - developer hosting starting from $5 per month
  2. Ruby on Rails
    If you need hosting, TextDrive is the official Ruby on Rails host, offering fantastic plans with a knowledgeable staff. Whether you need shared or dedicated ...
  3. A2 Web Hosting : Ruby Hosting : PHP 5.2.1 Hosting, MySQL 5.0.x/4.1 ...
    A2 Hosting offers PHP 5.2.1 hosting, MySQL 5.0.x/4.1.x hosting, Postgres/PostgreSQL 8.2.x hosting, Ruby on Rails hosting, cPanel, Fantastico and more from ...
  4. Hosting Rails - Ruby on Rails Hosting - Robust & Affordable Plans
    Offering high-quality Ruby hosting plans optimized for the rapid and reliable deployment of Ruby on Rails web applications. Mongrel, mongrel_cluster ...
  5. Ruby Web Hosting eruby mod_ruby Support
    We fully support Ruby and provide Ruby Web Hosting services, powered by eruby and mod_ruby.
  6. The Host with the Most | Ruby on Rails for Newbies
    Nice rundown of some of the options you have when looking for a Ruby on Rails hosting company. I have myself compiled a list of possible Rails hosts at ...
  7. Site5 Ruby on Rails - Web Hosting for Ruby on Rails, FastCGI and Gems
    Site5 Ruby on Rails Hosting - Web Hosting with Ruby on Rails, featuring support for FastCGI, ruby gems, Apache, mySQL, Switchtower and more.
  8. Rails Machine: Ruby on Rails hosting, services and commercial ...
    Rails Machine offers software, hosting and support for commercial Ruby on Rails application deployments.
  9. Ruby on Rails Web Hosting with HostMySite.com
    HostMySite's Ruby On Rails Plans Are Perfect For Any Project. HostMySite's Web hosting plans offer your projects a secure and reliable home. ...
  10. Ruby on Rails Hosting - Reviews - Rails Tutorials, Demos, Price ...
    Educating and entertaining the curious developer about Ruby on Rails and Ruby on Rails Hosting - what to look for and what to avoid.
  11. FolderSpace :: Home of Ruby on Rails Website Hosting
    Ruby on Rails Website Hosting with Free and Paid plans for optimal Web Development on fast servers, located in a Secure Data Center with dedicated bandwidth ...
  12. Ruby on Rails Hosting, Ruby on Rails Web Hosting, Cheap Ruby on ...
    Ruby on Rails Hosting, Ruby on Rails Web Hosting, Cheap Ruby on Rails Hosting, Cheap Ruby Rails Hosting, Ruby Rails Hosting, Ruby Rails Web Hosting, Ruby on ...
  13. Website Hosting PHP hosting PHP5 hosting MySQL MySQL5 Cpanel ...
    Affordable business web hosting services support PHP Hosting, PHP5 hosting, MySQL hosting , MySQL5 hosting, Ruby on Rails hosting, FrontPage website hosting ...
  14. Ruby on rails compatible web hosting
    ThinkHost provides compatible hosting for Ruby on Rails applications - Ruby on Rails support included in every plan, free of charge!
  15. Install your own ruby on a shared host
    So after struggling during last rails upgrade to 1.1 on my host, the next logical step is to also use my own version of ruby so I can have better control on ...
  16. Kattare I/S: Home - Java, Servlet, JSP, PHP, RUBY, and PERL Hosting
    Kattare Internet Services provides enterprise java, servlet, jsp, php, ruby, perl, and mod_perl web hosting services.
  17. DailyRazor Hosting - Advanced PHP Hosting, Ruby Hosting, Ruby on ...
    DailyRazor Hosting - Advanced ASP.NET 1.1/2.0 and ASP 3.0 Web Hosting plus Affordable Java Hosting, JSP Hosting, Servlets, PHP Hosting, Ruby Hosting, ...
  18. AVLUX :: Subversion Hosting - Trac, WebSVN :: Ruby on Rails ...
    AVLUX :: Subversion Hosting - Trac, WebSVN :: Ruby on Rails Hosting :: Managed Dedicated Servers.
  19. Ruby on Rails hosting companies - Compare - Review and Find your ...
    Are you looking for a good and reliable Ruby on Rails hosting company? We have lined them up so you can easily compare and review them.
  20. iPowerWeb Now Offers Ruby on Rails For Hosting Accounts
    iPowerWeb has added Ruby on Rails support on all web hosting accounts. iPowerWeb customers will now be able to develop their sites using Ruby on Rails.
  21. Yoav's Space: Ruby on Rails Hosting
    I suggest you check out Rails Hosting Info, a site dedicated to Ruby on Rails hosting companies. You can compare them on price, country, webserver, . ...
  22. XMG Free | Free Web Hosting
    XMG Free has recently added Ruby on Rails support to all customers on all servers, making us one of the first (if not first) Free Web Host to offer full ...

Ruby on Rails... All about rails

Ruby on Rails... All about rails

  1. Ruby on Rails
    RoR home; full stack, Web application framework optimized for sustainable programming productivity, allows writing sound code by favoring convention over ...
  2. Download Ruby on Rails
    We recommend Ruby 1.8.5 for use with Rails. Ruby 1.8.4 and 1.8.2 are still ... You're running Ruby on Rails! Follow the instructions on http://0.0.0.0:3000. ...
  3. Ruby on Rails - Wikipedia, the free encyclopedia
    Growing article, with links to many related topics. [Wikipedia]
  4. Ruby on Rails
    The Ruby Edge ? Digg style community driven news site dedicated to Ruby and Ruby On Rails with user voting and commenting on submitted stories ...
  5. ONLamp.com -- Rolling with Ruby on Rails
    Curt Hibbs shows off Ruby on Rails by building a simple application that requires almost no Ruby experience.
  6. Riding Rails
    Happycodr is a new place for you to showcase your Ruby on Rails application. ... NET entanglement and found Ruby on Rails, but they still have to live in a ...
  7. Ruby on Rails
    RubyOnRailsRelatedResources ? Collection of links about Ruby On Rails resources. ... So You Wanna Begin Programming With Ruby on Rails ? An good beginners ...
  8. Rails Framework Documentation
    Rails uses the built-in web server in Ruby called WEBrick by default, so you don?t have to install or configure anything to play around. ...
  9. Top 12 Ruby on Rails Tutorials
    List with descriptions, links, many forum comments. [Digital Media Minute]
  10. ONLamp.com -- What Is Ruby on Rails
    Curt Hibbs explores the pieces and parts of Ruby in Rails to show where its productivity gains and flexibility come from.
  11. Ruby on Rails Cheat Sheet - Cheat Sheets - ILoveJackDaniels.com
    The Ruby On Rails cheat sheet is designed to be printed on an A4 sheet of ... I am no expert in Ruby, On Rails or off, so to ensure this cheat sheet was as ...
  12. Yukihiro Matsumoto | the Ruby on Rails Podcast
    The creator of Ruby. From RubyConf in Denver, Colorado. ... News and interviews about the Ruby language and the Rails website framework. ...
  13. Riding Rails: Ruby on Rails will ship with OS X 10.5 (Leopard)
    Will there be just normal Ruby, RubyGems and the Rails gem preinstalled and ... I must be an idiot b/c I don?t understand what Ruby on Rails client is (or ...
  14. Ruby on Rails - Trac
    Check out the current development trunk (Edge Rails) with: ... If you want to modify Rails or fix a bug you've run across, there's no faster way to make it ...
  15. RadRails: A free and open source Ruby on Rails IDE
    Integrated development environment, IDE, for RoR framework. Goal: enhance development experience, simplify it by giving one point from which to manage ...
  16. Ruby on Rails chases simplicity in programming | CNET News.com
    Ruby on Rails chases simplicity in programming | Solo-created framework is making waves among programmers and analysts as the next hot trend in Web ...
  17. Using Ruby on Rails for Web Development on Mac OS X
    Tutorial: text, code samples, screenshots, diagrams, tables, links. [Apple Developer Connection]
  18. Ruby off the Rails
    Ruby on Rails is just one facet of what makes Ruby great, just like EJB is only part of the Java enterprise platform. Andrew Glover digs beneath the hype ...
  19. Ruby on Rails Tutorials
    Several topics, with forum comments. Tutorialized.com.
  20. Ruby on Rails on Oracle: A Simple Tutorial
    You may have already heard about Ruby on Rails, the new application framework that ... The fact of the matter is, getting Ruby on Rails and Oracle to work ...
  21. Ruby on Rails 1.1: Web 2.0 on Rocket Fuel (Dion Hinchcliffe's Web ...
    The much-anticipated new version 1.1 of Ruby on Rails hit the streets with fanfare a couple of days ago. And while even I am wary of the hyperbole that ...
  22. HowtoInstallOnOSXTiger in Ruby on Rails
    I worked on this for ages, reinstalled Ruby, MySQL and Rails at least three times each ... work like a charm and my Ruby on Rails is finally working now. ...
  23. Ruby on Rails Manual
    Welcome to your central source for Ruby on Rails documentation. The following versions are referenced within this website: ...
  24. Ruby on Rails and J2EE: Is there room for both?
    Ruby on Rails is a relatively new Web application framework built on the Ruby language. It is billed as an alternative to existing enterprise frameworks, ...
  25. Ruby On Rails Blog
    Focus: RoR programming, Web design, JavaScript libraries, tutorials, job information; for web development; many articles, much news.
  26. oreilly.com -- Online Catalog: Ruby on Rails: Up and Running
    This compact guide from O'Reilly teaches you the basics of Ruby on Rails, the super-productive new way to develop full-featured web applications.
  27. Ruby on Rails: An Overview on Squidoo
    What makes web development with Rails FAST, EASY, and FUN?
  28. Nuby on Rails | Ruby on Rails for Newbies
    This is Geoffrey Grosenbach's blog, covering Ruby, Ruby on Rails, graphic design, and other good stuff. Topfunky Corp � Send Me Email ...
  29. Exploring Ruby on Rails | Linux Journal
    LJ: I know you just [started] a blog using Ruby on Rails. ... You were the catalyst for getting me into Ruby, and because the Rails hype was starting to ...
  30. Digital Web Magazine - Ruby on Rails for the Rest of Us
    Digital Web Magazine - Ruby on Rails for the Rest of Us.
  31. Ruby On Rails Camp - HomePage
    Ruby on Rails Camp was a gathering of enthusiasts who wanted to share and learn more about Ruby on Rails (RoR) in an open environment. ...
  32. Installing Ruby on Rails with Lighttpd and MySQL on Fedora Core 4
    This how-to is aimed at getting you started with Ruby on Rails installed on ... You may be wondering why you might want to install Ruby on Rails with FC4 ...
  33. O'Reilly Network -- Ruby on Rails: An Interview with David ...
    Ruby on Rails' creator, David Heinemeier Hansson, is set to keynote the European O'Reilly Open Source Convention in Amsterdam this October.
  34. Hotscripts.com :: Ruby on Rails
    Links to Ruby on Rails scripts, applications, tutorials, books, and websites. [Hotscripts]

Ruby Projects

Ruby Projects

  1. InstantRails - a one-stop Rails runtime solution containing Ruby, Rails, Apache, and MySQL, all preconfigured and ready to run. No installer, you simply drop it into the directory of your choice and run it. It does not modify your system environment. (Windows-only)
  2. win32utils - a series of packages that provide Ruby interfaces to Win32 systems and services. This project supports the Windows NT family of operating systems *only*.
  3. wxRuby - a cross-platform GUI toolkit with a comprehensive widget set and native look and feel, based on the mature wxWidgets framework. wxRuby2 offers the most complete, correct and up-to-date functionality; new users are advised to download these gems.
  4. Ruby PDF Tools - written in pure Ruby (no C extensions) for working with PDF documents.

Ruby Tutorials

Ruby Tutorials

  1. Ruby Study Notes
    a thorough collection of Ruby Study Notes for those who are new to the language and in search of a solid introduction to Ruby's concepts and constructs.
  2. Learning Ruby
    Learning Ruby. Copyright (c) 2003 Daniel Carrera Free Documentation License Where to get help How to install Ruby Download this tutorial ...
  3. try ruby! (in your browser)
    Beginner's basic tutorial, online, interactive, works in Web browser, has Ruby interpreter above with lessons below.
  4. Learn to Program, by Chris Pine
    Some of us in the community were talking about what such a "Ruby for the Nuby" tutorial would need, and more generally, how to teach programming at all. ...
  5. Why?s (Poignant) Guide to Ruby
    A very basic, ground-level tutorial for the beginner to Ruby. By Chris Pine. Programming Ruby. The original tome and complete reference for Ruby. ...
  6. Ruby Basic Tutorial
    This is a Ruby tutorial for one not knowing Ruby. Therefore, we use many constructs and styles that, while familiar to programmers and intuitive to ...
  7. ONLamp.com -- Rolling with Ruby on Rails
    Editor's Note: Bill Walton has ported this tutorial to Rolling with Ruby on InstantRails -- for a very quick installation experience. ...
  8. RubyCHannel Tutorial
    Downloading Ruby Tutorial... Make sure Javascript is enabled. Hints for handling the tutorial menu. Some texts in the menu are cut. ...
  9. Ruby Tutorial
    This material assumes that you have someone close by who knows Ruby and is actively working through this with you (i.e., this tutorial favours the classroom ...
  10. Tutorial in Ruby on Rails
    It is also possible to use the Apache webserver with Ruby on Rails. ... In the mean time, feel free to check out the other tutorials on ...
  11. Using Ruby on Rails for Web Development on Mac OS X
    The Ruby on Rails web application framework has built up a tremendous head of ... and install the 30-day trial of TextMate to use throughout this tutorial. ...
  12. freshmeat.net: Tutorials - The Scalability of Ruby
    The Scalability of Ruby by Jack Herrington, in Tutorials - Sat, Apr 13th 2002 00:00 PDT. There are lots of reasons to like Ruby. It's a pure object oriented ...
  13. BCT's Ruby Tutorial
    They consist of a short introductory README document, and a four part Ruby tutorial. Originally written in plain text, then semi-automatically converted to ...
  14. Ruby/Gtk Tutorial
    Ruby/Gtk Tutorial. Copyright � 2002 by Daniel Carrera. This is version 0.1 of the Ruby/Gtk tutorial. Table of Contents; Introduction ...
  15. Ruby/Tk Tutorial
    Ruby/Tk Tutorial. So you found Ruby and liked it. Now you need a GUI toolkit. ... This tutorial is aimed at people that want to use Tk as toolkit with Ruby. ...
  16. Ruby/GTK2 Tutorial - Ruby-GNOME2 Project Website
    This document covers the Ruby/GTK2 library, which can be used to build graphical user interfaces (GUI) under the GNOME2 environment. The tutorial is ...
  17. Bitwise Magazine :: Ruby programming tutorial
    You will be reading a great deal about Ruby programming in Bitwise in the coming ... However, in this series we shall be dealing exclusively with the Ruby ...
  18. � Road to Ruby enlightenment - tutorials and first steps � amazing ...
    This is not a Ruby tutorial. Road To Ruby Enlightenment ... The first tutorial I stumpled upon was Why?s (Poignant) Guide to Ruby (WPGtR) which is the ...
  19. Top 12 Ruby on Rails Tutorials
    List with descriptions, links, many forum comments. [Digital Media Minute]
  20. Amazing Ruby Tutorial at iterating toward openness
    1 Response to ?Amazing Ruby Tutorial?. Feed for this Entry Trackback Address. 1 StigmergicWeb � try ruby: a great programming tutorial Pingback on Dec 27th, ...
  21. ONLamp.com -- Rolling with Ruby on Rails, Part 2
    Curt Hibbs shows off Ruby on Rails by finishing his sample application in 47 ... tutorial. Articles that share the tag tutorial:. Rolling with Ruby on Rails ...
  22. Free Ruby Tutorials and Online Books - freeprogrammingresources.com
    Ruby Tutorial and Online Book Links. ... Free Ruby Tutorials and Online Books. Learning Ruby new Ruby study notes that form a Ruby programming tutorial. ...
  23. Typo 2.5 Theme Tutorial | Ruby on Rails for Newbies
    This is Geoffrey Grosenbach's blog, covering Ruby, Ruby on Rails, graphic design, and other good ... Screencast tutorials for Ruby on Rails developers. ...

Ruby Books

Ruby Books

  1. by Dave Thomas, Chad Fowler, Andy Hunt
    published: 2004-10-01
  2. by Dave Thomas, David Hansson, Leon Breedt, Mike Clark, James Duncan Davidson, Justin Gehtland, Andreas Schwarz
    published: 2006-12-14
  3. by Lucas Carlson, Leonard Richardson
    published: 2006-07-19
  4. by Dave Crane, Bear Bibeault, Tom Locke
    published: 2007-03-21
  5. by Scott Raymond
    published: 2007-01-03
  6. by Hal Fulton
    published: 2006-10-25
  7. by Chad Fowler
    published: 2006-06-09
  8. by Steven Olson
    published: 2007-02-22
  9. by Brian Marick
    published: 2007-01-23
  10. by David Black
    published: 2006-05-11
  11. by Patrick Lenz
    published: 2007-01-30
  12. by Bruce Tate, Curt Hibbs
    published: 2006-08-22
  13. by Eric van der Vlist, Danny Ayers, Erik Bruchez, Joe Fawcett, Alessandro Vernet
    published: 2006-11-29

The world of Ruby Programming

The world of Ruby Programming

  1. Ruby Programming Language
    Interpreted, dynamically typed, pure object-oriented, scripting language for fast, easy programming, from Japan. Simple, straightforward, extensible.
  2. Ruby Central
    Ruby resource: One-click Windows installer; online copy of Programming Ruby: The Pragmatic Programmer's Guide. [Open Publication License]
  3. Ruby on Rails
    RoR home; full stack, Web application framework optimized for sustainable programming productivity, allows writing sound code by favoring convention over ...
  4. Programming Ruby: The Pragmatic Programmer's Guide
    Full online HTML text at Ruby Central, with download link. [Open Content, Open Publication License]
  5. Ruby (programming language) - Wikipedia, the free encyclopedia
    Growing article, with links to many related topics. [Wikipedia]
  6. Why?s (Poignant) Guide to Ruby
    An online Ruby book for beginning coders which reads like an illustrated novel.
  7. Sam Ruby
    20k of those are the Ruby on Rails toolkit. In case your math isn?t so good that is 20% of the total number of downloads from IBM are by potential Rails ...
  8. Ruby QuickRef
    Ruby quick reference. ... The process number of the Ruby running this script. $? The status of the last executed child process. $: Load path for scripts and ...
  9. Welcome! [Ruby-Doc.org: Documenting the Ruby Language]
    Links and downloads for Ruby programming documentation.
  10. try ruby! (in your browser)
    Beginner's basic tutorial, online, interactive, works in Web browser, has Ruby interpreter above with lessons below.
  11. Pages tagged with "ruby" on del.icio.us
    All items tagged ruby ? view popular ... On Ruby: Benchmarking, Lies, and Statistics ... G3DRuby - A Ruby Library for Advanced 3D Graphics ...
  12. Programming Ruby, 2nd Ed.
    Their home base: class reference, articles, tips, software downloads, links, and a zippy looking Ruby slide presentation. Book available as downloadable ...
  13. Programming Ruby: The Pragmatic Programmer's Guide
    This book is a tutorial and reference for the Ruby programming language. ... But Ruby is fundamentally different. It is a true programming language, too, ...
  14. Ruby: See what people are saying right now on Technorati
    See all blog posts tagged with ruby on Technorati.
  15. O'Reilly Ruby
    The O'Reilly Ruby group weblog covers all the latest in the world of the Ruby programming language with some of the languages leading programmers.
  16. Screencasts of Ruby on Rails
    Ruby on Rails is not just for playing with your local database, ... That is, unless you're using Ruby on Rails. In 20 minutes, you'll learn all about how ...
  17. Ruby Home Page - What's Ruby
    Ruby is the interpreted scripting language for quick and easy object-oriented programming. ... Ruby has exception handling features, like Java or Python, ...
  18. Ruby Central
    Non-profit organization dedicated to promoting growth of open source Ruby programming language; manages RubyConf, donation clearinghouse, presence and point ...
  19. Programming Ruby: The Pragmatic Programmer's Guide
    This book is a tutorial and reference for the Ruby programming language. ... Ruby is not the universal panacea for programmers' problems. ...
  20. RubyGarden
    Was site for tracking developments: forum; news, had Ruby News Weekly (like Dr. Dobb's Python-URL); announcements, future shock, biggest Ruby Wiki, ...
  21. Ruby: HomePage
    For discussing Ruby language and developing code.
  22. Ruby Conference 2006
    Annual international community event. Meet Matz. The 6th US conference is 20-22 October 2006, Denver, Colorado, USA. See writeup and photos of prior events.
  23. Yukihiro Matsumoto | the Ruby on Rails Podcast
    The creator of Ruby. From RubyConf in Denver, Colorado. Translation by Stephen Munday. Interviewed by Geoffrey Grosenbach ...
  24. Joel on Software
    Without knowing much about the implementation of Ruby, I would guess that the biggest issue is around late binding and especially duck typing, ...
  25. ONLamp.com -- Rolling with Ruby on Rails
    Curt Hibbs shows off RoR by building simple application that needs little Ruby experience. Descriptions, instructions, screenshots. [ONLamp.com]
  26. Ruby Class and Library Reference
    This page lists the built-in Ruby classes and modules, and the methods they contain. Click on a class, module, or method name for a detailed description. ...
  27. Description
    ADO (ActiveX Data Objects) Requires win32ole, part of the Ruby standard library. ... Michael Neumann Original author of Ruby/DBI; wrote the DBI and most of ...
  28. Riding Rails
    Happycodr is a new place for you to showcase your Ruby on Rails application. ... NET entanglement and found Ruby on Rails, but they still have to live in a ...
  29. oreilly.com -- Online Catalog: Ruby Cookbook
    From data structures and algorithms, to integration with cutting-edge technologies, the Ruby Cookbook has something for every programmer.
  30. Ruby Editor Plugin for jEdit
    The Ruby Editor Plugin converts jEdit into an intelligent Ruby IDE. Focused on programmer productivity, it lets you manipulate Ruby code at the syntax ...
  31. Ruby Quiz
    Ruby Quiz is a weekly programming challenge for Ruby programmers in the ... Send all submissions to James Edward Gray II, the Ruby Quiz Administrator. ...
  32. Yahoo! Developer Network - Ruby Developer Center
    If you've ever thought about combining Ruby with Yahoo! ... Web Services and other APIs using Ruby on the ydn-ruby mailing list. ...
  33. Ruby
    Ruby QuickRef, code snippets. MetaRuby project status. Ruby Language audit: 1.0.1. RubyConf 2002-05 schedules and online presentations. Ruby Cookbook.
  34. Ruby on Rails
    The Ruby Edge ? Digg style community driven news site dedicated to Ruby and Ruby On Rails with user voting and commenting on submitted stories ...
  35. oreilly.com -- Online Catalog: Ruby in a Nutshell
    By Yukihiro "Matz" Matsumoto; O'Reilly & Associates, 2001, ISBN 0596002149. By programmer, and Ruby creator; concise broad reference guide assumes reader ...
  36. RDT - Ruby Development Tools: Welcome
    Also, you can always subscribe to my blog, Late to the Party, for personal updates on RDT related work (among other topics like Ruby and Rails). ...
  37. Learning Ruby
    By Daniel Carrera. Introduces programming, Ruby, assumes familiarity with computers in Unix X Terminal environment, but not Ruby; simple descriptions, ...
  38. ruby code
    Using Ruby ActiveRecord with an in-memory SQLite database. A nice simple example of this ... Ruby Client for Amazon Alexa Site Thumbnail (AST) Service ...
  39. Google Directory - Computers > Programming > Languages > Ruby
    Web location for organizing Ruby community's Annual Ruby Conference. ... Ruby resource: One-click Windows installer; online copy of Programming Ruby: The ...
  40. The Ruby Way | Linux Journal
    If it were, I'd recommend The Ruby Way without reservation. ... There are so many quirks that I'm almost afraid to tackle my first Ruby program. ...
  41. All Ruby Community Content on InfoQ
    InfoQ.com (Information Queue) is an independent online community focused on change and innovation in enterprise software development, targeted primarily at ...
  42. Polishing Ruby
    ruby2ruby provides a means of generating pure ruby code easily from ... This makes making dynamic language processors much easier in ruby than ever before. ...
  43. Using Ruby on Rails for Web Development on Mac OS X
    Tutorial: text, code samples, screenshots, diagrams, tables, links. [Apple Developer Connection]
  44. Ruby 1.8.4
    ruby.c � signal.c � sprintf.c ...
  45. The Philosophy of Ruby
    Yukihiro Matsumoto, the creator of the Ruby language, talks with Bill Venners about the design philosophy behind Ruby.
  46. Ruby Inside: Ruby blog with daily tips, news, code and fun
    Search the top Ruby & Rails sites with Google Ruby Search ... The solution is to upgrade to the newly released Ruby 1.8.5-p2 (warning: direct link to ...
  47. YAML.rb is YAML for Ruby | Home
    YAML4R is a full-featured YAML parser and emitter for Ruby. Use as drop-in replacement for PStore, or use one of its several APIs to store object data in ...
  48. MF Bliki: EvaluatingRuby
    This is enough for me to start saying that for a suitable project, you should give Ruby a spin. Which, of course, only leaves open the small question of ...
  49. O'Reilly CodeZoo
    Ruby/DBI develops a database independent interface for accessing databases - similar to Perl's ... A search engine generator for Ruby on Rails applications. ...
  50. Ruby on Rails
    RubyOnRailsRelatedResources ? Collection of links about Ruby On Rails resources. ... So You Wanna Begin Programming With Ruby on Rails ? An good beginners ...
  51. Programming Ruby
    Sharing Data Between Ruby and C ... Marshaling and Distributed Ruby ... Ruby Library Reference. Built-in Classes and Methods ...
  52. ONLamp.com -- What Is Ruby on Rails
    Curt Hibbs explores the pieces and parts of Ruby in Rails to show where its productivity gains and flexibility come from.
  53. Top 12 Ruby on Rails Tutorials
    List with descriptions, links, many forum comments. [Digital Media Minute]
  54. LinuxDevCenter.com -- An Introduction to Ruby
    In this introduction to the Ruby scripting language Colin Steele compares it to Perl and Python, and says why he prefers it to either Perl or Python.
  55. Ruby/Google
    Library aiming to make the API more accessible to Ruby programmers. Includes source code, demonstrations, and a copy of the API Reference.
  56. Riding Rails: Ruby on Rails will ship with OS X 10.5 (Leopard)
    The developer seed that was distributed today at WWDC contains Ruby 1.8.4 ... Will there be just normal Ruby, RubyGems and the Rails gem preinstalled and ...
  57. Ruby/.NET Bridge
    Allows using Ruby and .NET objects together in programs, access Ruby objects from .NET and vice-versa. Description, tutorial, download, history.
  58. ongoing � On Ruby
    I have previously admired the Ruby language, albeit from a distance, ... In the last week I have written a few hundred lines of Ruby code that actually do ...
  59. Building Ruby, Rails, LightTPD, and MySQL on Tiger
    Tutorial to manually build and install four programs, on Mac OS X 10.4: Tiger. [Hivelogic]
  60. Why?s (Poignant) Guide to Ruby :: 3. A Quick (and Hopefully ...
    A Quick (and Hopefully Painless) Ride Through Ruby (with Cartoon Foxes) ... My conscience won?t let me call Ruby a computer language. ...
  61. Ruby on Rails Cheat Sheet - Cheat Sheets - ILoveJackDaniels.com
    The Ruby On Rails cheat sheet is designed to be printed on an A4 sheet of ... I am no expert in Ruby, On Rails or off, so to ensure this cheat sheet was as ...
  62. Ruby ? OpenID Enabled
    OpenID on Rails - Ruby OpenID 0.9.2 Released by Brian Ellin ? last modified 2006-01-23 14:14: The latest release of the Ruby OpenID library contains a fully ...
  63. Ruby Forum - Forum List
    La lista sobre Ruby On Rails (rubyonrails.com) en castellano, 5 hours ago ... Andreas Schwarz / Se�lacher Weg 4 / 96450 Coburg / Germany - ruby-forum (at) ...
  64. MySQL/Ruby
    MySQL API module (extension library) for Ruby; gives same functions to Ruby programs that MySQL C API gives to C programs.
  65. Ruby Code & Style
    Peer reviewed online journal: articles, news, Weblogs, buzz, chapters, forums. Artima Software.
  66. Google Groups: comp.lang.ruby
    Hi, New to ruby and apache. Been trying to get a simple ruby script to run via apache. ... I've been coding in Ruby almost exclusively for about six months, ...
  67. Manning: Ruby for Rails
    By David A. Black; Manning Publications, 2006, ISBN 1932394699. Shows what one is doing when writing Rails Web applications, and how Ruby methods expand ...
  68. Enterprise Integration with Ruby
    Learn how the power and elegance of Ruby can make it easier to get ... See how Ruby can be used as the glue to combine applications in new ways, ...
  69. XUL Apps > XHTML Ruby Support - outsider reflex
    XHTML Ruby Support Ver.1.4.2006100801 for Netscape 7 & Mozilla & Firefox ... *This is based on the stylesheet for supporting XHTML Ruby on Mozilla written ...
  70. Learning Ruby - Main Page
    A free, web-based course in Ruby programming along with a live instructor.
  71. O'Reilly Radar > Ruby Book Sales Pass Perl
    Keep in mind also that sales of Ruby and Ajax books are driven by recency. We could certainly see a reversal when Perl 6 comes out. And in the job market, ...
  72. Ruby IDE :: Ruby In Steel :: Ruby Programming with Visual Studio 2005
    Sapphire in Steel :: Ruby programming for Visual Studio 2005.
  73. Using the Ruby Development Tools plug-in for Eclipse
    This article introduces using the Ruby Development Tools (RDT) plug-in for Eclipse, which allows Eclipse to become a first-rate Ruby development environment ...
  74. Postgres(Ruby extension library)
    We are thankful to the people at ruby-list and ruby-dev mailing lists. ... You can redistribute This library and/or modify it under the same term of Ruby. ...
  75. Ruby On Rails Blog
    Focus: RoR programming, Web design, JavaScript libraries, tutorials, job information; for web development; many articles, much news.
  76. ONJava.com -- Ruby the Rival
    Bruce Tate's Beyond Java suggests Ruby as a top contender to displace Java. Tate, James Duncan Davidson, Robert Cooper and Bill Venners opine on Ruby and ...
  77. Open Directory - Computers: Programming: Languages: Ruby
    Cetus Links: Ruby - Link page: describes language, links to central site, FAQs, ... PLEAC-Ruby - The Perl Cookbook presents a suite of common programming ...
  78. SQLite/Ruby
    This module allows Ruby programs to interface with the SQLite database engine (www.sqlite.org). ... The project page is rubyforge.org/projects/sqlite-ruby. ...
  79. freshmeat.net: Project details for Ruby/Informix
    Ruby/Informix is a Ruby extension for connecting to IBM Informix Dynamic Server. It provides a convenient interface for querying an Informix database in ...
  80. Django | Snakes and Rubies downloads
    On December 3, 2005, Ruby and Python developers from Chicago and vicinity gathered ... You can read more about the event at the Snakes and Rubies website. ...
  81. Ruby-GNOME Website
    A set of Ruby language bindings for the GNOME development environment including Ruby/GTK+.
  82. Using the Ruby DBI Module
    The Ruby DBI module provides a database-independent interface for Ruby ... The Ruby DBI module includes the code that implements the general DBI layer, ...
  83. SourceForge.net: Ruby Development Tool
    Donate Stats RSS. The Ruby Development Tool is a Ruby IDE, composed of Ruby aware features/plugins for the Eclipse platform. ...
  84. RubyCorner.net - resources for ruby and rails development
  85. RubyCorner.com - Ruby's Blog Directory - Last Updated
    Focus: Ruby and related technologies and projects. Has directory where blogs are ordered by most recent update. English, Espa�ol.
  86. Ruby MemCache Client - Trac
    This is a Ruby client library for memcached, a high-performance distributed memory ... Support for the Ruby client library is built into Ruby on Rails, ...
  87. Otaku, Cedric's weblog: Why Ruby on Rails won't become mainstream
    You won't be reading any Ruby on Rails bashing in this blog post for a simple reason: I ... So why do I think that Ruby on Rails will never cross the chasm? ...
  88. Ruby Standard Library Documentation
    Welcome to the Ruby Standard Library Documentation collection, brought to you by the ruby-doc project. Whether you are browsing online or offline, ...
  89. Ruby Programming - Wikibooks, collection of open-content textbooks
    The next section, Intermediate Ruby covers a selection of slightly more advanced ... Finally, the Ruby language section is organized like a reference to the ...
  90. MF Bliki: ruby
    Enterprise Rails may well be an oxymoron, but Enterprise Ruby is anything but. ... The notion of a narrow core rails and a wider ruby world (including ...
  91. On Ruby
    Covers many aspects of Ruby; by Pat Eyler.
  92. Learn Ruby on 43 Things
    I want to learn Ruby so that when I get to using Rails I know what?s going on ... Ruby is the best programming language there is. Well, for certain things, ...
  93. POI Ruby Bindings
    The POI library can now be compiled as a Ruby extension, allowing the API to be called ... The bindings have been developed with GCC 3.4.3 and Ruby 1.8.2. ...
  94. Ruby on Rails chases simplicity in programming | CNET News.com
    Ruby on Rails chases simplicity in programming | Solo-created framework is making waves among programmers and analysts as the next hot trend in Web ...
  95. Ruby off the Rails
    Ruby on Rails is just one facet of what makes Ruby great, just like EJB is only part of the Java enterprise platform. Andrew Glover digs beneath the hype ...
  96. Ruby on Rails Bootcamp
    Ruby on Rails Bootcamp is an intensive 5-day course specifically designed for developers, web designers, and project managers interested in creating ...
  97. Why Ruby is an acceptable LISP
    So if LISP is still more powerful than Ruby, why not use LISP? ... In 2005, I?d think long and hard before choosing LISP over Ruby. ...
  98. Ruby - SitePoint Forums
    Get up to speed with the Object Oriented scripting language, Ruby. Share tips and get help with your scripts.
  99. Ruby Manual
    Ruby Manual. Complete Ruby Documentation. Welcome to your central source for Ruby documentation. The following versions are referenced within this website: ...
  100. Ruby AI blog of artificial intelligence evolving from Seed AI to ...
    Use the concept-fiber theory of cognitivity to create AI minds in Ruby.
  101. Interviewing Ruby Programmers - O'Reilly Ruby
    Now that Ruby's begun its march towards global domination, it's appearing on increasing numbers of resumes. That puts most tech companies (including yours, ...
  102. Ruby/LDAP
    Ruby/LDAP is an extension module for Ruby. It provides the interface to some common LDAP libraries (for example, OpenLDAP, UMich LDAP, Netscape SDK and ...
  103. Howtos in Ruby on Rails
    Development how tos. Includes: General Ruby, Model, Views, Components, Email, Patterns, Xml HTTPRequest (aka Ajax), Tools and techniques. ...
  104. KDE Developer's Corner - Ruby bindings
    You can also find out more about Ruby in general here: ruby-lang.org ... There is a ruby translation of Qt Tutorial #1, and the corresponding ruby code is ...
  105. JRuby - Home
    Ruby implemented in pure Java: newer Ruby interpreter done in Java, most built-in Ruby classes, supports interacting with and defining Java classes in Ruby, ...

Tuesday, April 3, 2007

Why Ruby?

  • Quick and easy
    • interpreted
    • variables aren't typed
    • variable declaration unnecessary
    • simple syntax
    • memory managing unnecessary
  • for OOP
    • everything is an object
    • classes, inheritance, methods, etc...
    • singleton method
    • Mixin by module
    • iterator and closure
  • scripting language
    • interpreter
    • powerful string operations and regular expressions
    • enable to access to OS directly
  • misc...
    • multiple precision integers
    • exception processing model
    • dynamic loading